aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/Kconfig20
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c2
-rw-r--r--arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c23
-rw-r--r--arch/arm/mach-at91/include/mach/cpu.h9
4 files changed, 36 insertions, 18 deletions
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 7878e3312861..c71e39ed092f 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -294,13 +294,6 @@ config MACH_NEOCORE926
294 help 294 help
295 Select this if you are using the Adeneo Neocore 926 board. 295 Select this if you are using the Adeneo Neocore 926 board.
296 296
297config MACH_AT91SAM9G20EK_2MMC
298 bool "Atmel AT91SAM9G20-EK Evaluation Kit modified for 2 MMC Slots"
299 depends on ARCH_AT91SAM9G20
300 help
301 Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
302 Rev A or B modified for 2 MMC Slots.
303
304endif 297endif
305 298
306# ---------------------------------------------------------- 299# ----------------------------------------------------------
@@ -327,7 +320,16 @@ config MACH_AT91SAM9G20EK
327 bool "Atmel AT91SAM9G20-EK Evaluation Kit" 320 bool "Atmel AT91SAM9G20-EK Evaluation Kit"
328 depends on ARCH_AT91SAM9G20 321 depends on ARCH_AT91SAM9G20
329 help 322 help
330 Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit. 323 Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit
324 that embeds only one SD/MMC slot.
325
326config MACH_AT91SAM9G20EK_2MMC
327 bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots"
328 depends on ARCH_AT91SAM9G20
329 help
330 Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
331 with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and
332 onwards.
331 333
332config MACH_CPU9G20 334config MACH_CPU9G20
333 bool "Eukrea CPU9G20 board" 335 bool "Eukrea CPU9G20 board"
@@ -397,7 +399,7 @@ config MTD_AT91_DATAFLASH_CARD
397 399
398config MTD_NAND_ATMEL_BUSWIDTH_16 400config MTD_NAND_ATMEL_BUSWIDTH_16
399 bool "Enable 16-bit data bus interface to NAND flash" 401 bool "Enable 16-bit data bus interface to NAND flash"
400 depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK) 402 depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G20EK_2MMC || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK)
401 help 403 help
402 On AT91SAM926x boards both types of NAND flash can be present 404 On AT91SAM926x boards both types of NAND flash can be present
403 (8 and 16 bit data bus width). 405 (8 and 16 bit data bus width).
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 003f4f91fa52..a57af3e99c7c 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -894,7 +894,7 @@ static void __init at91_add_device_rtt(void)
894 * Watchdog 894 * Watchdog
895 * -------------------------------------------------------------------- */ 895 * -------------------------------------------------------------------- */
896 896
897#if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) 897#if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE)
898static struct platform_device at91sam9g45_wdt_device = { 898static struct platform_device at91sam9g45_wdt_device = {
899 .name = "at91_wdt", 899 .name = "at91_wdt",
900 .id = -1, 900 .id = -1,
diff --git a/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c b/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c
index a28e53faf71d..a4102d72cc9b 100644
--- a/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c
+++ b/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c
@@ -90,7 +90,7 @@ static struct at91_udc_data __initdata ek_udc_data = {
90 * SPI devices. 90 * SPI devices.
91 */ 91 */
92static struct spi_board_info ek_spi_devices[] = { 92static struct spi_board_info ek_spi_devices[] = {
93#if !defined(CONFIG_MMC_ATMELMCI) 93#if !(defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_AT91))
94 { /* DataFlash chip */ 94 { /* DataFlash chip */
95 .modalias = "mtd_dataflash", 95 .modalias = "mtd_dataflash",
96 .chip_select = 1, 96 .chip_select = 1,
@@ -113,7 +113,7 @@ static struct spi_board_info ek_spi_devices[] = {
113 * MACB Ethernet device 113 * MACB Ethernet device
114 */ 114 */
115static struct at91_eth_data __initdata ek_macb_data = { 115static struct at91_eth_data __initdata ek_macb_data = {
116 .phy_irq_pin = AT91_PIN_PC12, 116 .phy_irq_pin = AT91_PIN_PB0,
117 .is_rmii = 1, 117 .is_rmii = 1,
118}; 118};
119 119
@@ -194,24 +194,27 @@ static void __init ek_add_device_nand(void)
194 194
195/* 195/*
196 * MCI (SD/MMC) 196 * MCI (SD/MMC)
197 * det_pin and wp_pin are not connected 197 * wp_pin is not connected
198 */ 198 */
199#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) 199#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
200static struct mci_platform_data __initdata ek_mmc_data = { 200static struct mci_platform_data __initdata ek_mmc_data = {
201 .slot[0] = { 201 .slot[0] = {
202 .bus_width = 4, 202 .bus_width = 4,
203 .detect_pin = -ENODEV, 203 .detect_pin = AT91_PIN_PC2,
204 .wp_pin = -ENODEV, 204 .wp_pin = -ENODEV,
205 }, 205 },
206 .slot[1] = { 206 .slot[1] = {
207 .bus_width = 4, 207 .bus_width = 4,
208 .detect_pin = -ENODEV, 208 .detect_pin = AT91_PIN_PC9,
209 .wp_pin = -ENODEV, 209 .wp_pin = -ENODEV,
210 }, 210 },
211 211
212}; 212};
213#else 213#else
214static struct amci_platform_data __initdata ek_mmc_data = { 214static struct at91_mmc_data __initdata ek_mmc_data = {
215 .slot_b = 1, /* Only one slot so use slot B */
216 .wire4 = 1,
217 .det_pin = AT91_PIN_PC9,
215}; 218};
216#endif 219#endif
217 220
@@ -221,13 +224,13 @@ static struct amci_platform_data __initdata ek_mmc_data = {
221static struct gpio_led ek_leds[] = { 224static struct gpio_led ek_leds[] = {
222 { /* "bottom" led, green, userled1 to be defined */ 225 { /* "bottom" led, green, userled1 to be defined */
223 .name = "ds5", 226 .name = "ds5",
224 .gpio = AT91_PIN_PB12, 227 .gpio = AT91_PIN_PB8,
225 .active_low = 1, 228 .active_low = 1,
226 .default_trigger = "none", 229 .default_trigger = "none",
227 }, 230 },
228 { /* "power" led, yellow */ 231 { /* "power" led, yellow */
229 .name = "ds1", 232 .name = "ds1",
230 .gpio = AT91_PIN_PB13, 233 .gpio = AT91_PIN_PB9,
231 .default_trigger = "heartbeat", 234 .default_trigger = "heartbeat",
232 } 235 }
233}; 236};
@@ -254,7 +257,11 @@ static void __init ek_board_init(void)
254 /* Ethernet */ 257 /* Ethernet */
255 at91_add_device_eth(&ek_macb_data); 258 at91_add_device_eth(&ek_macb_data);
256 /* MMC */ 259 /* MMC */
260#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
257 at91_add_device_mci(0, &ek_mmc_data); 261 at91_add_device_mci(0, &ek_mmc_data);
262#else
263 at91_add_device_mmc(0, &ek_mmc_data);
264#endif
258 /* I2C */ 265 /* I2C */
259 at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); 266 at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
260 /* LEDs */ 267 /* LEDs */
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
index 34a9502c48bc..c22df30ed5e5 100644
--- a/arch/arm/mach-at91/include/mach/cpu.h
+++ b/arch/arm/mach-at91/include/mach/cpu.h
@@ -25,6 +25,8 @@
25#define ARCH_ID_AT91SAM9G20 0x019905a0 25#define ARCH_ID_AT91SAM9G20 0x019905a0
26#define ARCH_ID_AT91SAM9RL64 0x019b03a0 26#define ARCH_ID_AT91SAM9RL64 0x019b03a0
27#define ARCH_ID_AT91SAM9G45 0x819b05a0 27#define ARCH_ID_AT91SAM9G45 0x819b05a0
28#define ARCH_ID_AT91SAM9G45MRL 0x819b05a2 /* aka 9G45-ES2 & non ES lots */
29#define ARCH_ID_AT91SAM9G45ES 0x819b05a1 /* 9G45-ES (Engineering Sample) */
28#define ARCH_ID_AT91CAP9 0x039A03A0 30#define ARCH_ID_AT91CAP9 0x039A03A0
29 31
30#define ARCH_ID_AT91SAM9XE128 0x329973a0 32#define ARCH_ID_AT91SAM9XE128 0x329973a0
@@ -41,6 +43,11 @@ static inline unsigned long at91_cpu_identify(void)
41 return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION); 43 return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION);
42} 44}
43 45
46static inline unsigned long at91_cpu_fully_identify(void)
47{
48 return at91_sys_read(AT91_DBGU_CIDR);
49}
50
44#define ARCH_EXID_AT91SAM9M11 0x00000001 51#define ARCH_EXID_AT91SAM9M11 0x00000001
45#define ARCH_EXID_AT91SAM9M10 0x00000002 52#define ARCH_EXID_AT91SAM9M10 0x00000002
46#define ARCH_EXID_AT91SAM9G45 0x00000004 53#define ARCH_EXID_AT91SAM9G45 0x00000004
@@ -118,8 +125,10 @@ static inline unsigned long at91cap9_rev_identify(void)
118 125
119#ifdef CONFIG_ARCH_AT91SAM9G45 126#ifdef CONFIG_ARCH_AT91SAM9G45
120#define cpu_is_at91sam9g45() (at91_cpu_identify() == ARCH_ID_AT91SAM9G45) 127#define cpu_is_at91sam9g45() (at91_cpu_identify() == ARCH_ID_AT91SAM9G45)
128#define cpu_is_at91sam9g45es() (at91_cpu_fully_identify() == ARCH_ID_AT91SAM9G45ES)
121#else 129#else
122#define cpu_is_at91sam9g45() (0) 130#define cpu_is_at91sam9g45() (0)
131#define cpu_is_at91sam9g45es() (0)
123#endif 132#endif
124 133
125#ifdef CONFIG_ARCH_AT91CAP9 134#ifdef CONFIG_ARCH_AT91CAP9