diff options
author | Alex Raimondi <raimondi@miromico.ch> | 2008-11-04 17:37:10 -0500 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-01-05 06:16:13 -0500 |
commit | adde42b5834ed367ef7455d465bd9610190ad2a0 (patch) | |
tree | 77300eed45fbe2f67f458bbd3b1ab022b7f82894 /arch/avr32/boards | |
parent | 45f926912fb960c7c09c12906143b9dbaddf58cb (diff) |
avr32: Allow reserving multiple pins at once
at32_reserve_pin now takes an u32 bitmask rather than a single pin.
This allows to reserve multiple pins at once.
Remove (undocumented) SDCS (pin PE26) from reservation in board
setup code.
Signed-off-by: Alex Raimondi <raimondi@miromico.ch>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/boards')
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 18 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1003.c | 18 | ||||
-rw-r--r-- | arch/avr32/boards/favr-32/setup.c | 18 |
3 files changed, 3 insertions, 51 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index 5c5cdf3b464f..11e7800c1632 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -287,23 +287,7 @@ static int __init atstk1002_init(void) | |||
287 | * ATSTK1000 uses 32-bit SDRAM interface. Reserve the | 287 | * ATSTK1000 uses 32-bit SDRAM interface. Reserve the |
288 | * SDRAM-specific pins so that nobody messes with them. | 288 | * SDRAM-specific pins so that nobody messes with them. |
289 | */ | 289 | */ |
290 | at32_reserve_pin(GPIO_PIN_PE(0)); /* DATA[16] */ | 290 | at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL); |
291 | at32_reserve_pin(GPIO_PIN_PE(1)); /* DATA[17] */ | ||
292 | at32_reserve_pin(GPIO_PIN_PE(2)); /* DATA[18] */ | ||
293 | at32_reserve_pin(GPIO_PIN_PE(3)); /* DATA[19] */ | ||
294 | at32_reserve_pin(GPIO_PIN_PE(4)); /* DATA[20] */ | ||
295 | at32_reserve_pin(GPIO_PIN_PE(5)); /* DATA[21] */ | ||
296 | at32_reserve_pin(GPIO_PIN_PE(6)); /* DATA[22] */ | ||
297 | at32_reserve_pin(GPIO_PIN_PE(7)); /* DATA[23] */ | ||
298 | at32_reserve_pin(GPIO_PIN_PE(8)); /* DATA[24] */ | ||
299 | at32_reserve_pin(GPIO_PIN_PE(9)); /* DATA[25] */ | ||
300 | at32_reserve_pin(GPIO_PIN_PE(10)); /* DATA[26] */ | ||
301 | at32_reserve_pin(GPIO_PIN_PE(11)); /* DATA[27] */ | ||
302 | at32_reserve_pin(GPIO_PIN_PE(12)); /* DATA[28] */ | ||
303 | at32_reserve_pin(GPIO_PIN_PE(13)); /* DATA[29] */ | ||
304 | at32_reserve_pin(GPIO_PIN_PE(14)); /* DATA[30] */ | ||
305 | at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */ | ||
306 | at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */ | ||
307 | 291 | ||
308 | #ifdef CONFIG_BOARD_ATSTK1006 | 292 | #ifdef CONFIG_BOARD_ATSTK1006 |
309 | smc_set_timing(&nand_config, &nand_timing); | 293 | smc_set_timing(&nand_config, &nand_timing); |
diff --git a/arch/avr32/boards/atstk1000/atstk1003.c b/arch/avr32/boards/atstk1000/atstk1003.c index 134b566630b0..ac31666613a1 100644 --- a/arch/avr32/boards/atstk1000/atstk1003.c +++ b/arch/avr32/boards/atstk1000/atstk1003.c | |||
@@ -131,23 +131,7 @@ static int __init atstk1003_init(void) | |||
131 | * ATSTK1000 uses 32-bit SDRAM interface. Reserve the | 131 | * ATSTK1000 uses 32-bit SDRAM interface. Reserve the |
132 | * SDRAM-specific pins so that nobody messes with them. | 132 | * SDRAM-specific pins so that nobody messes with them. |
133 | */ | 133 | */ |
134 | at32_reserve_pin(GPIO_PIN_PE(0)); /* DATA[16] */ | 134 | at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL); |
135 | at32_reserve_pin(GPIO_PIN_PE(1)); /* DATA[17] */ | ||
136 | at32_reserve_pin(GPIO_PIN_PE(2)); /* DATA[18] */ | ||
137 | at32_reserve_pin(GPIO_PIN_PE(3)); /* DATA[19] */ | ||
138 | at32_reserve_pin(GPIO_PIN_PE(4)); /* DATA[20] */ | ||
139 | at32_reserve_pin(GPIO_PIN_PE(5)); /* DATA[21] */ | ||
140 | at32_reserve_pin(GPIO_PIN_PE(6)); /* DATA[22] */ | ||
141 | at32_reserve_pin(GPIO_PIN_PE(7)); /* DATA[23] */ | ||
142 | at32_reserve_pin(GPIO_PIN_PE(8)); /* DATA[24] */ | ||
143 | at32_reserve_pin(GPIO_PIN_PE(9)); /* DATA[25] */ | ||
144 | at32_reserve_pin(GPIO_PIN_PE(10)); /* DATA[26] */ | ||
145 | at32_reserve_pin(GPIO_PIN_PE(11)); /* DATA[27] */ | ||
146 | at32_reserve_pin(GPIO_PIN_PE(12)); /* DATA[28] */ | ||
147 | at32_reserve_pin(GPIO_PIN_PE(13)); /* DATA[29] */ | ||
148 | at32_reserve_pin(GPIO_PIN_PE(14)); /* DATA[30] */ | ||
149 | at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */ | ||
150 | at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */ | ||
151 | 135 | ||
152 | #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM | 136 | #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM |
153 | at32_add_device_usart(1); | 137 | at32_add_device_usart(1); |
diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c index ff8235a30ecd..006a04e8bef2 100644 --- a/arch/avr32/boards/favr-32/setup.c +++ b/arch/avr32/boards/favr-32/setup.c | |||
@@ -307,23 +307,7 @@ static int __init favr32_init(void) | |||
307 | * Favr-32 uses 32-bit SDRAM interface. Reserve the SDRAM-specific | 307 | * Favr-32 uses 32-bit SDRAM interface. Reserve the SDRAM-specific |
308 | * pins so that nobody messes with them. | 308 | * pins so that nobody messes with them. |
309 | */ | 309 | */ |
310 | at32_reserve_pin(GPIO_PIN_PE(0)); /* DATA[16] */ | 310 | at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL); |
311 | at32_reserve_pin(GPIO_PIN_PE(1)); /* DATA[17] */ | ||
312 | at32_reserve_pin(GPIO_PIN_PE(2)); /* DATA[18] */ | ||
313 | at32_reserve_pin(GPIO_PIN_PE(3)); /* DATA[19] */ | ||
314 | at32_reserve_pin(GPIO_PIN_PE(4)); /* DATA[20] */ | ||
315 | at32_reserve_pin(GPIO_PIN_PE(5)); /* DATA[21] */ | ||
316 | at32_reserve_pin(GPIO_PIN_PE(6)); /* DATA[22] */ | ||
317 | at32_reserve_pin(GPIO_PIN_PE(7)); /* DATA[23] */ | ||
318 | at32_reserve_pin(GPIO_PIN_PE(8)); /* DATA[24] */ | ||
319 | at32_reserve_pin(GPIO_PIN_PE(9)); /* DATA[25] */ | ||
320 | at32_reserve_pin(GPIO_PIN_PE(10)); /* DATA[26] */ | ||
321 | at32_reserve_pin(GPIO_PIN_PE(11)); /* DATA[27] */ | ||
322 | at32_reserve_pin(GPIO_PIN_PE(12)); /* DATA[28] */ | ||
323 | at32_reserve_pin(GPIO_PIN_PE(13)); /* DATA[29] */ | ||
324 | at32_reserve_pin(GPIO_PIN_PE(14)); /* DATA[30] */ | ||
325 | at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */ | ||
326 | at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */ | ||
327 | 311 | ||
328 | at32_select_gpio(GPIO_PIN_PB(3), 0); /* IRQ from ADS7843 */ | 312 | at32_select_gpio(GPIO_PIN_PB(3), 0); /* IRQ from ADS7843 */ |
329 | 313 | ||