gpio: Add Multi-Function-Pin configuration driver for Marvell SoCs
PATCH v3 3/7 gpio: Add Multi-Function-Pin configuration driver for Marvell SoCs
Most of the Marvell SoCs has Multi Function Pin (MFP) configuration registers For ex. ARMADA100.
These registers are programmed to expose the specific functionality associated with respective SoC Pins
This driver provides configuration APIs,
using them, configuration need to be done in board specific code
for ex- following code configures MFPs 107 and 108 for UART_TX/RX functionality
int board_early_init_f(void)
{
u32 mfp_cfg[] = {
/* Console on UART1 */
MFP107_UART1_RXD,
MFP108_UART1_TXD,
MFP_EOC /*End of configureation*/
};
/* configure MFP's */
mfp_config(mfp_cfg);
return 0;
}---
Please Ignore earlier patch, below bufix is added to this patch
Change log v3:
Fixed: Read-modify-Write a mfg register as per configuration ANDed with MASK value before ORing for each configuration
drivers/gpio/Makefile | 1 + drivers/gpio/mfp.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++++ include/mfp.h | 97 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/mfp.c create mode 100644 include/mfp.h
drivers/gpio/Makefile +1 -0
@@ -27,6 +27,7 @@ LIB := $(obj)libgpio.o COBJS-$(CONFIG_AT91_GPIO) += at91_gpio.o COBJS-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o +COBJS-$(CONFIG_MFP) += mfp.o COBJS-$(CONFIG_MXC_GPIO) += mxc_gpio.o COBJS-$(CONFIG_PCA953X) += pca953x.o COBJS-$(CONFIG_S5P) += s5p_gpio.o
drivers/gpio/mfp.c new file +110 -0
110 lines not on this page · raw message
include/mfp.h new file +97 -0
97 lines not on this page · raw message
Signature · 1 line
1.5.3.4