diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2009-06-26 10:37:01 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-07-02 10:59:56 -0400 |
commit | b319ff80852e823c3a18778c839151784990f80b (patch) | |
tree | 584b8317df2d93d9dd65b9d92bc835b1e53f816a /arch/arm/mach-at91 | |
parent | b784b7c03723891876c9053c589150a4062f9455 (diff) |
[ARM] 5570/1: at91: Support for at91sam9g10: core chip & board support
From: Hong Xu <hong.xu@atmel.com>
Here are the modification to at91sam9261 files dedicated to the support of
at91sam9g10. This direction has been adopted to minimize code duplication.
All at91sam9261 drivers are enabled in _devices and board- files. Modificaton
to peripherals that support at91sam9g10 will be added in future patches.
Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/Kconfig | 25 | ||||
-rw-r--r-- | arch/arm/mach-at91/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-sam9261ek.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-at91/pm.c | 3 |
5 files changed, 62 insertions, 4 deletions
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 22309ba97fa6..8f3e15abdb62 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -23,6 +23,12 @@ config ARCH_AT91SAM9261 | |||
23 | select GENERIC_TIME | 23 | select GENERIC_TIME |
24 | select GENERIC_CLOCKEVENTS | 24 | select GENERIC_CLOCKEVENTS |
25 | 25 | ||
26 | config ARCH_AT91SAM9G10 | ||
27 | bool "AT91SAM9G10" | ||
28 | select CPU_ARM926T | ||
29 | select GENERIC_TIME | ||
30 | select GENERIC_CLOCKEVENTS | ||
31 | |||
26 | config ARCH_AT91SAM9263 | 32 | config ARCH_AT91SAM9263 |
27 | bool "AT91SAM9263" | 33 | bool "AT91SAM9263" |
28 | select CPU_ARM926T | 34 | select CPU_ARM926T |
@@ -230,6 +236,21 @@ endif | |||
230 | 236 | ||
231 | # ---------------------------------------------------------- | 237 | # ---------------------------------------------------------- |
232 | 238 | ||
239 | if ARCH_AT91SAM9G10 | ||
240 | |||
241 | comment "AT91SAM9G10 Board Type" | ||
242 | |||
243 | config MACH_AT91SAM9G10EK | ||
244 | bool "Atmel AT91SAM9G10-EK Evaluation Kit" | ||
245 | depends on ARCH_AT91SAM9G10 | ||
246 | help | ||
247 | Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit. | ||
248 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588> | ||
249 | |||
250 | endif | ||
251 | |||
252 | # ---------------------------------------------------------- | ||
253 | |||
233 | if ARCH_AT91SAM9263 | 254 | if ARCH_AT91SAM9263 |
234 | 255 | ||
235 | comment "AT91SAM9263 Board Type" | 256 | comment "AT91SAM9263 Board Type" |
@@ -337,13 +358,13 @@ comment "AT91 Board Options" | |||
337 | 358 | ||
338 | config MTD_AT91_DATAFLASH_CARD | 359 | config MTD_AT91_DATAFLASH_CARD |
339 | bool "Enable DataFlash Card support" | 360 | bool "Enable DataFlash Card support" |
340 | depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_ECBAT91 || MACH_SAM9_L9260 || MACH_AT91CAP9ADK || MACH_NEOCORE926) | 361 | depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_ECBAT91 || MACH_SAM9_L9260 || MACH_AT91CAP9ADK || MACH_NEOCORE926) |
341 | help | 362 | help |
342 | Enable support for the DataFlash card. | 363 | Enable support for the DataFlash card. |
343 | 364 | ||
344 | config MTD_NAND_ATMEL_BUSWIDTH_16 | 365 | config MTD_NAND_ATMEL_BUSWIDTH_16 |
345 | bool "Enable 16-bit data bus interface to NAND flash" | 366 | bool "Enable 16-bit data bus interface to NAND flash" |
346 | depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK) | 367 | depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK) |
347 | help | 368 | help |
348 | On AT91SAM926x boards both types of NAND flash can be present | 369 | On AT91SAM926x boards both types of NAND flash can be present |
349 | (8 and 16 bit data bus width). | 370 | (8 and 16 bit data bus width). |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 2975f9ab861c..4eaf80abe100 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -13,6 +13,7 @@ obj-$(CONFIG_AT91_PMC_UNIT) += clock.o | |||
13 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o | 13 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o |
14 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o | 14 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o |
15 | obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o | 15 | obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o |
16 | obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o | ||
16 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o | 17 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o |
17 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o | 18 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o |
18 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o | 19 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o |
@@ -44,6 +45,7 @@ obj-$(CONFIG_MACH_AFEB9260) += board-afeb-9260v1.o | |||
44 | 45 | ||
45 | # AT91SAM9261 board-specific support | 46 | # AT91SAM9261 board-specific support |
46 | obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o | 47 | obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o |
48 | obj-$(CONFIG_MACH_AT91SAM9G10EK) += board-sam9261ek.o | ||
47 | 49 | ||
48 | # AT91SAM9263 board-specific support | 50 | # AT91SAM9263 board-specific support |
49 | obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o | 51 | obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 3acd7d7e6a42..4ecf37996c77 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
17 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <mach/cpu.h> | ||
19 | #include <mach/at91sam9261.h> | 20 | #include <mach/at91sam9261.h> |
20 | #include <mach/at91_pmc.h> | 21 | #include <mach/at91_pmc.h> |
21 | #include <mach/at91_rstc.h> | 22 | #include <mach/at91_rstc.h> |
@@ -30,7 +31,11 @@ static struct map_desc at91sam9261_io_desc[] __initdata = { | |||
30 | .pfn = __phys_to_pfn(AT91_BASE_SYS), | 31 | .pfn = __phys_to_pfn(AT91_BASE_SYS), |
31 | .length = SZ_16K, | 32 | .length = SZ_16K, |
32 | .type = MT_DEVICE, | 33 | .type = MT_DEVICE, |
33 | }, { | 34 | }, |
35 | }; | ||
36 | |||
37 | static struct map_desc at91sam9261_sram_desc[] __initdata = { | ||
38 | { | ||
34 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE, | 39 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE, |
35 | .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE), | 40 | .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE), |
36 | .length = AT91SAM9261_SRAM_SIZE, | 41 | .length = AT91SAM9261_SRAM_SIZE, |
@@ -38,6 +43,15 @@ static struct map_desc at91sam9261_io_desc[] __initdata = { | |||
38 | }, | 43 | }, |
39 | }; | 44 | }; |
40 | 45 | ||
46 | static struct map_desc at91sam9g10_sram_desc[] __initdata = { | ||
47 | { | ||
48 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9G10_SRAM_SIZE, | ||
49 | .pfn = __phys_to_pfn(AT91SAM9G10_SRAM_BASE), | ||
50 | .length = AT91SAM9G10_SRAM_SIZE, | ||
51 | .type = MT_DEVICE, | ||
52 | }, | ||
53 | }; | ||
54 | |||
41 | /* -------------------------------------------------------------------- | 55 | /* -------------------------------------------------------------------- |
42 | * Clocks | 56 | * Clocks |
43 | * -------------------------------------------------------------------- */ | 57 | * -------------------------------------------------------------------- */ |
@@ -263,6 +277,12 @@ void __init at91sam9261_initialize(unsigned long main_clock) | |||
263 | /* Map peripherals */ | 277 | /* Map peripherals */ |
264 | iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); | 278 | iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); |
265 | 279 | ||
280 | if (cpu_is_at91sam9g10()) | ||
281 | iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc)); | ||
282 | else | ||
283 | iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc)); | ||
284 | |||
285 | |||
266 | at91_arch_reset = at91sam9261_reset; | 286 | at91_arch_reset = at91sam9261_reset; |
267 | pm_power_off = at91sam9261_poweroff; | 287 | pm_power_off = at91sam9261_poweroff; |
268 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) | 288 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index d5266da55311..f9b19993a7a9 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -287,7 +287,11 @@ static void __init ek_add_device_ts(void) {} | |||
287 | */ | 287 | */ |
288 | static struct at73c213_board_info at73c213_data = { | 288 | static struct at73c213_board_info at73c213_data = { |
289 | .ssc_id = 1, | 289 | .ssc_id = 1, |
290 | #if defined(CONFIG_MACH_AT91SAM9261EK) | ||
290 | .shortname = "AT91SAM9261-EK external DAC", | 291 | .shortname = "AT91SAM9261-EK external DAC", |
292 | #else | ||
293 | .shortname = "AT91SAM9G10-EK external DAC", | ||
294 | #endif | ||
291 | }; | 295 | }; |
292 | 296 | ||
293 | #if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE) | 297 | #if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE) |
@@ -414,6 +418,9 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = { | |||
414 | .default_monspecs = &at91fb_default_stn_monspecs, | 418 | .default_monspecs = &at91fb_default_stn_monspecs, |
415 | .atmel_lcdfb_power_control = at91_lcdc_stn_power_control, | 419 | .atmel_lcdfb_power_control = at91_lcdc_stn_power_control, |
416 | .guard_time = 1, | 420 | .guard_time = 1, |
421 | #if defined(CONFIG_MACH_AT91SAM9G10EK) | ||
422 | .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB, | ||
423 | #endif | ||
417 | }; | 424 | }; |
418 | 425 | ||
419 | #else | 426 | #else |
@@ -467,6 +474,9 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = { | |||
467 | .default_monspecs = &at91fb_default_tft_monspecs, | 474 | .default_monspecs = &at91fb_default_tft_monspecs, |
468 | .atmel_lcdfb_power_control = at91_lcdc_tft_power_control, | 475 | .atmel_lcdfb_power_control = at91_lcdc_tft_power_control, |
469 | .guard_time = 1, | 476 | .guard_time = 1, |
477 | #if defined(CONFIG_MACH_AT91SAM9G10EK) | ||
478 | .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB, | ||
479 | #endif | ||
470 | }; | 480 | }; |
471 | #endif | 481 | #endif |
472 | 482 | ||
@@ -600,7 +610,11 @@ static void __init ek_board_init(void) | |||
600 | at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); | 610 | at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); |
601 | } | 611 | } |
602 | 612 | ||
613 | #if defined(CONFIG_MACH_AT91SAM9261EK) | ||
603 | MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") | 614 | MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") |
615 | #else | ||
616 | MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK") | ||
617 | #endif | ||
604 | /* Maintainer: Atmel */ | 618 | /* Maintainer: Atmel */ |
605 | .phys_io = AT91_BASE_SYS, | 619 | .phys_io = AT91_BASE_SYS, |
606 | .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, | 620 | .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index e26c4fe61fae..4028724d490d 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -201,7 +201,8 @@ static int at91_pm_verify_clocks(void) | |||
201 | pr_err("AT91: PM - Suspend-to-RAM with USB still active\n"); | 201 | pr_err("AT91: PM - Suspend-to-RAM with USB still active\n"); |
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263() || cpu_is_at91sam9g20()) { | 204 | } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263() |
205 | || cpu_is_at91sam9g20() || cpu_is_at91sam9g10()) { | ||
205 | if ((scsr & (AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP)) != 0) { | 206 | if ((scsr & (AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP)) != 0) { |
206 | pr_err("AT91: PM - Suspend-to-RAM with USB still active\n"); | 207 | pr_err("AT91: PM - Suspend-to-RAM with USB still active\n"); |
207 | return 0; | 208 | return 0; |