diff options
Diffstat (limited to 'arch/arm/mach-at91/board-sam9g20ek.c')
-rw-r--r-- | arch/arm/mach-at91/board-sam9g20ek.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index ca8198b3c168..7624cf0d006b 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <mach/board.h> | 43 | #include <mach/board.h> |
44 | #include <mach/gpio.h> | 44 | #include <mach/gpio.h> |
45 | #include <mach/at91sam9_smc.h> | 45 | #include <mach/at91sam9_smc.h> |
46 | #include <mach/system_rev.h> | ||
46 | 47 | ||
47 | #include "sam9_smc.h" | 48 | #include "sam9_smc.h" |
48 | #include "generic.h" | 49 | #include "generic.h" |
@@ -60,7 +61,7 @@ static int inline ek_have_2mmc(void) | |||
60 | } | 61 | } |
61 | 62 | ||
62 | 63 | ||
63 | static void __init ek_map_io(void) | 64 | static void __init ek_init_early(void) |
64 | { | 65 | { |
65 | /* Initialize processor: 18.432 MHz crystal */ | 66 | /* Initialize processor: 18.432 MHz crystal */ |
66 | at91sam9260_initialize(18432000); | 67 | at91sam9260_initialize(18432000); |
@@ -175,11 +176,6 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
175 | .rdy_pin = AT91_PIN_PC13, | 176 | .rdy_pin = AT91_PIN_PC13, |
176 | .enable_pin = AT91_PIN_PC14, | 177 | .enable_pin = AT91_PIN_PC14, |
177 | .partition_info = nand_partitions, | 178 | .partition_info = nand_partitions, |
178 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
179 | .bus_width_16 = 1, | ||
180 | #else | ||
181 | .bus_width_16 = 0, | ||
182 | #endif | ||
183 | }; | 179 | }; |
184 | 180 | ||
185 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 181 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
@@ -202,6 +198,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { | |||
202 | 198 | ||
203 | static void __init ek_add_device_nand(void) | 199 | static void __init ek_add_device_nand(void) |
204 | { | 200 | { |
201 | ek_nand_data.bus_width_16 = !board_have_nand_8bit(); | ||
205 | /* setup bus-width (8 or 16) */ | 202 | /* setup bus-width (8 or 16) */ |
206 | if (ek_nand_data.bus_width_16) | 203 | if (ek_nand_data.bus_width_16) |
207 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | 204 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; |
@@ -406,18 +403,18 @@ static void __init ek_board_init(void) | |||
406 | 403 | ||
407 | MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK") | 404 | MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK") |
408 | /* Maintainer: Atmel */ | 405 | /* Maintainer: Atmel */ |
409 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
410 | .timer = &at91sam926x_timer, | 406 | .timer = &at91sam926x_timer, |
411 | .map_io = ek_map_io, | 407 | .map_io = at91sam9260_map_io, |
408 | .init_early = ek_init_early, | ||
412 | .init_irq = ek_init_irq, | 409 | .init_irq = ek_init_irq, |
413 | .init_machine = ek_board_init, | 410 | .init_machine = ek_board_init, |
414 | MACHINE_END | 411 | MACHINE_END |
415 | 412 | ||
416 | MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod") | 413 | MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod") |
417 | /* Maintainer: Atmel */ | 414 | /* Maintainer: Atmel */ |
418 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
419 | .timer = &at91sam926x_timer, | 415 | .timer = &at91sam926x_timer, |
420 | .map_io = ek_map_io, | 416 | .map_io = at91sam9260_map_io, |
417 | .init_early = ek_init_early, | ||
421 | .init_irq = ek_init_irq, | 418 | .init_irq = ek_init_irq, |
422 | .init_machine = ek_board_init, | 419 | .init_machine = ek_board_init, |
423 | MACHINE_END | 420 | MACHINE_END |