diff options
Diffstat (limited to 'arch/avr32/boards')
-rw-r--r-- | arch/avr32/boards/atngw100/setup.c | 19 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 25 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1003.c | 15 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1004.c | 18 |
4 files changed, 59 insertions, 18 deletions
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c index b8286f1ce854..6c54580a66df 100644 --- a/arch/avr32/boards/atngw100/setup.c +++ b/arch/avr32/boards/atngw100/setup.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
11 | #include <linux/etherdevice.h> | 11 | #include <linux/etherdevice.h> |
12 | #include <linux/gpio.h> | ||
12 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
13 | #include <linux/i2c.h> | 14 | #include <linux/i2c.h> |
14 | #include <linux/i2c-gpio.h> | 15 | #include <linux/i2c-gpio.h> |
@@ -53,8 +54,11 @@ static struct spi_board_info spi0_board_info[] __initdata = { | |||
53 | }; | 54 | }; |
54 | 55 | ||
55 | static struct mci_platform_data __initdata mci0_data = { | 56 | static struct mci_platform_data __initdata mci0_data = { |
56 | .detect_pin = GPIO_PIN_PC(25), | 57 | .slot[0] = { |
57 | .wp_pin = GPIO_PIN_PE(0), | 58 | .bus_width = 4, |
59 | .detect_pin = GPIO_PIN_PC(25), | ||
60 | .wp_pin = GPIO_PIN_PE(0), | ||
61 | }, | ||
58 | }; | 62 | }; |
59 | 63 | ||
60 | /* | 64 | /* |
@@ -190,7 +194,7 @@ static int __init atngw100_init(void) | |||
190 | * PB28/EXTINT3 doesn't; it should be SMBALERT# (for PMBus), | 194 | * PB28/EXTINT3 doesn't; it should be SMBALERT# (for PMBus), |
191 | * but it's not available off-board. | 195 | * but it's not available off-board. |
192 | */ | 196 | */ |
193 | at32_select_periph(GPIO_PIN_PB(28), 0, AT32_GPIOF_PULLUP); | 197 | at32_select_periph(GPIO_PIOB_BASE, 1 << 28, 0, AT32_GPIOF_PULLUP); |
194 | at32_select_gpio(i2c_gpio_data.sda_pin, | 198 | at32_select_gpio(i2c_gpio_data.sda_pin, |
195 | AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); | 199 | AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); |
196 | at32_select_gpio(i2c_gpio_data.scl_pin, | 200 | at32_select_gpio(i2c_gpio_data.scl_pin, |
@@ -204,6 +208,15 @@ postcore_initcall(atngw100_init); | |||
204 | 208 | ||
205 | static int __init atngw100_arch_init(void) | 209 | static int __init atngw100_arch_init(void) |
206 | { | 210 | { |
211 | /* PB30 is the otherwise unused jumper on the mainboard, with an | ||
212 | * external pullup; the jumper grounds it. Use it however you | ||
213 | * like, including letting U-Boot or Linux tweak boot sequences. | ||
214 | */ | ||
215 | at32_select_gpio(GPIO_PIN_PB(30), 0); | ||
216 | gpio_request(GPIO_PIN_PB(30), "j15"); | ||
217 | gpio_direction_input(GPIO_PIN_PB(30)); | ||
218 | gpio_export(GPIO_PIN_PB(30), false); | ||
219 | |||
207 | /* set_irq_type() after the arch_initcall for EIC has run, and | 220 | /* set_irq_type() after the arch_initcall for EIC has run, and |
208 | * before the I2C subsystem could try using this IRQ. | 221 | * before the I2C subsystem could try using this IRQ. |
209 | */ | 222 | */ |
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index ee4c292683e1..29e5b51a7fd2 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -232,7 +232,7 @@ static void __init atstk1002_setup_extdac(void) | |||
232 | goto err_set_clk; | 232 | goto err_set_clk; |
233 | } | 233 | } |
234 | 234 | ||
235 | at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0); | 235 | at32_select_periph(GPIO_PIOA_BASE, (1 << 30), GPIO_PERIPH_A, 0); |
236 | at73c213_data.dac_clk = gclk; | 236 | at73c213_data.dac_clk = gclk; |
237 | 237 | ||
238 | err_set_clk: | 238 | err_set_clk: |
@@ -264,16 +264,20 @@ void __init setup_board(void) | |||
264 | 264 | ||
265 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM | 265 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM |
266 | 266 | ||
267 | static struct mci_platform_data __initdata mci0_data = { | ||
268 | .slot[0] = { | ||
269 | .bus_width = 4, | ||
270 | |||
267 | /* MMC card detect requires MACB0 *NOT* be used */ | 271 | /* MMC card detect requires MACB0 *NOT* be used */ |
268 | #ifdef CONFIG_BOARD_ATSTK1002_SW6_CUSTOM | 272 | #ifdef CONFIG_BOARD_ATSTK1002_SW6_CUSTOM |
269 | static struct mci_platform_data __initdata mci0_data = { | 273 | .detect_pin = GPIO_PIN_PC(14), /* gpio30/sdcd */ |
270 | .detect_pin = GPIO_PIN_PC(14), /* gpio30/sdcd */ | 274 | .wp_pin = GPIO_PIN_PC(15), /* gpio31/sdwp */ |
271 | .wp_pin = GPIO_PIN_PC(15), /* gpio31/sdwp */ | ||
272 | }; | ||
273 | #define MCI_PDATA &mci0_data | ||
274 | #else | 275 | #else |
275 | #define MCI_PDATA NULL | 276 | .detect_pin = -ENODEV, |
277 | .wp_pin = -ENODEV, | ||
276 | #endif /* SW6 for sd{cd,wp} routing */ | 278 | #endif /* SW6 for sd{cd,wp} routing */ |
279 | }, | ||
280 | }; | ||
277 | 281 | ||
278 | #endif /* SW2 for MMC signal routing */ | 282 | #endif /* SW2 for MMC signal routing */ |
279 | 283 | ||
@@ -325,14 +329,15 @@ static int __init atstk1002_init(void) | |||
325 | #ifdef CONFIG_BOARD_ATSTK100X_SPI1 | 329 | #ifdef CONFIG_BOARD_ATSTK100X_SPI1 |
326 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); | 330 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); |
327 | #endif | 331 | #endif |
328 | #ifndef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM | 332 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM |
329 | at32_add_device_mci(0, MCI_PDATA); | 333 | at32_add_device_mci(0, &mci0_data); |
330 | #endif | 334 | #endif |
331 | #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM | 335 | #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM |
332 | set_hw_addr(at32_add_device_eth(1, ð_data[1])); | 336 | set_hw_addr(at32_add_device_eth(1, ð_data[1])); |
333 | #else | 337 | #else |
334 | at32_add_device_lcdc(0, &atstk1000_lcdc_data, | 338 | at32_add_device_lcdc(0, &atstk1000_lcdc_data, |
335 | fbmem_start, fbmem_size, 0); | 339 | fbmem_start, fbmem_size, |
340 | ATMEL_LCDC_PRI_24BIT | ATMEL_LCDC_PRI_CONTROL); | ||
336 | #endif | 341 | #endif |
337 | at32_add_device_usba(0, NULL); | 342 | at32_add_device_usba(0, NULL); |
338 | #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM | 343 | #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM |
diff --git a/arch/avr32/boards/atstk1000/atstk1003.c b/arch/avr32/boards/atstk1000/atstk1003.c index 0cf664174c17..be089d7f37eb 100644 --- a/arch/avr32/boards/atstk1000/atstk1003.c +++ b/arch/avr32/boards/atstk1000/atstk1003.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/spi/spi.h> | 19 | #include <linux/spi/spi.h> |
20 | 20 | ||
21 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
22 | #include <asm/atmel-mci.h> | ||
22 | 23 | ||
23 | #include <mach/at32ap700x.h> | 24 | #include <mach/at32ap700x.h> |
24 | #include <mach/board.h> | 25 | #include <mach/board.h> |
@@ -66,6 +67,16 @@ static struct spi_board_info spi1_board_info[] __initdata = { { | |||
66 | } }; | 67 | } }; |
67 | #endif | 68 | #endif |
68 | 69 | ||
70 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM | ||
71 | static struct mci_platform_data __initdata mci0_data = { | ||
72 | .slot[0] = { | ||
73 | .bus_width = 4, | ||
74 | .detect_pin = -ENODEV, | ||
75 | .wp_pin = -ENODEV, | ||
76 | }, | ||
77 | }; | ||
78 | #endif | ||
79 | |||
69 | #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC | 80 | #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC |
70 | static void __init atstk1003_setup_extdac(void) | 81 | static void __init atstk1003_setup_extdac(void) |
71 | { | 82 | { |
@@ -84,7 +95,7 @@ static void __init atstk1003_setup_extdac(void) | |||
84 | goto err_set_clk; | 95 | goto err_set_clk; |
85 | } | 96 | } |
86 | 97 | ||
87 | at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0); | 98 | at32_select_periph(GPIO_PIOA_BASE, (1 << 30), GPIO_PERIPH_A, 0); |
88 | at73c213_data.dac_clk = gclk; | 99 | at73c213_data.dac_clk = gclk; |
89 | 100 | ||
90 | err_set_clk: | 101 | err_set_clk: |
@@ -154,7 +165,7 @@ static int __init atstk1003_init(void) | |||
154 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); | 165 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); |
155 | #endif | 166 | #endif |
156 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM | 167 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM |
157 | at32_add_device_mci(0, NULL); | 168 | at32_add_device_mci(0, &mci0_data); |
158 | #endif | 169 | #endif |
159 | at32_add_device_usba(0, NULL); | 170 | at32_add_device_usba(0, NULL); |
160 | #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM | 171 | #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM |
diff --git a/arch/avr32/boards/atstk1000/atstk1004.c b/arch/avr32/boards/atstk1000/atstk1004.c index 50a5273e5916..248ef237c167 100644 --- a/arch/avr32/boards/atstk1000/atstk1004.c +++ b/arch/avr32/boards/atstk1000/atstk1004.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <video/atmel_lcdc.h> | 21 | #include <video/atmel_lcdc.h> |
22 | 22 | ||
23 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
24 | #include <asm/atmel-mci.h> | ||
24 | 25 | ||
25 | #include <mach/at32ap700x.h> | 26 | #include <mach/at32ap700x.h> |
26 | #include <mach/board.h> | 27 | #include <mach/board.h> |
@@ -71,6 +72,16 @@ static struct spi_board_info spi1_board_info[] __initdata = { { | |||
71 | } }; | 72 | } }; |
72 | #endif | 73 | #endif |
73 | 74 | ||
75 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM | ||
76 | static struct mci_platform_data __initdata mci0_data = { | ||
77 | .slot[0] = { | ||
78 | .bus_width = 4, | ||
79 | .detect_pin = -ENODEV, | ||
80 | .wp_pin = -ENODEV, | ||
81 | }, | ||
82 | }; | ||
83 | #endif | ||
84 | |||
74 | #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC | 85 | #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC |
75 | static void __init atstk1004_setup_extdac(void) | 86 | static void __init atstk1004_setup_extdac(void) |
76 | { | 87 | { |
@@ -89,7 +100,7 @@ static void __init atstk1004_setup_extdac(void) | |||
89 | goto err_set_clk; | 100 | goto err_set_clk; |
90 | } | 101 | } |
91 | 102 | ||
92 | at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0); | 103 | at32_select_periph(GPIO_PIOA_BASE, (1 << 30), GPIO_PERIPH_A, 0); |
93 | at73c213_data.dac_clk = gclk; | 104 | at73c213_data.dac_clk = gclk; |
94 | 105 | ||
95 | err_set_clk: | 106 | err_set_clk: |
@@ -137,10 +148,11 @@ static int __init atstk1004_init(void) | |||
137 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); | 148 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); |
138 | #endif | 149 | #endif |
139 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM | 150 | #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM |
140 | at32_add_device_mci(0, NULL); | 151 | at32_add_device_mci(0, &mci0_data); |
141 | #endif | 152 | #endif |
142 | at32_add_device_lcdc(0, &atstk1000_lcdc_data, | 153 | at32_add_device_lcdc(0, &atstk1000_lcdc_data, |
143 | fbmem_start, fbmem_size, 0); | 154 | fbmem_start, fbmem_size, |
155 | ATMEL_LCDC_PRI_24BIT | ATMEL_LCDC_PRI_CONTROL); | ||
144 | at32_add_device_usba(0, NULL); | 156 | at32_add_device_usba(0, NULL); |
145 | #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM | 157 | #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM |
146 | at32_add_device_ssc(0, ATMEL_SSC_TX); | 158 | at32_add_device_ssc(0, ATMEL_SSC_TX); |