commit | 585078f0a39f66f36ac94c50a8cebdefd1dd4206 | [log] [tgz] |
---|---|---|
author | Lars Povlsen <lars.povlsen@microchip.com> | Thu Dec 20 09:56:03 2018 +0100 |
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | Wed Jan 16 13:56:43 2019 +0100 |
tree | 0c0ac2192a58e8110e6e8a891edaf4cf03196d37 | |
parent | 0ee1664fb5684a492d449e77e9aa83a6fcae1655 [diff] |
mips: mscc: Add generic GPIO control utility function The GPIO control function can be used for controlling alternate functions associated with a GPIO. Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
diff --git a/arch/mips/mach-mscc/include/mach/common.h b/arch/mips/mach-mscc/include/mach/common.h index 92a0555..d18ae78 100644 --- a/arch/mips/mach-mscc/include/mach/common.h +++ b/arch/mips/mach-mscc/include/mach/common.h
@@ -45,4 +45,6 @@ u8 addr, u16 value); +void mscc_gpio_set_alternate(int gpio, int mode); + #endif /* __ASM_MACH_COMMON_H */
diff --git a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h index 8c0b612..a06cf81 100644 --- a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h +++ b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h
@@ -11,4 +11,6 @@ #define PERF_SOFT_RST_SOFT_SWC_RST BIT(1) #define PERF_SOFT_RST_SOFT_CHIP_RST BIT(0) +#define GPIO_ALT(x) (0x88 + 4 * (x)) + #endif
diff --git a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h index f8aa97b..d3a7641 100644 --- a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h +++ b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h
@@ -18,4 +18,6 @@ #define PERF_GPIO_OE 0x44 +#define GPIO_ALT(x) (0x54 + 4 * (x)) + #endif