From 438ff3f3cc33833206a48492e9d6674e4e82bed8 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Mon, 29 Oct 2007 15:28:07 +0100 Subject: [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 --- arch/avr32/Kconfig | 21 +- arch/avr32/Makefile | 2 +- arch/avr32/boards/atngw100/setup.c | 2 +- arch/avr32/configs/atngw100_defconfig | 9 +- arch/avr32/configs/atstk1002_defconfig | 8 +- arch/avr32/mach-at32ap/Kconfig | 12 +- arch/avr32/mach-at32ap/Makefile | 4 +- arch/avr32/mach-at32ap/at32ap7000.c | 1730 ------------------------------- arch/avr32/mach-at32ap/at32ap700x.c | 1742 ++++++++++++++++++++++++++++++++ 9 files changed, 1780 insertions(+), 1750 deletions(-) delete mode 100644 arch/avr32/mach-at32ap/at32ap7000.c create mode 100644 arch/avr32/mach-at32ap/at32ap700x.c (limited to 'arch') diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 767a19cfa42..e37e6b92658 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig @@ -84,13 +84,26 @@ config PLATFORM_AT32AP select MMU select PERFORMANCE_COUNTERS +config CPU_AT32AP700X + bool + select PLATFORM_AT32AP + choice prompt "AVR32 CPU type" default CPU_AT32AP7000 config CPU_AT32AP7000 bool "AT32AP7000" - select PLATFORM_AT32AP + select CPU_AT32AP700X + +config CPU_AT32AP7001 + bool "AT32AP7001" + select CPU_AT32AP700X + +config CPU_AT32AP7002 + bool "AT32AP7002" + select CPU_AT32AP700X + endchoice # @@ -126,15 +139,15 @@ source "arch/avr32/mach-at32ap/Kconfig" config LOAD_ADDRESS hex - default 0x10000000 if LOADER_U_BOOT=y && CPU_AT32AP7000=y + default 0x10000000 if LOADER_U_BOOT=y && CPU_AT32AP700X=y config ENTRY_ADDRESS hex - default 0x90000000 if LOADER_U_BOOT=y && CPU_AT32AP7000=y + default 0x90000000 if LOADER_U_BOOT=y && CPU_AT32AP700X=y config PHYS_OFFSET hex - default 0x10000000 if CPU_AT32AP7000=y + default 0x10000000 if CPU_AT32AP700X=y source "kernel/Kconfig.preempt" diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile index f75d52cd2a4..17a3529341d 100644 --- a/arch/avr32/Makefile +++ b/arch/avr32/Makefile @@ -16,7 +16,7 @@ KBUILD_AFLAGS += -mrelax -mno-pic CFLAGS_MODULE += -mno-relax LDFLAGS_vmlinux += --relax -cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 +cpuflags-$(CONFIG_PLATFORM_AT32AP) += -march=ap KBUILD_CFLAGS += $(cpuflags-y) KBUILD_AFLAGS += $(cpuflags-y) diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c index 52987c81d66..a398be28496 100644 --- a/arch/avr32/boards/atngw100/setup.c +++ b/arch/avr32/boards/atngw100/setup.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig index b799a68ffd9..374c17bcc05 100644 --- a/arch/avr32/configs/atngw100_defconfig +++ b/arch/avr32/configs/atngw100_defconfig @@ -111,7 +111,10 @@ CONFIG_SUBARCH_AVR32B=y CONFIG_MMU=y CONFIG_PERFORMANCE_COUNTERS=y CONFIG_PLATFORM_AT32AP=y +CONFIG_CPU_AT32AP700X=y CONFIG_CPU_AT32AP7000=y +# CONFIG_CPU_AT32AP7001 is not set +# CONFIG_CPU_AT32AP7002 is not set # CONFIG_BOARD_ATSTK1000 is not set CONFIG_BOARD_ATNGW100=y CONFIG_LOADER_U_BOOT=y @@ -119,9 +122,9 @@ CONFIG_LOADER_U_BOOT=y # # Atmel AVR32 AP options # -# CONFIG_AP7000_32_BIT_SMC is not set -CONFIG_AP7000_16_BIT_SMC=y -# CONFIG_AP7000_8_BIT_SMC is not set +# CONFIG_AP700X_32_BIT_SMC is not set +CONFIG_AP700X_16_BIT_SMC=y +# CONFIG_AP700X_8_BIT_SMC is not set CONFIG_LOAD_ADDRESS=0x10000000 CONFIG_ENTRY_ADDRESS=0x90000000 CONFIG_PHYS_OFFSET=0x10000000 diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig index 3b977fdbaa7..7614c5465cd 100644 --- a/arch/avr32/configs/atstk1002_defconfig +++ b/arch/avr32/configs/atstk1002_defconfig @@ -114,6 +114,8 @@ CONFIG_MMU=y CONFIG_PERFORMANCE_COUNTERS=y CONFIG_PLATFORM_AT32AP=y CONFIG_CPU_AT32AP7000=y +# CONFIG_CPU_AT32AP7001 is not set +# CONFIG_CPU_AT32AP7002 is not set CONFIG_BOARD_ATSTK1002=y CONFIG_BOARD_ATSTK1000=y # CONFIG_BOARD_ATNGW100 is not set @@ -122,9 +124,9 @@ CONFIG_LOADER_U_BOOT=y # # Atmel AVR32 AP options # -# CONFIG_AP7000_32_BIT_SMC is not set -CONFIG_AP7000_16_BIT_SMC=y -# CONFIG_AP7000_8_BIT_SMC is not set +# CONFIG_AP700X_32_BIT_SMC is not set +CONFIG_AP700X_16_BIT_SMC=y +# CONFIG_AP700X_8_BIT_SMC is not set CONFIG_LOAD_ADDRESS=0x10000000 CONFIG_ENTRY_ADDRESS=0x90000000 CONFIG_PHYS_OFFSET=0x10000000 diff --git a/arch/avr32/mach-at32ap/Kconfig b/arch/avr32/mach-at32ap/Kconfig index eb307838457..a7bbcc82058 100644 --- a/arch/avr32/mach-at32ap/Kconfig +++ b/arch/avr32/mach-at32ap/Kconfig @@ -3,9 +3,9 @@ if PLATFORM_AT32AP menu "Atmel AVR32 AP options" choice - prompt "AT32AP7000 static memory bus width" - depends on CPU_AT32AP7000 - default AP7000_16_BIT_SMC + prompt "AT32AP700x static memory bus width" + depends on CPU_AT32AP700X + default AP700X_16_BIT_SMC help Define the width of the AP7000 external static memory interface. This is used to determine how to mangle the address and/or data @@ -15,13 +15,13 @@ choice width for all chip selects, excluding the flash (which is using raw access and is thus not affected by any of this.) -config AP7000_32_BIT_SMC +config AP700X_32_BIT_SMC bool "32 bit" -config AP7000_16_BIT_SMC +config AP700X_16_BIT_SMC bool "16 bit" -config AP7000_8_BIT_SMC +config AP700X_8_BIT_SMC bool "8 bit" endchoice diff --git a/arch/avr32/mach-at32ap/Makefile b/arch/avr32/mach-at32ap/Makefile index a8b445046e3..5e9f8217bef 100644 --- a/arch/avr32/mach-at32ap/Makefile +++ b/arch/avr32/mach-at32ap/Makefile @@ -1,4 +1,4 @@ obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o -obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o -obj-$(CONFIG_CPU_AT32AP7000) += time-tc.o +obj-$(CONFIG_CPU_AT32AP700X) += at32ap700x.o +obj-$(CONFIG_CPU_AT32AP700X) += time-tc.o obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c deleted file mode 100644 index 7c4388f4f17..00000000000 --- a/arch/avr32/mach-at32ap/at32ap7000.c +++ /dev/null @@ -1,1730 +0,0 @@ -/* - * Copyright (C) 2005-2006 Atmel Corporation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include