diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-10-29 10:28:07 -0400 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2008-01-25 02:31:41 -0500 |
commit | 438ff3f3cc33833206a48492e9d6674e4e82bed8 (patch) | |
tree | 5159b43453c6a86949798af889d3cb0200818b74 /arch/avr32/mach-at32ap | |
parent | 281ef58ccf62eaa6c4e4b7e4c0a3ee6b52e84e5b (diff) |
[AVR32] Add support for AT32AP7001 and AT32AP7002
These are derivatives of the AT32AP7000 chip, which means that most of
the code stays the same. Rename a few files, functions, definitions
and config symbols to reflect that they apply to all AP700x chips, and
exclude some platform devices from chips where they aren't present.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/mach-at32ap')
-rw-r--r-- | arch/avr32/mach-at32ap/Kconfig | 12 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/Makefile | 4 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c (renamed from arch/avr32/mach-at32ap/at32ap7000.c) | 14 |
3 files changed, 21 insertions, 9 deletions
diff --git a/arch/avr32/mach-at32ap/Kconfig b/arch/avr32/mach-at32ap/Kconfig index eb307838457b..a7bbcc82058e 100644 --- a/arch/avr32/mach-at32ap/Kconfig +++ b/arch/avr32/mach-at32ap/Kconfig | |||
@@ -3,9 +3,9 @@ if PLATFORM_AT32AP | |||
3 | menu "Atmel AVR32 AP options" | 3 | menu "Atmel AVR32 AP options" |
4 | 4 | ||
5 | choice | 5 | choice |
6 | prompt "AT32AP7000 static memory bus width" | 6 | prompt "AT32AP700x static memory bus width" |
7 | depends on CPU_AT32AP7000 | 7 | depends on CPU_AT32AP700X |
8 | default AP7000_16_BIT_SMC | 8 | default AP700X_16_BIT_SMC |
9 | help | 9 | help |
10 | Define the width of the AP7000 external static memory interface. | 10 | Define the width of the AP7000 external static memory interface. |
11 | This is used to determine how to mangle the address and/or data | 11 | This is used to determine how to mangle the address and/or data |
@@ -15,13 +15,13 @@ choice | |||
15 | width for all chip selects, excluding the flash (which is using | 15 | width for all chip selects, excluding the flash (which is using |
16 | raw access and is thus not affected by any of this.) | 16 | raw access and is thus not affected by any of this.) |
17 | 17 | ||
18 | config AP7000_32_BIT_SMC | 18 | config AP700X_32_BIT_SMC |
19 | bool "32 bit" | 19 | bool "32 bit" |
20 | 20 | ||
21 | config AP7000_16_BIT_SMC | 21 | config AP700X_16_BIT_SMC |
22 | bool "16 bit" | 22 | bool "16 bit" |
23 | 23 | ||
24 | config AP7000_8_BIT_SMC | 24 | config AP700X_8_BIT_SMC |
25 | bool "8 bit" | 25 | bool "8 bit" |
26 | 26 | ||
27 | endchoice | 27 | endchoice |
diff --git a/arch/avr32/mach-at32ap/Makefile b/arch/avr32/mach-at32ap/Makefile index a8b445046e3e..5e9f8217befc 100644 --- a/arch/avr32/mach-at32ap/Makefile +++ b/arch/avr32/mach-at32ap/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o | 1 | obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o |
2 | obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o | 2 | obj-$(CONFIG_CPU_AT32AP700X) += at32ap700x.o |
3 | obj-$(CONFIG_CPU_AT32AP7000) += time-tc.o | 3 | obj-$(CONFIG_CPU_AT32AP700X) += time-tc.o |
4 | obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o | 4 | obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o |
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap700x.c index 7c4388f4f17f..9386e1f82fb8 100644 --- a/arch/avr32/mach-at32ap/at32ap7000.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | 16 | ||
17 | #include <asm/arch/at32ap7000.h> | 17 | #include <asm/arch/at32ap700x.h> |
18 | #include <asm/arch/board.h> | 18 | #include <asm/arch/board.h> |
19 | #include <asm/arch/portmux.h> | 19 | #include <asm/arch/portmux.h> |
20 | 20 | ||
@@ -803,6 +803,7 @@ void __init at32_setup_serial_console(unsigned int usart_id) | |||
803 | * Ethernet | 803 | * Ethernet |
804 | * -------------------------------------------------------------------- */ | 804 | * -------------------------------------------------------------------- */ |
805 | 805 | ||
806 | #ifdef CONFIG_CPU_AT32AP7000 | ||
806 | static struct eth_platform_data macb0_data; | 807 | static struct eth_platform_data macb0_data; |
807 | static struct resource macb0_resource[] = { | 808 | static struct resource macb0_resource[] = { |
808 | PBMEM(0xfff01800), | 809 | PBMEM(0xfff01800), |
@@ -890,6 +891,7 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data) | |||
890 | 891 | ||
891 | return pdev; | 892 | return pdev; |
892 | } | 893 | } |
894 | #endif | ||
893 | 895 | ||
894 | /* -------------------------------------------------------------------- | 896 | /* -------------------------------------------------------------------- |
895 | * SPI | 897 | * SPI |
@@ -1064,6 +1066,7 @@ err_add_resources: | |||
1064 | /* -------------------------------------------------------------------- | 1066 | /* -------------------------------------------------------------------- |
1065 | * LCDC | 1067 | * LCDC |
1066 | * -------------------------------------------------------------------- */ | 1068 | * -------------------------------------------------------------------- */ |
1069 | #if defined(CONFIG_CPU_AT32AP7000) || defined(CONFIG_CPU_AT32AP7002) | ||
1067 | static struct atmel_lcdfb_info atmel_lcdfb0_data; | 1070 | static struct atmel_lcdfb_info atmel_lcdfb0_data; |
1068 | static struct resource atmel_lcdfb0_resource[] = { | 1071 | static struct resource atmel_lcdfb0_resource[] = { |
1069 | { | 1072 | { |
@@ -1179,6 +1182,7 @@ err_dup_modedb: | |||
1179 | kfree(monspecs); | 1182 | kfree(monspecs); |
1180 | return NULL; | 1183 | return NULL; |
1181 | } | 1184 | } |
1185 | #endif | ||
1182 | 1186 | ||
1183 | /* -------------------------------------------------------------------- | 1187 | /* -------------------------------------------------------------------- |
1184 | * SSC | 1188 | * SSC |
@@ -1332,6 +1336,7 @@ out_free_pdev: | |||
1332 | /* -------------------------------------------------------------------- | 1336 | /* -------------------------------------------------------------------- |
1333 | * IDE / CompactFlash | 1337 | * IDE / CompactFlash |
1334 | * -------------------------------------------------------------------- */ | 1338 | * -------------------------------------------------------------------- */ |
1339 | #if defined(CONFIG_CPU_AT32AP7000) || defined(CONFIG_CPU_AT32AP7001) | ||
1335 | static struct resource at32_smc_cs4_resource[] __initdata = { | 1340 | static struct resource at32_smc_cs4_resource[] __initdata = { |
1336 | { | 1341 | { |
1337 | .start = 0x04000000, | 1342 | .start = 0x04000000, |
@@ -1464,6 +1469,7 @@ fail: | |||
1464 | platform_device_put(pdev); | 1469 | platform_device_put(pdev); |
1465 | return NULL; | 1470 | return NULL; |
1466 | } | 1471 | } |
1472 | #endif | ||
1467 | 1473 | ||
1468 | /* -------------------------------------------------------------------- | 1474 | /* -------------------------------------------------------------------- |
1469 | * AC97C | 1475 | * AC97C |
@@ -1639,16 +1645,20 @@ struct clk *at32_clock_list[] = { | |||
1639 | &atmel_usart1_usart, | 1645 | &atmel_usart1_usart, |
1640 | &atmel_usart2_usart, | 1646 | &atmel_usart2_usart, |
1641 | &atmel_usart3_usart, | 1647 | &atmel_usart3_usart, |
1648 | #if defined(CONFIG_CPU_AT32AP7000) | ||
1642 | &macb0_hclk, | 1649 | &macb0_hclk, |
1643 | &macb0_pclk, | 1650 | &macb0_pclk, |
1644 | &macb1_hclk, | 1651 | &macb1_hclk, |
1645 | &macb1_pclk, | 1652 | &macb1_pclk, |
1653 | #endif | ||
1646 | &atmel_spi0_spi_clk, | 1654 | &atmel_spi0_spi_clk, |
1647 | &atmel_spi1_spi_clk, | 1655 | &atmel_spi1_spi_clk, |
1648 | &atmel_twi0_pclk, | 1656 | &atmel_twi0_pclk, |
1649 | &atmel_mci0_pclk, | 1657 | &atmel_mci0_pclk, |
1658 | #if defined(CONFIG_CPU_AT32AP7000) || defined(CONFIG_CPU_AT32AP7002) | ||
1650 | &atmel_lcdfb0_hck1, | 1659 | &atmel_lcdfb0_hck1, |
1651 | &atmel_lcdfb0_pixclk, | 1660 | &atmel_lcdfb0_pixclk, |
1661 | #endif | ||
1652 | &ssc0_pclk, | 1662 | &ssc0_pclk, |
1653 | &ssc1_pclk, | 1663 | &ssc1_pclk, |
1654 | &ssc2_pclk, | 1664 | &ssc2_pclk, |
@@ -1697,7 +1707,9 @@ void __init at32_clock_init(void) | |||
1697 | genclk_init_parent(&gclk2); | 1707 | genclk_init_parent(&gclk2); |
1698 | genclk_init_parent(&gclk3); | 1708 | genclk_init_parent(&gclk3); |
1699 | genclk_init_parent(&gclk4); | 1709 | genclk_init_parent(&gclk4); |
1710 | #if defined(CONFIG_CPU_AT32AP7000) || defined(CONFIG_CPU_AT32AP7002) | ||
1700 | genclk_init_parent(&atmel_lcdfb0_pixclk); | 1711 | genclk_init_parent(&atmel_lcdfb0_pixclk); |
1712 | #endif | ||
1701 | genclk_init_parent(&abdac0_sample_clk); | 1713 | genclk_init_parent(&abdac0_sample_clk); |
1702 | 1714 | ||
1703 | /* | 1715 | /* |