aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/colibri-pxa270.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-08-11 19:18:38 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-12-20 10:07:40 -0500
commit9b6956f45132f9bf696e9f6c2e457bdfa8e08721 (patch)
tree6b617e542192080d4c7b06cad15668a4453b59da /arch/arm/mach-pxa/colibri-pxa270.c
parent960c0acaabf603e39b121ae5c0580aaca6f8aa7b (diff)
ARM: pxa: Push Colibri evalboard MFP into module files
This change -- pushing the MFP configuration back into Module files -- is necessary because some evalboards can be used with multiple modules, where MFP differs from module to module. Therefore MFP isn't board-specific, but module-specific and the module should preconfigure itself for the board. (And there is also the C preprocesor limitation and conflicting #define-s) Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/colibri-pxa270.c')
-rw-r--r--arch/arm/mach-pxa/colibri-pxa270.c96
1 files changed, 96 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 73205bc4a13c..e940004eac16 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -33,6 +33,99 @@
33#include "generic.h" 33#include "generic.h"
34 34
35/****************************************************************************** 35/******************************************************************************
36 * Evaluation board MFP
37 ******************************************************************************/
38#ifdef CONFIG_MACH_COLIBRI_PXA270_EVALBOARD
39static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
40 /* MMC */
41 GPIO32_MMC_CLK,
42 GPIO92_MMC_DAT_0,
43 GPIO109_MMC_DAT_1,
44 GPIO110_MMC_DAT_2,
45 GPIO111_MMC_DAT_3,
46 GPIO112_MMC_CMD,
47 GPIO0_GPIO, /* SD detect */
48
49 /* FFUART */
50 GPIO39_FFUART_TXD,
51 GPIO34_FFUART_RXD,
52
53 /* UHC */
54 GPIO88_USBH1_PWR,
55 GPIO89_USBH1_PEN,
56 GPIO119_USBH2_PWR,
57 GPIO120_USBH2_PEN,
58
59 /* PCMCIA */
60 GPIO85_nPCE_1,
61 GPIO54_nPCE_2,
62 GPIO55_nPREG,
63 GPIO50_nPIOR,
64 GPIO51_nPIOW,
65 GPIO49_nPWE,
66 GPIO48_nPOE,
67 GPIO57_nIOIS16,
68 GPIO56_nPWAIT,
69 GPIO104_PSKTSEL,
70 GPIO53_GPIO, /* RESET */
71 GPIO83_GPIO, /* BVD1 */
72 GPIO82_GPIO, /* BVD2 */
73 GPIO1_GPIO, /* READY */
74 GPIO84_GPIO, /* DETECT */
75 GPIO107_GPIO, /* PPEN */
76};
77#else
78static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {};
79#endif
80
81#ifdef CONFIG_MACH_COLIBRI_PXA270_INCOME
82static mfp_cfg_t income_pin_config[] __initdata = {
83 /* MMC */
84 GPIO32_MMC_CLK,
85 GPIO92_MMC_DAT_0,
86 GPIO109_MMC_DAT_1,
87 GPIO110_MMC_DAT_2,
88 GPIO111_MMC_DAT_3,
89 GPIO112_MMC_CMD,
90 GPIO0_GPIO, /* SD detect */
91 GPIO1_GPIO, /* SD read-only */
92
93 /* FFUART */
94 GPIO39_FFUART_TXD,
95 GPIO34_FFUART_RXD,
96
97 /* BFUART */
98 GPIO42_BTUART_RXD,
99 GPIO43_BTUART_TXD,
100 GPIO45_BTUART_RTS,
101
102 /* STUART */
103 GPIO46_STUART_RXD,
104 GPIO47_STUART_TXD,
105
106 /* UHC */
107 GPIO88_USBH1_PWR,
108 GPIO89_USBH1_PEN,
109
110 /* LCD */
111 GPIOxx_LCD_TFT_16BPP,
112
113 /* PWM */
114 GPIO16_PWM0_OUT,
115
116 /* I2C */
117 GPIO117_I2C_SCL,
118 GPIO118_I2C_SDA,
119
120 /* LED */
121 GPIO54_GPIO, /* LED A */
122 GPIO55_GPIO, /* LED B */
123};
124#else
125static mfp_cfg_t income_pin_config[] __initdata = {};
126#endif
127
128/******************************************************************************
36 * Pin configuration 129 * Pin configuration
37 ******************************************************************************/ 130 ******************************************************************************/
38static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = { 131static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
@@ -185,9 +278,12 @@ static void __init colibri_pxa270_init(void)
185 278
186 switch (colibri_pxa270_baseboard) { 279 switch (colibri_pxa270_baseboard) {
187 case COLIBRI_PXA270_EVALBOARD: 280 case COLIBRI_PXA270_EVALBOARD:
281 pxa2xx_mfp_config(ARRAY_AND_SIZE(
282 colibri_pxa270_evalboard_pin_config));
188 colibri_pxa270_evalboard_init(); 283 colibri_pxa270_evalboard_init();
189 break; 284 break;
190 case COLIBRI_PXA270_INCOME: 285 case COLIBRI_PXA270_INCOME:
286 pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config));
191 colibri_pxa270_income_boardinit(); 287 colibri_pxa270_income_boardinit();
192 break; 288 break;
193 default: 289 default: