aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-sam9m10g45ek.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/board-sam9m10g45ek.c')
-rw-r--r--arch/arm/mach-at91/board-sam9m10g45ek.c42
1 files changed, 30 insertions, 12 deletions
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index ee800595594d..33eaa135f248 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -24,7 +24,9 @@
24#include <linux/input.h> 24#include <linux/input.h>
25#include <linux/leds.h> 25#include <linux/leds.h>
26#include <linux/clk.h> 26#include <linux/clk.h>
27#include <linux/atmel-mci.h>
27 28
29#include <mach/hardware.h>
28#include <video/atmel_lcdc.h> 30#include <video/atmel_lcdc.h>
29 31
30#include <asm/setup.h> 32#include <asm/setup.h>
@@ -35,17 +37,17 @@
35#include <asm/mach/map.h> 37#include <asm/mach/map.h>
36#include <asm/mach/irq.h> 38#include <asm/mach/irq.h>
37 39
38#include <mach/hardware.h>
39#include <mach/board.h> 40#include <mach/board.h>
40#include <mach/gpio.h> 41#include <mach/gpio.h>
41#include <mach/at91sam9_smc.h> 42#include <mach/at91sam9_smc.h>
42#include <mach/at91_shdwc.h> 43#include <mach/at91_shdwc.h>
44#include <mach/system_rev.h>
43 45
44#include "sam9_smc.h" 46#include "sam9_smc.h"
45#include "generic.h" 47#include "generic.h"
46 48
47 49
48static void __init ek_map_io(void) 50static void __init ek_init_early(void)
49{ 51{
50 /* Initialize processor: 12.000 MHz crystal */ 52 /* Initialize processor: 12.000 MHz crystal */
51 at91sam9g45_initialize(12000000); 53 at91sam9g45_initialize(12000000);
@@ -98,6 +100,25 @@ static struct spi_board_info ek_spi_devices[] = {
98 100
99 101
100/* 102/*
103 * MCI (SD/MMC)
104 */
105static struct mci_platform_data __initdata mci0_data = {
106 .slot[0] = {
107 .bus_width = 4,
108 .detect_pin = AT91_PIN_PD10,
109 },
110};
111
112static struct mci_platform_data __initdata mci1_data = {
113 .slot[0] = {
114 .bus_width = 4,
115 .detect_pin = AT91_PIN_PD11,
116 .wp_pin = AT91_PIN_PD29,
117 },
118};
119
120
121/*
101 * MACB Ethernet device 122 * MACB Ethernet device
102 */ 123 */
103static struct at91_eth_data __initdata ek_macb_data = { 124static struct at91_eth_data __initdata ek_macb_data = {
@@ -135,11 +156,6 @@ static struct atmel_nand_data __initdata ek_nand_data = {
135 .rdy_pin = AT91_PIN_PC8, 156 .rdy_pin = AT91_PIN_PC8,
136 .enable_pin = AT91_PIN_PC14, 157 .enable_pin = AT91_PIN_PC14,
137 .partition_info = nand_partitions, 158 .partition_info = nand_partitions,
138#if defined(CONFIG_MTD_NAND_AT91_BUSWIDTH_16)
139 .bus_width_16 = 1,
140#else
141 .bus_width_16 = 0,
142#endif
143}; 159};
144 160
145static struct sam9_smc_config __initdata ek_nand_smc_config = { 161static struct sam9_smc_config __initdata ek_nand_smc_config = {
@@ -162,6 +178,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
162 178
163static void __init ek_add_device_nand(void) 179static void __init ek_add_device_nand(void)
164{ 180{
181 ek_nand_data.bus_width_16 = board_have_nand_16bit();
165 /* setup bus-width (8 or 16) */ 182 /* setup bus-width (8 or 16) */
166 if (ek_nand_data.bus_width_16) 183 if (ek_nand_data.bus_width_16)
167 ek_nand_smc_config.mode |= AT91_SMC_DBW_16; 184 ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
@@ -380,6 +397,9 @@ static void __init ek_board_init(void)
380 at91_add_device_usba(&ek_usba_udc_data); 397 at91_add_device_usba(&ek_usba_udc_data);
381 /* SPI */ 398 /* SPI */
382 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); 399 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
400 /* MMC */
401 at91_add_device_mci(0, &mci0_data);
402 at91_add_device_mci(1, &mci1_data);
383 /* Ethernet */ 403 /* Ethernet */
384 at91_add_device_eth(&ek_macb_data); 404 at91_add_device_eth(&ek_macb_data);
385 /* NAND */ 405 /* NAND */
@@ -399,13 +419,11 @@ static void __init ek_board_init(void)
399 at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led)); 419 at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
400} 420}
401 421
402MACHINE_START(AT91SAM9G45EKES, "Atmel AT91SAM9G45-EKES") 422MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK")
403 /* Maintainer: Atmel */ 423 /* Maintainer: Atmel */
404 .phys_io = AT91_BASE_SYS,
405 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
406 .boot_params = AT91_SDRAM_BASE + 0x100,
407 .timer = &at91sam926x_timer, 424 .timer = &at91sam926x_timer,
408 .map_io = ek_map_io, 425 .map_io = at91sam9g45_map_io,
426 .init_early = ek_init_early,
409 .init_irq = ek_init_irq, 427 .init_irq = ek_init_irq,
410 .init_machine = ek_board_init, 428 .init_machine = ek_board_init,
411MACHINE_END 429MACHINE_END