diff options
author | Ryan Mallon <ryan@bluewatersys.com> | 2011-05-20 03:34:22 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-20 17:34:24 -0400 |
commit | 6618c3ada039116ca0392ce955df081adc5f015c (patch) | |
tree | 50152bf26b87889a746a2571c76dcbd3bda1008f /arch/arm/mach-spear3xx/include | |
parent | 61e72bca04be2dc11a637185f2bbe6dba32ecaf3 (diff) |
ARM: 6930/1: SPEAr3xx: Rework pmx_dev code to remove conflicts
Prefix the pmx_devs to remove naming conflicts between the three
SPEAr3xx platforms. Also make pmx_driver static to each platform and
rework the init code to pass the devices rather than export the
pmx_driver structure.
Reviewed-by: Stanley Miao <stanley.miao@windriver.com>
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-spear3xx/include')
-rw-r--r-- | arch/arm/mach-spear3xx/include/mach/generic.h | 193 |
1 files changed, 97 insertions, 96 deletions
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index af4cb5b8aa40..8b04f085e8a3 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h | |||
@@ -60,81 +60,80 @@ void __init spear3xx_init(void); | |||
60 | #define PMX_TIMER_1_2_MASK (1 << 0) | 60 | #define PMX_TIMER_1_2_MASK (1 << 0) |
61 | 61 | ||
62 | /* pad mux devices */ | 62 | /* pad mux devices */ |
63 | extern struct pmx_dev pmx_firda; | 63 | extern struct pmx_dev spear3xx_pmx_firda; |
64 | extern struct pmx_dev pmx_i2c; | 64 | extern struct pmx_dev spear3xx_pmx_i2c; |
65 | extern struct pmx_dev pmx_ssp_cs; | 65 | extern struct pmx_dev spear3xx_pmx_ssp_cs; |
66 | extern struct pmx_dev pmx_ssp; | 66 | extern struct pmx_dev spear3xx_pmx_ssp; |
67 | extern struct pmx_dev pmx_mii; | 67 | extern struct pmx_dev spear3xx_pmx_mii; |
68 | extern struct pmx_dev pmx_gpio_pin0; | 68 | extern struct pmx_dev spear3xx_pmx_gpio_pin0; |
69 | extern struct pmx_dev pmx_gpio_pin1; | 69 | extern struct pmx_dev spear3xx_pmx_gpio_pin1; |
70 | extern struct pmx_dev pmx_gpio_pin2; | 70 | extern struct pmx_dev spear3xx_pmx_gpio_pin2; |
71 | extern struct pmx_dev pmx_gpio_pin3; | 71 | extern struct pmx_dev spear3xx_pmx_gpio_pin3; |
72 | extern struct pmx_dev pmx_gpio_pin4; | 72 | extern struct pmx_dev spear3xx_pmx_gpio_pin4; |
73 | extern struct pmx_dev pmx_gpio_pin5; | 73 | extern struct pmx_dev spear3xx_pmx_gpio_pin5; |
74 | extern struct pmx_dev pmx_uart0_modem; | 74 | extern struct pmx_dev spear3xx_pmx_uart0_modem; |
75 | extern struct pmx_dev pmx_uart0; | 75 | extern struct pmx_dev spear3xx_pmx_uart0; |
76 | extern struct pmx_dev pmx_timer_3_4; | 76 | extern struct pmx_dev spear3xx_pmx_timer_3_4; |
77 | extern struct pmx_dev pmx_timer_1_2; | 77 | extern struct pmx_dev spear3xx_pmx_timer_1_2; |
78 | 78 | ||
79 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | 79 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) |
80 | /* padmux plgpio devices */ | 80 | /* padmux plgpio devices */ |
81 | extern struct pmx_dev pmx_plgpio_0_1; | 81 | extern struct pmx_dev spear3xx_pmx_plgpio_0_1; |
82 | extern struct pmx_dev pmx_plgpio_2_3; | 82 | extern struct pmx_dev spear3xx_pmx_plgpio_2_3; |
83 | extern struct pmx_dev pmx_plgpio_4_5; | 83 | extern struct pmx_dev spear3xx_pmx_plgpio_4_5; |
84 | extern struct pmx_dev pmx_plgpio_6_9; | 84 | extern struct pmx_dev spear3xx_pmx_plgpio_6_9; |
85 | extern struct pmx_dev pmx_plgpio_10_27; | 85 | extern struct pmx_dev spear3xx_pmx_plgpio_10_27; |
86 | extern struct pmx_dev pmx_plgpio_28; | 86 | extern struct pmx_dev spear3xx_pmx_plgpio_28; |
87 | extern struct pmx_dev pmx_plgpio_29; | 87 | extern struct pmx_dev spear3xx_pmx_plgpio_29; |
88 | extern struct pmx_dev pmx_plgpio_30; | 88 | extern struct pmx_dev spear3xx_pmx_plgpio_30; |
89 | extern struct pmx_dev pmx_plgpio_31; | 89 | extern struct pmx_dev spear3xx_pmx_plgpio_31; |
90 | extern struct pmx_dev pmx_plgpio_32; | 90 | extern struct pmx_dev spear3xx_pmx_plgpio_32; |
91 | extern struct pmx_dev pmx_plgpio_33; | 91 | extern struct pmx_dev spear3xx_pmx_plgpio_33; |
92 | extern struct pmx_dev pmx_plgpio_34_36; | 92 | extern struct pmx_dev spear3xx_pmx_plgpio_34_36; |
93 | extern struct pmx_dev pmx_plgpio_37_42; | 93 | extern struct pmx_dev spear3xx_pmx_plgpio_37_42; |
94 | extern struct pmx_dev pmx_plgpio_43_44_47_48; | 94 | extern struct pmx_dev spear3xx_pmx_plgpio_43_44_47_48; |
95 | extern struct pmx_dev pmx_plgpio_45_46_49_50; | 95 | extern struct pmx_dev spear3xx_pmx_plgpio_45_46_49_50; |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | extern struct pmx_driver pmx_driver; | ||
99 | |||
100 | /* spear300 declarations */ | 98 | /* spear300 declarations */ |
101 | #ifdef CONFIG_MACH_SPEAR300 | 99 | #ifdef CONFIG_MACH_SPEAR300 |
102 | /* Add spear300 machine device structure declarations here */ | 100 | /* Add spear300 machine device structure declarations here */ |
103 | extern struct amba_device gpio1_device; | 101 | extern struct amba_device gpio1_device; |
104 | 102 | ||
105 | /* pad mux modes */ | 103 | /* pad mux modes */ |
106 | extern struct pmx_mode nand_mode; | 104 | extern struct pmx_mode spear300_nand_mode; |
107 | extern struct pmx_mode nor_mode; | 105 | extern struct pmx_mode spear300_nor_mode; |
108 | extern struct pmx_mode photo_frame_mode; | 106 | extern struct pmx_mode spear300_photo_frame_mode; |
109 | extern struct pmx_mode lend_ip_phone_mode; | 107 | extern struct pmx_mode spear300_lend_ip_phone_mode; |
110 | extern struct pmx_mode hend_ip_phone_mode; | 108 | extern struct pmx_mode spear300_hend_ip_phone_mode; |
111 | extern struct pmx_mode lend_wifi_phone_mode; | 109 | extern struct pmx_mode spear300_lend_wifi_phone_mode; |
112 | extern struct pmx_mode hend_wifi_phone_mode; | 110 | extern struct pmx_mode spear300_hend_wifi_phone_mode; |
113 | extern struct pmx_mode ata_pabx_wi2s_mode; | 111 | extern struct pmx_mode spear300_ata_pabx_wi2s_mode; |
114 | extern struct pmx_mode ata_pabx_i2s_mode; | 112 | extern struct pmx_mode spear300_ata_pabx_i2s_mode; |
115 | extern struct pmx_mode caml_lcdw_mode; | 113 | extern struct pmx_mode spear300_caml_lcdw_mode; |
116 | extern struct pmx_mode camu_lcd_mode; | 114 | extern struct pmx_mode spear300_camu_lcd_mode; |
117 | extern struct pmx_mode camu_wlcd_mode; | 115 | extern struct pmx_mode spear300_camu_wlcd_mode; |
118 | extern struct pmx_mode caml_lcd_mode; | 116 | extern struct pmx_mode spear300_caml_lcd_mode; |
119 | 117 | ||
120 | /* pad mux devices */ | 118 | /* pad mux devices */ |
121 | extern struct pmx_dev pmx_fsmc_2_chips; | 119 | extern struct pmx_dev spear300_pmx_fsmc_2_chips; |
122 | extern struct pmx_dev pmx_fsmc_4_chips; | 120 | extern struct pmx_dev spear300_pmx_fsmc_4_chips; |
123 | extern struct pmx_dev pmx_keyboard; | 121 | extern struct pmx_dev spear300_pmx_keyboard; |
124 | extern struct pmx_dev pmx_clcd; | 122 | extern struct pmx_dev spear300_pmx_clcd; |
125 | extern struct pmx_dev pmx_telecom_gpio; | 123 | extern struct pmx_dev spear300_pmx_telecom_gpio; |
126 | extern struct pmx_dev pmx_telecom_tdm; | 124 | extern struct pmx_dev spear300_pmx_telecom_tdm; |
127 | extern struct pmx_dev pmx_telecom_spi_cs_i2c_clk; | 125 | extern struct pmx_dev spear300_pmx_telecom_spi_cs_i2c_clk; |
128 | extern struct pmx_dev pmx_telecom_camera; | 126 | extern struct pmx_dev spear300_pmx_telecom_camera; |
129 | extern struct pmx_dev pmx_telecom_dac; | 127 | extern struct pmx_dev spear300_pmx_telecom_dac; |
130 | extern struct pmx_dev pmx_telecom_i2s; | 128 | extern struct pmx_dev spear300_pmx_telecom_i2s; |
131 | extern struct pmx_dev pmx_telecom_boot_pins; | 129 | extern struct pmx_dev spear300_pmx_telecom_boot_pins; |
132 | extern struct pmx_dev pmx_telecom_sdhci_4bit; | 130 | extern struct pmx_dev spear300_pmx_telecom_sdhci_4bit; |
133 | extern struct pmx_dev pmx_telecom_sdhci_8bit; | 131 | extern struct pmx_dev spear300_pmx_telecom_sdhci_8bit; |
134 | extern struct pmx_dev pmx_gpio1; | 132 | extern struct pmx_dev spear300_pmx_gpio1; |
135 | 133 | ||
136 | /* Add spear300 machine function declarations here */ | 134 | /* Add spear300 machine function declarations here */ |
137 | void __init spear300_init(void); | 135 | void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, |
136 | u8 pmx_dev_count); | ||
138 | 137 | ||
139 | #endif /* CONFIG_MACH_SPEAR300 */ | 138 | #endif /* CONFIG_MACH_SPEAR300 */ |
140 | 139 | ||
@@ -143,17 +142,18 @@ void __init spear300_init(void); | |||
143 | /* Add spear310 machine device structure declarations here */ | 142 | /* Add spear310 machine device structure declarations here */ |
144 | 143 | ||
145 | /* pad mux devices */ | 144 | /* pad mux devices */ |
146 | extern struct pmx_dev pmx_emi_cs_0_1_4_5; | 145 | extern struct pmx_dev spear310_pmx_emi_cs_0_1_4_5; |
147 | extern struct pmx_dev pmx_emi_cs_2_3; | 146 | extern struct pmx_dev spear310_pmx_emi_cs_2_3; |
148 | extern struct pmx_dev pmx_uart1; | 147 | extern struct pmx_dev spear310_pmx_uart1; |
149 | extern struct pmx_dev pmx_uart2; | 148 | extern struct pmx_dev spear310_pmx_uart2; |
150 | extern struct pmx_dev pmx_uart3_4_5; | 149 | extern struct pmx_dev spear310_pmx_uart3_4_5; |
151 | extern struct pmx_dev pmx_fsmc; | 150 | extern struct pmx_dev spear310_pmx_fsmc; |
152 | extern struct pmx_dev pmx_rs485_0_1; | 151 | extern struct pmx_dev spear310_pmx_rs485_0_1; |
153 | extern struct pmx_dev pmx_tdm0; | 152 | extern struct pmx_dev spear310_pmx_tdm0; |
154 | 153 | ||
155 | /* Add spear310 machine function declarations here */ | 154 | /* Add spear310 machine function declarations here */ |
156 | void __init spear310_init(void); | 155 | void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, |
156 | u8 pmx_dev_count); | ||
157 | 157 | ||
158 | #endif /* CONFIG_MACH_SPEAR310 */ | 158 | #endif /* CONFIG_MACH_SPEAR310 */ |
159 | 159 | ||
@@ -162,37 +162,38 @@ void __init spear310_init(void); | |||
162 | /* Add spear320 machine device structure declarations here */ | 162 | /* Add spear320 machine device structure declarations here */ |
163 | 163 | ||
164 | /* pad mux modes */ | 164 | /* pad mux modes */ |
165 | extern struct pmx_mode auto_net_smii_mode; | 165 | extern struct pmx_mode spear320_auto_net_smii_mode; |
166 | extern struct pmx_mode auto_net_mii_mode; | 166 | extern struct pmx_mode spear320_auto_net_mii_mode; |
167 | extern struct pmx_mode auto_exp_mode; | 167 | extern struct pmx_mode spear320_auto_exp_mode; |
168 | extern struct pmx_mode small_printers_mode; | 168 | extern struct pmx_mode spear320_small_printers_mode; |
169 | 169 | ||
170 | /* pad mux devices */ | 170 | /* pad mux devices */ |
171 | extern struct pmx_dev pmx_clcd; | 171 | extern struct pmx_dev spear320_pmx_clcd; |
172 | extern struct pmx_dev pmx_emi; | 172 | extern struct pmx_dev spear320_pmx_emi; |
173 | extern struct pmx_dev pmx_fsmc; | 173 | extern struct pmx_dev spear320_pmx_fsmc; |
174 | extern struct pmx_dev pmx_spp; | 174 | extern struct pmx_dev spear320_pmx_spp; |
175 | extern struct pmx_dev pmx_sdhci; | 175 | extern struct pmx_dev spear320_pmx_sdhci; |
176 | extern struct pmx_dev pmx_i2s; | 176 | extern struct pmx_dev spear320_pmx_i2s; |
177 | extern struct pmx_dev pmx_uart1; | 177 | extern struct pmx_dev spear320_pmx_uart1; |
178 | extern struct pmx_dev pmx_uart1_modem; | 178 | extern struct pmx_dev spear320_pmx_uart1_modem; |
179 | extern struct pmx_dev pmx_uart2; | 179 | extern struct pmx_dev spear320_pmx_uart2; |
180 | extern struct pmx_dev pmx_touchscreen; | 180 | extern struct pmx_dev spear320_pmx_touchscreen; |
181 | extern struct pmx_dev pmx_can; | 181 | extern struct pmx_dev spear320_pmx_can; |
182 | extern struct pmx_dev pmx_sdhci_led; | 182 | extern struct pmx_dev spear320_pmx_sdhci_led; |
183 | extern struct pmx_dev pmx_pwm0; | 183 | extern struct pmx_dev spear320_pmx_pwm0; |
184 | extern struct pmx_dev pmx_pwm1; | 184 | extern struct pmx_dev spear320_pmx_pwm1; |
185 | extern struct pmx_dev pmx_pwm2; | 185 | extern struct pmx_dev spear320_pmx_pwm2; |
186 | extern struct pmx_dev pmx_pwm3; | 186 | extern struct pmx_dev spear320_pmx_pwm3; |
187 | extern struct pmx_dev pmx_ssp1; | 187 | extern struct pmx_dev spear320_pmx_ssp1; |
188 | extern struct pmx_dev pmx_ssp2; | 188 | extern struct pmx_dev spear320_pmx_ssp2; |
189 | extern struct pmx_dev pmx_mii1; | 189 | extern struct pmx_dev spear320_pmx_mii1; |
190 | extern struct pmx_dev pmx_smii0; | 190 | extern struct pmx_dev spear320_pmx_smii0; |
191 | extern struct pmx_dev pmx_smii1; | 191 | extern struct pmx_dev spear320_pmx_smii1; |
192 | extern struct pmx_dev pmx_i2c1; | 192 | extern struct pmx_dev spear320_pmx_i2c1; |
193 | 193 | ||
194 | /* Add spear320 machine function declarations here */ | 194 | /* Add spear320 machine function declarations here */ |
195 | void __init spear320_init(void); | 195 | void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, |
196 | u8 pmx_dev_count); | ||
196 | 197 | ||
197 | #endif /* CONFIG_MACH_SPEAR320 */ | 198 | #endif /* CONFIG_MACH_SPEAR320 */ |
198 | 199 | ||