X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/4a605b0d93c7e0b7c5d513eb031db984f98df9a2..a53df816428b832a242bfe3a921a25a3ff91508b:/target/linux/avr32/patches/100-git_sync.patch diff --git a/target/linux/avr32/patches/100-git_sync.patch b/target/linux/avr32/patches/100-git_sync.patch index bfbc8c1d2..9bab06019 100644 --- a/target/linux/avr32/patches/100-git_sync.patch +++ b/target/linux/avr32/patches/100-git_sync.patch @@ -1,414 +1,3 @@ - Documentation/kernel-parameters.txt | 5 + - MAINTAINERS | 6 + - Makefile | 2 +- - arch/arm/mach-at91/at91sam9261_devices.c | 14 + - arch/arm/mach-at91/at91sam9rl_devices.c | 14 + - arch/arm/mach-at91/board-sam9261ek.c | 1 + - arch/arm/mach-at91/board-sam9263ek.c | 1 + - arch/avr32/Kconfig | 54 +- - arch/avr32/Kconfig.debug | 10 - - arch/avr32/Makefile | 4 +- - arch/avr32/boards/atngw100/Kconfig | 12 + - arch/avr32/boards/atngw100/setup.c | 14 +- - arch/avr32/boards/atstk1000/Kconfig | 101 ++- - arch/avr32/boards/atstk1000/Makefile | 2 + - arch/avr32/boards/atstk1000/atstk1000.h | 2 + - arch/avr32/boards/atstk1000/atstk1002.c | 129 +-- - arch/avr32/boards/atstk1000/atstk1003.c | 181 +++ - arch/avr32/boards/atstk1000/atstk1004.c | 152 +++ - arch/avr32/boards/atstk1000/setup.c | 64 + - arch/avr32/configs/atngw100_defconfig | 423 +++++--- - arch/avr32/configs/atstk1002_defconfig | 661 ++++++++--- - arch/avr32/configs/atstk1003_defconfig | 1032 ++++++++++++++++ - arch/avr32/configs/atstk1004_defconfig | 627 ++++++++++ - arch/avr32/drivers/Makefile | 1 + - arch/avr32/drivers/dw-dmac.c | 761 ++++++++++++ - arch/avr32/drivers/dw-dmac.h | 42 + - arch/avr32/kernel/Makefile | 4 +- - arch/avr32/kernel/cpu.c | 96 ++- - arch/avr32/kernel/dma-controller.c | 34 + - arch/avr32/kernel/irq.c | 11 + - arch/avr32/kernel/kprobes.c | 5 +- - arch/avr32/kernel/nmi_debug.c | 82 ++ - arch/avr32/kernel/ocd.c | 163 +++ - arch/avr32/kernel/process.c | 5 +- - arch/avr32/kernel/ptrace.c | 5 +- - arch/avr32/kernel/setup.c | 2 + - arch/avr32/kernel/signal.c | 7 - - arch/avr32/kernel/traps.c | 21 +- - arch/avr32/mach-at32ap/Kconfig | 19 +- - arch/avr32/mach-at32ap/Makefile | 5 +- - arch/avr32/mach-at32ap/at32ap7000.c | 1730 -------------------------- - arch/avr32/mach-at32ap/at32ap700x.c | 1809 ++++++++++++++++++++++++++++ - arch/avr32/mach-at32ap/extint.c | 59 +- - arch/avr32/mach-at32ap/gpio-dev.c | 573 +++++++++ - arch/avr32/mach-at32ap/pio.c | 76 ++ - arch/avr32/mm/dma-coherent.c | 7 + - arch/avr32/mm/tlb.c | 2 +- - arch/avr32/oprofile/Makefile | 8 + - arch/avr32/oprofile/op_model_avr32.c | 235 ++++ - drivers/i2c/busses/Kconfig | 8 + - drivers/i2c/busses/Makefile | 1 + - drivers/i2c/busses/i2c-atmeltwi.c | 436 +++++++ - drivers/i2c/busses/i2c-atmeltwi.h | 117 ++ - drivers/leds/Kconfig | 7 + - drivers/leds/Makefile | 1 + - drivers/leds/leds-atmel-pwm.c | 155 +++ - drivers/misc/Kconfig | 9 + - drivers/misc/Makefile | 1 + - drivers/misc/atmel_pwm.c | 409 +++++++ - drivers/mmc/host/Kconfig | 10 + - drivers/mmc/host/Makefile | 1 + - drivers/mmc/host/atmel-mci.c | 1176 ++++++++++++++++++ - drivers/mmc/host/atmel-mci.h | 192 +++ - drivers/mtd/chips/cfi_cmdset_0001.c | 43 + - drivers/mtd/chips/cfi_cmdset_0002.c | 6 +- - drivers/pcmcia/Kconfig | 7 + - drivers/pcmcia/Makefile | 1 + - drivers/pcmcia/at32_cf.c | 533 ++++++++ - drivers/serial/Kconfig | 15 + - drivers/serial/atmel_serial.c | 884 +++++++++++--- - drivers/spi/atmel_spi.c | 173 ++- - drivers/video/atmel_lcdfb.c | 149 +++- - drivers/video/backlight/Kconfig | 13 + - drivers/video/console/Kconfig | 2 +- - drivers/watchdog/Kconfig | 2 +- - include/asm-avr32/arch-at32ap/at32ap7000.h | 35 - - include/asm-avr32/arch-at32ap/at32ap700x.h | 35 + - include/asm-avr32/arch-at32ap/board.h | 11 +- - include/asm-avr32/arch-at32ap/cpu.h | 2 +- - include/asm-avr32/arch-at32ap/io.h | 4 +- - include/asm-avr32/arch-at32ap/portmux.h | 12 + - include/asm-avr32/dma-controller.h | 166 +++ - include/asm-avr32/irq.h | 5 + - include/asm-avr32/kdebug.h | 1 + - include/asm-avr32/ocd.h | 5 + - include/asm-avr32/processor.h | 14 + - include/asm-avr32/ptrace.h | 13 +- - include/asm-avr32/thread_info.h | 1 + - include/linux/atmel_pwm.h | 70 ++ - include/video/atmel_lcdc.h | 25 +- - kernel/ptrace.c | 2 + - sound/Kconfig | 2 + - sound/Makefile | 2 +- - sound/avr32/Kconfig | 11 + - sound/avr32/Makefile | 3 + - sound/avr32/ac97c.c | 914 ++++++++++++++ - sound/avr32/ac97c.h | 71 ++ - sound/oss/Kconfig | 4 + - sound/oss/Makefile | 1 + - sound/oss/at32_abdac.c | 722 +++++++++++ - sound/oss/at32_abdac.h | 59 + - 101 files changed, 13294 insertions(+), 2520 deletions(-) - create mode 100644 arch/avr32/boards/atngw100/Kconfig - create mode 100644 arch/avr32/boards/atstk1000/atstk1003.c - create mode 100644 arch/avr32/boards/atstk1000/atstk1004.c - create mode 100644 arch/avr32/configs/atstk1003_defconfig - create mode 100644 arch/avr32/configs/atstk1004_defconfig - create mode 100644 arch/avr32/drivers/Makefile - create mode 100644 arch/avr32/drivers/dw-dmac.c - create mode 100644 arch/avr32/drivers/dw-dmac.h - create mode 100644 arch/avr32/kernel/dma-controller.c - create mode 100644 arch/avr32/kernel/nmi_debug.c - create mode 100644 arch/avr32/kernel/ocd.c - delete mode 100644 arch/avr32/mach-at32ap/at32ap7000.c - create mode 100644 arch/avr32/mach-at32ap/at32ap700x.c - create mode 100644 arch/avr32/mach-at32ap/gpio-dev.c - create mode 100644 arch/avr32/oprofile/Makefile - create mode 100644 arch/avr32/oprofile/op_model_avr32.c - create mode 100644 drivers/i2c/busses/i2c-atmeltwi.c - create mode 100644 drivers/i2c/busses/i2c-atmeltwi.h - create mode 100644 drivers/leds/leds-atmel-pwm.c - create mode 100644 drivers/misc/atmel_pwm.c - create mode 100644 drivers/mmc/host/atmel-mci.c - create mode 100644 drivers/mmc/host/atmel-mci.h - create mode 100644 drivers/pcmcia/at32_cf.c - delete mode 100644 include/asm-avr32/arch-at32ap/at32ap7000.h - create mode 100644 include/asm-avr32/arch-at32ap/at32ap700x.h - create mode 100644 include/asm-avr32/dma-controller.h - create mode 100644 include/linux/atmel_pwm.h - create mode 100644 sound/avr32/Kconfig - create mode 100644 sound/avr32/Makefile - create mode 100644 sound/avr32/ac97c.c - create mode 100644 sound/avr32/ac97c.h - create mode 100644 sound/oss/at32_abdac.c - create mode 100644 sound/oss/at32_abdac.h - -diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index c417877..17fc60e 100644 ---- a/Documentation/kernel-parameters.txt -+++ b/Documentation/kernel-parameters.txt -@@ -34,6 +34,7 @@ parameter is applicable: - ALSA ALSA sound support is enabled. - APIC APIC support is enabled. - APM Advanced Power Management support is enabled. -+ AVR32 AVR32 architecture is enabled. - AX25 Appropriate AX.25 support is enabled. - BLACKFIN Blackfin architecture is enabled. - DRM Direct Rendering Management support is enabled. -@@ -1123,6 +1124,10 @@ and is between 256 and 4096 characters. It is defined in the file - of returning the full 64-bit number. - The default is to return 64-bit inode numbers. - -+ nmi_debug= [KNL,AVR32] Specify one or more actions to take -+ when a NMI is triggered. -+ Format: [state][,regs][,debounce][,die] -+ - nmi_watchdog= [KNL,BUGS=X86-32] Debugging features for SMP kernels - - no387 [BUGS=X86-32] Tells the kernel to use the 387 maths -diff --git a/MAINTAINERS b/MAINTAINERS -index 2340cfb..e349a9e 100644 ---- a/MAINTAINERS -+++ b/MAINTAINERS -@@ -671,6 +671,12 @@ W: http://www.atmel.com/products/AT91/ - W: http://www.at91.com/ - S: Maintained - -+ATMEL AT91 / AT32 SERIAL DRIVER -+P: Haavard Skinnemoen -+M: hskinnemoen@atmel.com -+L: linux-kernel@vger.kernel.org -+S: Supported -+ - ATMEL LCDFB DRIVER - P: Nicolas Ferre - M: nicolas.ferre@atmel.com -diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c -index 64979a9..bfa3d18 100644 ---- a/arch/arm/mach-at91/at91sam9261_devices.c -+++ b/arch/arm/mach-at91/at91sam9261_devices.c -@@ -530,6 +530,20 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) - at91_set_B_periph(AT91_PIN_PB27, 0); /* LCDD22 */ - at91_set_B_periph(AT91_PIN_PB28, 0); /* LCDD23 */ - -+#ifdef CONFIG_FB_INTSRAM -+ { -+ void __iomem *fb; -+ struct resource *fb_res = &lcdc_resources[2]; -+ size_t fb_len = fb_res->end - fb_res->start + 1; -+ -+ fb = ioremap_writecombine(fb_res->start, fb_len); -+ if (fb) { -+ memset(fb, 0, fb_len); -+ iounmap(fb, fb_len); -+ } -+ } -+#endif -+ - lcdc_data = *data; - platform_device_register(&at91_lcdc_device); - } -diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c -index 2bd60a3..84ee029 100644 ---- a/arch/arm/mach-at91/at91sam9rl_devices.c -+++ b/arch/arm/mach-at91/at91sam9rl_devices.c -@@ -375,6 +375,20 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) - at91_set_B_periph(AT91_PIN_PC24, 0); /* LCDD22 */ - at91_set_B_periph(AT91_PIN_PC25, 0); /* LCDD23 */ - -+#ifdef CONFIG_FB_INTSRAM -+ { -+ void __iomem *fb; -+ struct resource *fb_res = &lcdc_resources[2]; -+ size_t fb_len = fb_res->end - fb_res->start + 1; -+ -+ fb = ioremap_writecombine(fb_res->start, fb_len); -+ if (fb) { -+ memset(fb, 0, fb_len); -+ iounmap(fb, fb_len); -+ } -+ } -+#endif -+ - lcdc_data = *data; - platform_device_register(&at91_lcdc_device); - } -diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c -index 550ae59..0d275bb 100644 ---- a/arch/arm/mach-at91/board-sam9261ek.c -+++ b/arch/arm/mach-at91/board-sam9261ek.c -@@ -322,6 +322,7 @@ static void at91_lcdc_power_control(int on) - - /* Driver datas */ - static struct atmel_lcdfb_info __initdata ek_lcdc_data = { -+ .lcdcon_is_backlight = true, - .default_bpp = 16, - .default_dmacon = ATMEL_LCDC_DMAEN, - .default_lcdcon2 = AT91SAM9261_DEFAULT_LCDCON2, -diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c -index ab9dcc0..39bded2 100644 ---- a/arch/arm/mach-at91/board-sam9263ek.c -+++ b/arch/arm/mach-at91/board-sam9263ek.c -@@ -250,6 +250,7 @@ static void at91_lcdc_power_control(int on) - - /* Driver datas */ - static struct atmel_lcdfb_info __initdata ek_lcdc_data = { -+ .lcdcon_is_backlight = true, - .default_bpp = 16, - .default_dmacon = ATMEL_LCDC_DMAEN, - .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2, -diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig -index b77abce..3f09270 100644 ---- a/arch/avr32/Kconfig -+++ b/arch/avr32/Kconfig -@@ -54,6 +54,9 @@ config ARCH_HAS_ILOG2_U32 - config ARCH_HAS_ILOG2_U64 - def_bool n - -+config ARCH_SUPPORTS_OPROFILE -+ def_bool y -+ - config GENERIC_HWEIGHT - def_bool y - -@@ -81,19 +84,23 @@ config PLATFORM_AT32AP - select MMU - select PERFORMANCE_COUNTERS - --choice -- prompt "AVR32 CPU type" -- default CPU_AT32AP7000 -+# -+# CPU types -+# - --config CPU_AT32AP7000 -- bool "AT32AP7000" -+# AP7000 derivatives -+config CPU_AT32AP700X -+ bool - select PLATFORM_AT32AP --endchoice -- --# --# CPU Daughterboards for ATSTK1000 --config BOARD_ATSTK1002 -+config CPU_AT32AP7000 -+ bool -+ select CPU_AT32AP700X -+config CPU_AT32AP7001 -+ bool -+ select CPU_AT32AP700X -+config CPU_AT32AP7002 - bool -+ select CPU_AT32AP700X - - choice - prompt "AVR32 board type" -@@ -101,15 +108,18 @@ choice - - config BOARD_ATSTK1000 - bool "ATSTK1000 evaluation board" -- select BOARD_ATSTK1002 if CPU_AT32AP7000 - - config BOARD_ATNGW100 - bool "ATNGW100 Network Gateway" -+ select CPU_AT32AP7000 - endchoice - - if BOARD_ATSTK1000 - source "arch/avr32/boards/atstk1000/Kconfig" - endif -+if BOARD_ATNGW100 -+source "arch/avr32/boards/atngw100/Kconfig" -+endif - - choice - prompt "Boot loader type" -@@ -123,15 +133,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" - -@@ -163,6 +173,20 @@ config OWNERSHIP_TRACE - enabling Nexus-compliant debuggers to keep track of the PID of the - currently executing task. - -+config NMI_DEBUGGING -+ bool "NMI Debugging" -+ default n -+ help -+ Say Y here and pass the nmi_debug command-line parameter to -+ the kernel to turn on NMI debugging. Depending on the value -+ of the nmi_debug option, various pieces of information will -+ be dumped to the console when a Non-Maskable Interrupt -+ happens. -+ -+config DW_DMAC -+ tristate "Synopsys DesignWare DMA Controller support" -+ default y if CPU_AT32AP7000 -+ - # FPU emulation goes here - - source "kernel/Kconfig.hz" -@@ -219,6 +243,8 @@ source "drivers/Kconfig" - - source "fs/Kconfig" - -+source "kernel/Kconfig.instrumentation" -+ - source "arch/avr32/Kconfig.debug" - - source "security/Kconfig" -diff --git a/arch/avr32/Kconfig.debug b/arch/avr32/Kconfig.debug -index 64ace00..2283933 100644 ---- a/arch/avr32/Kconfig.debug -+++ b/arch/avr32/Kconfig.debug -@@ -6,14 +6,4 @@ config TRACE_IRQFLAGS_SUPPORT - - source "lib/Kconfig.debug" - --config KPROBES -- bool "Kprobes" -- depends on DEBUG_KERNEL -- help -- Kprobes allows you to trap at almost any kernel address and -- execute a callback function. register_kprobe() establishes -- a probepoint and specifies the callback. Kprobes is useful -- for kernel debugging, non-intrusive instrumentation and testing. -- If in doubt, say "N". -- - endmenu -diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile -index 8791864..2d7bacd 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) -@@ -31,6 +31,8 @@ core-$(CONFIG_BOARD_ATNGW100) += arch/avr32/boards/atngw100/ - core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/ - core-y += arch/avr32/kernel/ - core-y += arch/avr32/mm/ -+drivers-$(CONFIG_OPROFILE) += arch/avr32/oprofile/ -+drivers-y += arch/avr32/drivers/ - libs-y += arch/avr32/lib/ - - archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap -diff --git a/arch/avr32/boards/atngw100/Kconfig b/arch/avr32/boards/atngw100/Kconfig -new file mode 100644 -index 0000000..5d922df --- /dev/null +++ b/arch/avr32/boards/atngw100/Kconfig @@ -0,0 +1,12 @@ @@ -424,20 +13,29 @@ index 0000000..5d922df + + Choose 'Y' here if you're having i2c-related problems and + want to rule out the i2c bus driver. -diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c -index 52987c8..383b825 100644 --- a/arch/avr32/boards/atngw100/setup.c +++ b/arch/avr32/boards/atngw100/setup.c -@@ -20,7 +20,7 @@ - #include - #include - --#include -+#include - #include +@@ -25,6 +25,13 @@ #include #include -@@ -42,6 +42,11 @@ static struct spi_board_info spi0_board_info[] __initdata = { + ++/* Oscillator frequencies. These are board-specific */ ++unsigned long at32_board_osc_rates[3] = { ++ [0] = 32768, /* 32.768 kHz on RTC osc */ ++ [1] = 20000000, /* 20 MHz on osc0 */ ++ [2] = 12000000, /* 12 MHz on osc1 */ ++}; ++ + /* Initialized by bootloader-specific startup code. */ + struct tag *bootloader_tags __initdata; + +@@ -37,11 +44,16 @@ + static struct spi_board_info spi0_board_info[] __initdata = { + { + .modalias = "mtd_dataflash", +- .max_speed_hz = 10000000, ++ .max_speed_hz = 8000000, + .chip_select = 0, }, }; @@ -449,7 +47,7 @@ index 52987c8..383b825 100644 /* * The next two functions should go away as the boot loader is * supposed to initialize the macb address registers with a valid -@@ -124,6 +129,7 @@ static struct platform_device ngw_gpio_leds = { +@@ -124,6 +136,7 @@ } }; @@ -457,7 +55,7 @@ index 52987c8..383b825 100644 static struct i2c_gpio_platform_data i2c_gpio_data = { .sda_pin = GPIO_PIN_PA(6), .scl_pin = GPIO_PIN_PA(7), -@@ -139,6 +145,7 @@ static struct platform_device i2c_gpio_device = { +@@ -139,6 +152,7 @@ .platform_data = &i2c_gpio_data, }, }; @@ -465,7 +63,7 @@ index 52987c8..383b825 100644 static int __init atngw100_init(void) { -@@ -157,6 +164,7 @@ static int __init atngw100_init(void) +@@ -157,6 +171,7 @@ set_hw_addr(at32_add_device_eth(1, ð_data[1])); at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); @@ -473,7 +71,7 @@ index 52987c8..383b825 100644 at32_add_device_usba(0, NULL); for (i = 0; i < ARRAY_SIZE(ngw_leds); i++) { -@@ -165,11 +173,15 @@ static int __init atngw100_init(void) +@@ -165,11 +180,15 @@ } platform_device_register(&ngw_gpio_leds); @@ -484,136 +82,288 @@ index 52987c8..383b825 100644 AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); platform_device_register(&i2c_gpio_device); +#else -+ at32_add_device_twi(0); ++ at32_add_device_twi(0, NULL, 0); +#endif return 0; } -diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig -index 718578f..56a8d8e 100644 ---- a/arch/avr32/boards/atstk1000/Kconfig -+++ b/arch/avr32/boards/atstk1000/Kconfig -@@ -1,34 +1,53 @@ - # STK1000 customization +--- a/arch/avr32/boards/atstk1000/atstk1002.c ++++ b/arch/avr32/boards/atstk1000/atstk1002.c +@@ -1,7 +1,7 @@ + /* +- * ATSTK1002 daughterboard-specific init code ++ * ATSTK1002/ATSTK1006 daughterboard-specific init code + * +- * Copyright (C) 2005-2006 Atmel Corporation ++ * Copyright (C) 2005-2007 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 +@@ -28,6 +28,80 @@ --if BOARD_ATSTK1002 -+if BOARD_ATSTK1000 + #include "atstk1000.h" --config BOARD_ATSTK1002_CUSTOM -- bool "Non-default STK-1002 jumper settings" -+choice -+ prompt "ATSTK1000 CPU daughterboard type" -+ default BOARD_ATSTK1002 ++/* Oscillator frequencies. These are board specific */ ++unsigned long at32_board_osc_rates[3] = { ++ [0] = 32768, /* 32.768 kHz on RTC osc */ ++ [1] = 20000000, /* 20 MHz on osc0 */ ++ [2] = 12000000, /* 12 MHz on osc1 */ ++}; + -+config BOARD_ATSTK1002 -+ bool "ATSTK1002" -+ select CPU_AT32AP7000 ++/* ++ * The ATSTK1006 daughterboard is very similar to the ATSTK1002. Both ++ * have the AT32AP7000 chip on board; the difference is that the ++ * STK1006 has 128 MB SDRAM (the STK1002 uses the 8 MB SDRAM chip on ++ * the STK1000 motherboard) and 256 MB NAND flash (the STK1002 has ++ * none.) ++ * ++ * The RAM difference is handled by the boot loader, so the only ++ * difference we end up handling here is the NAND flash. ++ */ ++#ifdef CONFIG_BOARD_ATSTK1006 ++#include ++#include + -+config BOARD_ATSTK1003 -+ bool "ATSTK1003" -+ select CPU_AT32AP7001 ++static struct smc_timing nand_timing __initdata = { ++ .ncs_read_setup = 0, ++ .nrd_setup = 10, ++ .ncs_write_setup = 0, ++ .nwe_setup = 10, + -+config BOARD_ATSTK1004 -+ bool "ATSTK1004" -+ select CPU_AT32AP7002 ++ .ncs_read_pulse = 30, ++ .nrd_pulse = 15, ++ .ncs_write_pulse = 30, ++ .nwe_pulse = 15, + -+endchoice ++ .read_cycle = 30, ++ .write_cycle = 30, ++ ++ .ncs_read_recover = 0, ++ .nrd_recover = 15, ++ .ncs_write_recover = 0, ++ /* WE# high -> RE# low min 60 ns */ ++ .nwe_recover = 50, ++}; + ++static struct smc_config nand_config __initdata = { ++ .bus_width = 1, ++ .nrd_controlled = 1, ++ .nwe_controlled = 1, ++ .nwait_mode = 0, ++ .byte_write = 0, ++ .tdf_cycles = 2, ++ .tdf_mode = 0, ++}; + -+config BOARD_ATSTK100X_CUSTOM -+ bool "Non-default STK1002/STK1003/STK1004 jumper settings" - help - You will normally leave the jumpers on the CPU card at their - default settings. If you need to use certain peripherals, - you will need to change some of those jumpers. ++static struct mtd_partition nand_partitions[] = { ++ { ++ .name = "main", ++ .offset = 0x00000000, ++ .size = MTDPART_SIZ_FULL, ++ }, ++}; ++ ++static struct mtd_partition *nand_part_info(int size, int *num_partitions) ++{ ++ *num_partitions = ARRAY_SIZE(nand_partitions); ++ return nand_partitions; ++} ++ ++static struct atmel_nand_data atstk1006_nand_data __initdata = { ++ .cle = 21, ++ .ale = 22, ++ .rdy_pin = GPIO_PIN_PB(30), ++ .enable_pin = GPIO_PIN_PB(29), ++ .partition_info = nand_part_info, ++}; ++#endif --if BOARD_ATSTK1002_CUSTOM -+if BOARD_ATSTK100X_CUSTOM + struct eth_addr { + u8 addr[6]; +@@ -83,6 +157,19 @@ + } }; + #endif --config BOARD_ATSTK1002_SW1_CUSTOM -+config BOARD_ATSTK100X_SW1_CUSTOM - bool "SW1: use SSC1 (not SPI0)" - help - This also prevents using the external DAC as an audio interface, - and means you can't initialize the on-board QVGA display. ++static struct cf_platform_data __initdata cf0_data = { ++#ifdef CONFIG_BOARD_ATSTK1000_CF_HACKS ++ .detect_pin = CONFIG_BOARD_ATSTK1000_CF_DETECT_PIN, ++ .reset_pin = CONFIG_BOARD_ATSTK1000_CF_RESET_PIN, ++#else ++ .detect_pin = GPIO_PIN_NONE, ++ .reset_pin = GPIO_PIN_NONE, ++#endif ++ .vcc_pin = GPIO_PIN_NONE, ++ .ready_pin = GPIO_PIN_PB(27), ++ .cs = 4, ++}; ++ + /* + * The next two functions should go away as the boot loader is + * supposed to initialize the macb address registers with a valid +@@ -212,6 +299,12 @@ --config BOARD_ATSTK1002_SW2_CUSTOM -+config BOARD_ATSTK100X_SW2_CUSTOM - bool "SW2: use IRDA or TIMER0 (not UART-A, MMC/SD, and PS2-A)" - help - If you change this you'll want an updated boot loader putting - the console on UART-C not UART-A. + at32_add_system_devices(); --config BOARD_ATSTK1002_SW3_CUSTOM -+config BOARD_ATSTK100X_SW3_CUSTOM - bool "SW3: use TIMER1 (not SSC0 and GCLK)" - help - This also prevents using the external DAC as an audio interface. ++#ifdef CONFIG_BOARD_ATSTK1006 ++ smc_set_timing(&nand_config, &nand_timing); ++ smc_set_configuration(3, &nand_config); ++ at32_add_device_nand(0, &atstk1006_nand_data); ++#endif ++ + #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM + at32_add_device_usart(1); + #else +@@ -228,16 +321,30 @@ + #ifdef CONFIG_BOARD_ATSTK100X_SPI1 + at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); + #endif ++ at32_add_device_twi(0, NULL, 0); ++#ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM ++ at32_add_device_mci(0, NULL); ++#endif + #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM + set_hw_addr(at32_add_device_eth(1, ð_data[1])); + #else + at32_add_device_lcdc(0, &atstk1000_lcdc_data, +- fbmem_start, fbmem_size); ++ fbmem_start, fbmem_size, 0); + #endif + at32_add_device_usba(0, NULL); ++#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_AC97 ++ at32_add_device_ac97c(0); ++#else ++ at32_add_device_abdac(0); ++#endif + #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM + at32_add_device_ssc(0, ATMEL_SSC_TX); + #endif ++ at32_add_device_cf(0, 2, &cf0_data); ++#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_PSIF ++ at32_add_device_psif(0); ++ at32_add_device_psif(1); ++#endif --config BOARD_ATSTK1002_SW4_CUSTOM -+config BOARD_ATSTK100X_SW4_CUSTOM - bool "SW4: use ISI/Camera (not GPIOs, SPI1, and PS2-B)" - help - To use the camera interface you'll need a custom card (on the -@@ -36,27 +55,29 @@ config BOARD_ATSTK1002_SW4_CUSTOM + atstk1000_setup_j2_leds(); + atstk1002_setup_extdac(); +--- a/arch/avr32/boards/atstk1000/atstk1003.c ++++ b/arch/avr32/boards/atstk1000/atstk1003.c +@@ -27,6 +27,13 @@ - config BOARD_ATSTK1002_SW5_CUSTOM - bool "SW5: use MACB1 (not LCDC)" -+ depends on BOARD_ATSTK1002 + #include "atstk1000.h" - config BOARD_ATSTK1002_SW6_CUSTOM - bool "SW6: more GPIOs (not MACB0)" -+ depends on BOARD_ATSTK1002 ++/* Oscillator frequencies. These are board specific */ ++unsigned long at32_board_osc_rates[3] = { ++ [0] = 32768, /* 32.768 kHz on RTC osc */ ++ [1] = 20000000, /* 20 MHz on osc0 */ ++ [2] = 12000000, /* 12 MHz on osc1 */ ++}; ++ + #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC + static struct at73c213_board_info at73c213_data = { + .ssc_id = 0, +@@ -59,6 +66,19 @@ + } }; + #endif - endif # custom ++static struct cf_platform_data __initdata cf0_data = { ++#ifdef CONFIG_BOARD_ATSTK1000_CF_HACKS ++ .detect_pin = CONFIG_BOARD_ATSTK1000_CF_DETECT_PIN, ++ .reset_pin = CONFIG_BOARD_ATSTK1000_CF_RESET_PIN, ++#else ++ .detect_pin = GPIO_PIN_NONE, ++ .reset_pin = GPIO_PIN_NONE, ++#endif ++ .vcc_pin = GPIO_PIN_NONE, ++ .ready_pin = GPIO_PIN_PB(27), ++ .cs = 4, ++}; ++ + #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC + static void __init atstk1003_setup_extdac(void) + { +@@ -147,12 +167,22 @@ + at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); + #endif + #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM +- at32_add_device_mci(0); ++ at32_add_device_mci(0, NULL); + #endif + at32_add_device_usba(0, NULL); ++#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_AC97 ++ at32_add_device_ac97c(0); ++#else ++ at32_add_device_abdac(0); ++#endif + #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM + at32_add_device_ssc(0, ATMEL_SSC_TX); + #endif ++ at32_add_device_cf(0, 2, &cf0_data); ++#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_PSIF ++ at32_add_device_psif(0); ++ at32_add_device_psif(1); ++#endif --config BOARD_ATSTK1002_SPI1 -+config BOARD_ATSTK100X_SPI1 - bool "Configure SPI1 controller" -- depends on !BOARD_ATSTK1002_SW4_CUSTOM -+ depends on !BOARD_ATSTK100X_SW4_CUSTOM - help - All the signals for the second SPI controller are available on - GPIO lines and accessed through the J1 jumper block. Say "y" - here to configure that SPI controller. + atstk1000_setup_j2_leds(); + atstk1003_setup_extdac(); +--- a/arch/avr32/boards/atstk1000/atstk1004.c ++++ b/arch/avr32/boards/atstk1000/atstk1004.c +@@ -29,6 +29,13 @@ --config BOARD_ATSTK1002_J2_LED -+config BOARD_ATSTK1000_J2_LED - bool -- default BOARD_ATSTK1002_J2_LED8 || BOARD_ATSTK1002_J2_RGB -+ default BOARD_ATSTK1000_J2_LED8 || BOARD_ATSTK1000_J2_RGB + #include "atstk1000.h" - choice - prompt "LEDs connected to J2:" -- depends on LEDS_GPIO && !BOARD_ATSTK1002_SW4_CUSTOM -+ depends on LEDS_GPIO && !BOARD_ATSTK100X_SW4_CUSTOM - optional - help - Select this if you have jumpered the J2 jumper block to the -@@ -64,16 +85,64 @@ choice - IDC cable. A default "heartbeat" trigger is provided, but - you can of course override this. - --config BOARD_ATSTK1002_J2_LED8 -+config BOARD_ATSTK1000_J2_LED8 - bool "LED0..LED7" - help - Select this if J2 is jumpered to LED0..LED7 amber leds. ++/* Oscillator frequencies. These are board specific */ ++unsigned long at32_board_osc_rates[3] = { ++ [0] = 32768, /* 32.768 kHz on RTC osc */ ++ [1] = 20000000, /* 20 MHz on osc0 */ ++ [2] = 12000000, /* 12 MHz on osc1 */ ++}; ++ + #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC + static struct at73c213_board_info at73c213_data = { + .ssc_id = 0, +@@ -130,14 +137,23 @@ + at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); + #endif + #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM +- at32_add_device_mci(0); ++ at32_add_device_mci(0, NULL); + #endif + at32_add_device_lcdc(0, &atstk1000_lcdc_data, +- fbmem_start, fbmem_size); ++ fbmem_start, fbmem_size, 0); + at32_add_device_usba(0, NULL); ++#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_AC97 ++ at32_add_device_ac97c(0); ++#else ++ at32_add_device_abdac(0); ++#endif + #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM + at32_add_device_ssc(0, ATMEL_SSC_TX); + #endif ++#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_PSIF ++ at32_add_device_psif(0); ++ at32_add_device_psif(1); ++#endif --config BOARD_ATSTK1002_J2_RGB -+config BOARD_ATSTK1000_J2_RGB - bool "RGB leds" - help - Select this if J2 is jumpered to the RGB leds. + atstk1000_setup_j2_leds(); + atstk1004_setup_extdac(); +--- a/arch/avr32/boards/atstk1000/Kconfig ++++ b/arch/avr32/boards/atstk1000/Kconfig +@@ -18,6 +18,10 @@ + bool "ATSTK1004" + select CPU_AT32AP7002 ++config BOARD_ATSTK1006 ++ bool "ATSTK1006" ++ select CPU_AT32AP7000 ++ endchoice --endif # stk 1002 -+config BOARD_ATSTK1000_EXTDAC -+ bool -+ depends on !BOARD_ATSTK100X_SW1_CUSTOM && !BOARD_ATSTK100X_SW3_CUSTOM -+ default y -+ + +@@ -102,4 +106,60 @@ + depends on !BOARD_ATSTK100X_SW1_CUSTOM && !BOARD_ATSTK100X_SW3_CUSTOM + default y + +config BOARD_ATSTK100X_ENABLE_AC97 + bool "Use AC97C instead of ABDAC" + help @@ -657,1104 +407,869 @@ index 718578f..56a8d8e 100644 + + The default is 0x3e, which is pin 30 on PIOB, aka GPIO15. + -+endif # stk 1000 -diff --git a/arch/avr32/boards/atstk1000/Makefile b/arch/avr32/boards/atstk1000/Makefile -index 8e09922..beead86 100644 ++config BOARD_ATSTK100X_ENABLE_PSIF ++ bool "Enable PSIF peripheral (PS/2 support)" ++ default n ++ help ++ Select this if you want to use the PSIF peripheral to hook up PS/2 ++ devices to your STK1000. This will require a hardware modification to ++ work correctly, since PS/2 devices require 5 volt power and signals, ++ while the STK1000 only provides 3.3 volt. ++ ++ Say N if you have not modified the hardware to boost the voltage, say ++ Y if you have level convertion hardware or a PS/2 device capable of ++ operating on 3.3 volt. ++ + endif # stk 1000 --- a/arch/avr32/boards/atstk1000/Makefile +++ b/arch/avr32/boards/atstk1000/Makefile -@@ -1,2 +1,4 @@ - obj-y += setup.o flash.o +@@ -2,3 +2,4 @@ obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o -+obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o -+obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o -diff --git a/arch/avr32/boards/atstk1000/atstk1000.h b/arch/avr32/boards/atstk1000/atstk1000.h -index 9a49ed0..9392d32 100644 ---- a/arch/avr32/boards/atstk1000/atstk1000.h -+++ b/arch/avr32/boards/atstk1000/atstk1000.h -@@ -12,4 +12,6 @@ - - extern struct atmel_lcdfb_info atstk1000_lcdc_data; - -+void atstk1000_setup_j2_leds(void); -+ - #endif /* __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H */ -diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c -index 5be0d13..90436fa 100644 ---- a/arch/avr32/boards/atstk1000/atstk1002.c -+++ b/arch/avr32/boards/atstk1000/atstk1002.c -@@ -11,7 +11,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -22,7 +21,7 @@ - - #include - #include --#include -+#include - #include - #include - #include -@@ -49,18 +48,16 @@ static struct eth_platform_data __initdata eth_data[2] = { - }, - }; - --#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM --#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM -+#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC - static struct at73c213_board_info at73c213_data = { - .ssc_id = 0, - .shortname = "AVR32 STK1000 external DAC", - }; - #endif --#endif + obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o + obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o ++obj-$(CONFIG_BOARD_ATSTK1006) += atstk1002.o +--- a/arch/avr32/configs/atngw100_defconfig ++++ b/arch/avr32/configs/atngw100_defconfig +@@ -1,7 +1,7 @@ + # + # Automatically generated make config: don't edit +-# Linux kernel version: 2.6.24-rc7 +-# Wed Jan 9 23:20:41 2008 ++# Linux kernel version: 2.6.25.4 ++# Wed Jun 11 15:23:36 2008 + # + CONFIG_AVR32=y + CONFIG_GENERIC_GPIO=y +@@ -13,10 +13,10 @@ + CONFIG_GENERIC_IRQ_PROBE=y + CONFIG_RWSEM_GENERIC_SPINLOCK=y + CONFIG_GENERIC_TIME=y ++CONFIG_GENERIC_CLOCKEVENTS=y + # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set + # CONFIG_ARCH_HAS_ILOG2_U32 is not set + # CONFIG_ARCH_HAS_ILOG2_U64 is not set +-CONFIG_ARCH_SUPPORTS_OPROFILE=y + CONFIG_GENERIC_HWEIGHT=y + CONFIG_GENERIC_CALIBRATE_DELAY=y + CONFIG_GENERIC_BUG=y +@@ -37,17 +37,15 @@ + CONFIG_BSD_PROCESS_ACCT=y + CONFIG_BSD_PROCESS_ACCT_V3=y + # CONFIG_TASKSTATS is not set +-# CONFIG_USER_NS is not set +-# CONFIG_PID_NS is not set + # CONFIG_AUDIT is not set + # CONFIG_IKCONFIG is not set + CONFIG_LOG_BUF_SHIFT=14 + # CONFIG_CGROUPS is not set +-CONFIG_FAIR_GROUP_SCHED=y +-CONFIG_FAIR_USER_SCHED=y +-# CONFIG_FAIR_CGROUP_SCHED is not set ++# CONFIG_GROUP_SCHED is not set + CONFIG_SYSFS_DEPRECATED=y ++CONFIG_SYSFS_DEPRECATED_V2=y + # CONFIG_RELAY is not set ++# CONFIG_NAMESPACES is not set + CONFIG_BLK_DEV_INITRD=y + CONFIG_INITRAMFS_SOURCE="" + CONFIG_CC_OPTIMIZE_FOR_SIZE=y +@@ -61,11 +59,13 @@ + CONFIG_PRINTK=y + CONFIG_BUG=y + CONFIG_ELF_CORE=y ++# CONFIG_COMPAT_BRK is not set + # CONFIG_BASE_FULL is not set + CONFIG_FUTEX=y + CONFIG_ANON_INODES=y + CONFIG_EPOLL=y + CONFIG_SIGNALFD=y ++CONFIG_TIMERFD=y + CONFIG_EVENTFD=y + CONFIG_SHMEM=y + CONFIG_VM_EVENT_COUNTERS=y +@@ -73,6 +73,14 @@ + # CONFIG_SLAB is not set + CONFIG_SLUB=y + # CONFIG_SLOB is not set ++CONFIG_PROFILING=y ++# CONFIG_MARKERS is not set ++CONFIG_OPROFILE=m ++CONFIG_HAVE_OPROFILE=y ++CONFIG_KPROBES=y ++CONFIG_HAVE_KPROBES=y ++# CONFIG_HAVE_KRETPROBES is not set ++CONFIG_PROC_PAGE_MONITOR=y + CONFIG_SLABINFO=y + CONFIG_RT_MUTEXES=y + # CONFIG_TINY_SHMEM is not set +@@ -101,10 +109,15 @@ + CONFIG_DEFAULT_CFQ=y + # CONFIG_DEFAULT_NOOP is not set + CONFIG_DEFAULT_IOSCHED="cfq" ++CONFIG_CLASSIC_RCU=y --#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM -+#ifndef CONFIG_BOARD_ATSTK100X_SW1_CUSTOM - static struct spi_board_info spi0_board_info[] __initdata = { --#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM -+#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC - { - /* AT73C213 */ - .modalias = "at73c213", -@@ -80,12 +77,25 @@ static struct spi_board_info spi0_board_info[] __initdata = { - }; - #endif + # + # System Type and features + # ++CONFIG_TICK_ONESHOT=y ++CONFIG_NO_HZ=y ++CONFIG_HIGH_RES_TIMERS=y ++CONFIG_GENERIC_CLOCKEVENTS_BUILD=y + CONFIG_SUBARCH_AVR32B=y + CONFIG_MMU=y + CONFIG_PERFORMANCE_COUNTERS=y +@@ -113,6 +126,7 @@ + CONFIG_CPU_AT32AP7000=y + # CONFIG_BOARD_ATSTK1000 is not set + CONFIG_BOARD_ATNGW100=y ++CONFIG_BOARD_ATNGW100_I2C_GPIO=y + CONFIG_LOADER_U_BOOT=y --#ifdef CONFIG_BOARD_ATSTK1002_SPI1 -+#ifdef CONFIG_BOARD_ATSTK100X_SPI1 - static struct spi_board_info spi1_board_info[] __initdata = { { - /* patch in custom entries here */ - } }; - #endif + # +@@ -121,6 +135,7 @@ + # CONFIG_AP700X_32_BIT_SMC is not set + CONFIG_AP700X_16_BIT_SMC=y + # CONFIG_AP700X_8_BIT_SMC is not set ++CONFIG_GPIO_DEV=y + CONFIG_LOAD_ADDRESS=0x10000000 + CONFIG_ENTRY_ADDRESS=0x90000000 + CONFIG_PHYS_OFFSET=0x10000000 +@@ -146,16 +161,26 @@ + CONFIG_ZONE_DMA_FLAG=0 + CONFIG_VIRT_TO_BUS=y + # CONFIG_OWNERSHIP_TRACE is not set ++CONFIG_NMI_DEBUGGING=y ++CONFIG_DW_DMAC=y + # CONFIG_HZ_100 is not set + CONFIG_HZ_250=y + # CONFIG_HZ_300 is not set + # CONFIG_HZ_1000 is not set + CONFIG_HZ=250 ++# CONFIG_SCHED_HRTICK is not set + CONFIG_CMDLINE="" -+static struct cf_platform_data __initdata cf0_data = { -+#ifdef CONFIG_BOARD_ATSTK1000_CF_HACKS -+ .detect_pin = CONFIG_BOARD_ATSTK1000_CF_DETECT_PIN, -+ .reset_pin = CONFIG_BOARD_ATSTK1000_CF_RESET_PIN, -+#else -+ .detect_pin = GPIO_PIN_NONE, -+ .reset_pin = GPIO_PIN_NONE, -+#endif -+ .vcc_pin = GPIO_PIN_NONE, -+ .ready_pin = GPIO_PIN_PB(27), -+ .cs = 4, -+}; -+ - /* - * The next two functions should go away as the boot loader is - * supposed to initialize the macb address registers with a valid -@@ -141,68 +151,8 @@ static void __init set_hw_addr(struct platform_device *pdev) - clk_put(pclk); - } + # + # Power management options + # ++CONFIG_ARCH_SUSPEND_POSSIBLE=y ++CONFIG_PM=y ++# CONFIG_PM_LEGACY is not set ++# CONFIG_PM_DEBUG is not set ++CONFIG_PM_SLEEP=y ++CONFIG_SUSPEND=y ++CONFIG_SUSPEND_FREEZER=y + + # + # CPU Frequency scaling +@@ -164,9 +189,9 @@ + CONFIG_CPU_FREQ_TABLE=y + # CONFIG_CPU_FREQ_DEBUG is not set + # CONFIG_CPU_FREQ_STAT is not set +-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y ++# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set + # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +-# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set ++CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y + # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set + CONFIG_CPU_FREQ_GOV_PERFORMANCE=y + # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +@@ -202,6 +227,7 @@ + CONFIG_XFRM_USER=y + # CONFIG_XFRM_SUB_POLICY is not set + # CONFIG_XFRM_MIGRATE is not set ++# CONFIG_XFRM_STATISTICS is not set + CONFIG_NET_KEY=y + # CONFIG_NET_KEY_MIGRATE is not set + CONFIG_INET=y +@@ -260,82 +286,33 @@ + # CONFIG_NETWORK_SECMARK is not set + CONFIG_NETFILTER=y + # CONFIG_NETFILTER_DEBUG is not set +-CONFIG_BRIDGE_NETFILTER=y ++# CONFIG_NETFILTER_ADVANCED is not set --#ifdef CONFIG_BOARD_ATSTK1002_J2_LED -- --static struct gpio_led stk_j2_led[] = { --#ifdef CONFIG_BOARD_ATSTK1002_J2_LED8 --#define LEDSTRING "J2 jumpered to LED8" -- { .name = "led0:amber", .gpio = GPIO_PIN_PB( 8), }, -- { .name = "led1:amber", .gpio = GPIO_PIN_PB( 9), }, -- { .name = "led2:amber", .gpio = GPIO_PIN_PB(10), }, -- { .name = "led3:amber", .gpio = GPIO_PIN_PB(13), }, -- { .name = "led4:amber", .gpio = GPIO_PIN_PB(14), }, -- { .name = "led5:amber", .gpio = GPIO_PIN_PB(15), }, -- { .name = "led6:amber", .gpio = GPIO_PIN_PB(16), }, -- { .name = "led7:amber", .gpio = GPIO_PIN_PB(30), -- .default_trigger = "heartbeat", }, --#else /* RGB */ --#define LEDSTRING "J2 jumpered to RGB LEDs" -- { .name = "r1:red", .gpio = GPIO_PIN_PB( 8), }, -- { .name = "g1:green", .gpio = GPIO_PIN_PB(10), }, -- { .name = "b1:blue", .gpio = GPIO_PIN_PB(14), }, -- -- { .name = "r2:red", .gpio = GPIO_PIN_PB( 9), -- .default_trigger = "heartbeat", }, -- { .name = "g2:green", .gpio = GPIO_PIN_PB(13), }, -- { .name = "b2:blue", .gpio = GPIO_PIN_PB(15), -- .default_trigger = "heartbeat", }, -- /* PB16, PB30 unused */ --#endif --}; -- --static struct gpio_led_platform_data stk_j2_led_data = { -- .num_leds = ARRAY_SIZE(stk_j2_led), -- .leds = stk_j2_led, --}; -- --static struct platform_device stk_j2_led_dev = { -- .name = "leds-gpio", -- .id = 2, /* gpio block J2 */ -- .dev = { -- .platform_data = &stk_j2_led_data, -- }, --}; -- --static void setup_j2_leds(void) --{ -- unsigned i; -- -- for (i = 0; i < ARRAY_SIZE(stk_j2_led); i++) -- at32_select_gpio(stk_j2_led[i].gpio, AT32_GPIOF_OUTPUT); -- -- printk("STK1002: " LEDSTRING "\n"); -- platform_device_register(&stk_j2_led_dev); --} -- --#else --static void setup_j2_leds(void) --{ --} --#endif + # + # Core Netfilter Configuration + # +-# CONFIG_NETFILTER_NETLINK is not set +-CONFIG_NF_CONNTRACK_ENABLED=m ++CONFIG_NETFILTER_NETLINK=m ++CONFIG_NETFILTER_NETLINK_LOG=m + CONFIG_NF_CONNTRACK=m +-CONFIG_NF_CT_ACCT=y +-CONFIG_NF_CONNTRACK_MARK=y +-# CONFIG_NF_CONNTRACK_EVENTS is not set +-CONFIG_NF_CT_PROTO_GRE=m +-# CONFIG_NF_CT_PROTO_SCTP is not set +-# CONFIG_NF_CT_PROTO_UDPLITE is not set +-CONFIG_NF_CONNTRACK_AMANDA=m + CONFIG_NF_CONNTRACK_FTP=m +-CONFIG_NF_CONNTRACK_H323=m + CONFIG_NF_CONNTRACK_IRC=m +-CONFIG_NF_CONNTRACK_NETBIOS_NS=m +-CONFIG_NF_CONNTRACK_PPTP=m +-CONFIG_NF_CONNTRACK_SANE=m + CONFIG_NF_CONNTRACK_SIP=m +-CONFIG_NF_CONNTRACK_TFTP=m ++CONFIG_NF_CT_NETLINK=m + CONFIG_NETFILTER_XTABLES=y +-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +-# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set +-# CONFIG_NETFILTER_XT_TARGET_DSCP is not set + CONFIG_NETFILTER_XT_TARGET_MARK=m +-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m + CONFIG_NETFILTER_XT_TARGET_NFLOG=m +-# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +-# CONFIG_NETFILTER_XT_TARGET_TRACE is not set + CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +-CONFIG_NETFILTER_XT_MATCH_COMMENT=m +-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +-# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set +-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m + CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +-# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +-# CONFIG_NETFILTER_XT_MATCH_DSCP is not set +-CONFIG_NETFILTER_XT_MATCH_ESP=m +-CONFIG_NETFILTER_XT_MATCH_HELPER=m +-CONFIG_NETFILTER_XT_MATCH_LENGTH=m +-CONFIG_NETFILTER_XT_MATCH_LIMIT=m +-CONFIG_NETFILTER_XT_MATCH_MAC=m + CONFIG_NETFILTER_XT_MATCH_MARK=m + CONFIG_NETFILTER_XT_MATCH_POLICY=m +-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +-# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set +-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +-CONFIG_NETFILTER_XT_MATCH_QUOTA=m +-CONFIG_NETFILTER_XT_MATCH_REALM=m +-# CONFIG_NETFILTER_XT_MATCH_SCTP is not set + CONFIG_NETFILTER_XT_MATCH_STATE=m +-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +-CONFIG_NETFILTER_XT_MATCH_STRING=m +-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +-# CONFIG_NETFILTER_XT_MATCH_TIME is not set +-# CONFIG_NETFILTER_XT_MATCH_U32 is not set +-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m + + # + # IP: Netfilter Configuration + # + CONFIG_NF_CONNTRACK_IPV4=m + CONFIG_NF_CONNTRACK_PROC_COMPAT=y +-# CONFIG_IP_NF_QUEUE is not set + CONFIG_IP_NF_IPTABLES=m +-CONFIG_IP_NF_MATCH_IPRANGE=m +-CONFIG_IP_NF_MATCH_TOS=m +-CONFIG_IP_NF_MATCH_RECENT=m +-CONFIG_IP_NF_MATCH_ECN=m +-CONFIG_IP_NF_MATCH_AH=m +-CONFIG_IP_NF_MATCH_TTL=m +-CONFIG_IP_NF_MATCH_OWNER=m +-CONFIG_IP_NF_MATCH_ADDRTYPE=m + CONFIG_IP_NF_FILTER=m + CONFIG_IP_NF_TARGET_REJECT=m + CONFIG_IP_NF_TARGET_LOG=m +@@ -343,54 +320,25 @@ + CONFIG_NF_NAT=m + CONFIG_NF_NAT_NEEDED=y + CONFIG_IP_NF_TARGET_MASQUERADE=m +-CONFIG_IP_NF_TARGET_REDIRECT=m +-CONFIG_IP_NF_TARGET_NETMAP=m +-CONFIG_IP_NF_TARGET_SAME=m +-CONFIG_NF_NAT_SNMP_BASIC=m +-CONFIG_NF_NAT_PROTO_GRE=m + CONFIG_NF_NAT_FTP=m + CONFIG_NF_NAT_IRC=m +-CONFIG_NF_NAT_TFTP=m +-CONFIG_NF_NAT_AMANDA=m +-CONFIG_NF_NAT_PPTP=m +-CONFIG_NF_NAT_H323=m ++# CONFIG_NF_NAT_TFTP is not set ++# CONFIG_NF_NAT_AMANDA is not set ++# CONFIG_NF_NAT_PPTP is not set ++# CONFIG_NF_NAT_H323 is not set + CONFIG_NF_NAT_SIP=m + CONFIG_IP_NF_MANGLE=m +-CONFIG_IP_NF_TARGET_TOS=m +-CONFIG_IP_NF_TARGET_ECN=m +-CONFIG_IP_NF_TARGET_TTL=m +-CONFIG_IP_NF_TARGET_CLUSTERIP=m +-CONFIG_IP_NF_RAW=m +-CONFIG_IP_NF_ARPTABLES=m +-CONFIG_IP_NF_ARPFILTER=m +-CONFIG_IP_NF_ARP_MANGLE=m + + # +-# IPv6: Netfilter Configuration (EXPERIMENTAL) ++# IPv6: Netfilter Configuration + # + CONFIG_NF_CONNTRACK_IPV6=m +-CONFIG_IP6_NF_QUEUE=m + CONFIG_IP6_NF_IPTABLES=m +-CONFIG_IP6_NF_MATCH_RT=m +-CONFIG_IP6_NF_MATCH_OPTS=m +-CONFIG_IP6_NF_MATCH_FRAG=m +-CONFIG_IP6_NF_MATCH_HL=m +-CONFIG_IP6_NF_MATCH_OWNER=m + CONFIG_IP6_NF_MATCH_IPV6HEADER=m +-CONFIG_IP6_NF_MATCH_AH=m +-CONFIG_IP6_NF_MATCH_MH=m +-CONFIG_IP6_NF_MATCH_EUI64=m + CONFIG_IP6_NF_FILTER=m + CONFIG_IP6_NF_TARGET_LOG=m + CONFIG_IP6_NF_TARGET_REJECT=m + CONFIG_IP6_NF_MANGLE=m +-CONFIG_IP6_NF_TARGET_HL=m +-CONFIG_IP6_NF_RAW=m - --#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM --#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM --static void __init at73c213_set_clk(struct at73c213_board_info *info) -+#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC -+static void __init atstk1002_setup_extdac(void) - { - struct clk *gclk; - struct clk *pll; -@@ -220,7 +170,7 @@ static void __init at73c213_set_clk(struct at73c213_board_info *info) - } +-# +-# Bridge: Netfilter Configuration +-# +-# CONFIG_BRIDGE_NF_EBTABLES is not set + # CONFIG_IP_DCCP is not set + # CONFIG_IP_SCTP is not set + # CONFIG_TIPC is not set +@@ -407,7 +355,6 @@ + # CONFIG_ECONET is not set + # CONFIG_WAN_ROUTER is not set + # CONFIG_NET_SCHED is not set +-CONFIG_NET_CLS_ROUTE=y - at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0); -- info->dac_clk = gclk; -+ at73c213_data.dac_clk = gclk; + # + # Network testing +@@ -415,6 +362,7 @@ + # CONFIG_NET_PKTGEN is not set + # CONFIG_NET_TCPPROBE is not set + # CONFIG_HAMRADIO is not set ++# CONFIG_CAN is not set + # CONFIG_IRDA is not set + # CONFIG_BT is not set + # CONFIG_AF_RXRPC is not set +@@ -531,11 +479,18 @@ + CONFIG_BLK_DEV_RAM=m + CONFIG_BLK_DEV_RAM_COUNT=16 + CONFIG_BLK_DEV_RAM_SIZE=4096 +-CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 ++# CONFIG_BLK_DEV_XIP is not set + # CONFIG_CDROM_PKTCDVD is not set + # CONFIG_ATA_OVER_ETH is not set +-# CONFIG_MISC_DEVICES is not set +-# CONFIG_IDE is not set ++CONFIG_MISC_DEVICES=y ++# CONFIG_ATMEL_PWM is not set ++CONFIG_ATMEL_TCLIB=y ++CONFIG_ATMEL_TCB_CLKSRC=y ++CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 ++# CONFIG_EEPROM_93CX6 is not set ++# CONFIG_ATMEL_SSC is not set ++# CONFIG_ENCLOSURE_SERVICES is not set ++# CONFIG_HAVE_IDE is not set - err_set_clk: - clk_put(pll); -@@ -229,12 +179,16 @@ err_pll: - err_gclk: - return; - } --#endif --#endif -+#else -+static void __init atstk1002_setup_extdac(void) -+{ + # + # SCSI device support +@@ -568,11 +523,13 @@ + # CONFIG_SMSC_PHY is not set + # CONFIG_BROADCOM_PHY is not set + # CONFIG_ICPLUS_PHY is not set ++# CONFIG_REALTEK_PHY is not set + # CONFIG_FIXED_PHY is not set + # CONFIG_MDIO_BITBANG is not set + CONFIG_NET_ETHERNET=y + # CONFIG_MII is not set + CONFIG_MACB=y ++# CONFIG_ENC28J60 is not set + # CONFIG_IBM_NEW_EMAC_ZMII is not set + # CONFIG_IBM_NEW_EMAC_RGMII is not set + # CONFIG_IBM_NEW_EMAC_TAH is not set +@@ -599,7 +556,6 @@ + # CONFIG_PPPOL2TP is not set + # CONFIG_SLIP is not set + CONFIG_SLHC=m +-# CONFIG_SHAPER is not set + # CONFIG_NETCONSOLE is not set + # CONFIG_NETPOLL is not set + # CONFIG_NET_POLL_CONTROLLER is not set +@@ -633,6 +589,7 @@ + # + CONFIG_SERIAL_ATMEL=y + CONFIG_SERIAL_ATMEL_CONSOLE=y ++CONFIG_SERIAL_ATMEL_PDC=y + # CONFIG_SERIAL_ATMEL_TTYAT is not set + CONFIG_SERIAL_CORE=y + CONFIG_SERIAL_CORE_CONSOLE=y +@@ -640,8 +597,6 @@ + # CONFIG_LEGACY_PTYS is not set + # CONFIG_IPMI_HANDLER is not set + # CONFIG_HW_RANDOM is not set +-# CONFIG_RTC is not set +-# CONFIG_GEN_RTC is not set + # CONFIG_R3964 is not set + # CONFIG_RAW_DRIVER is not set + # CONFIG_TCG_TPM is not set +@@ -659,6 +614,7 @@ + # + # I2C Hardware Bus support + # ++CONFIG_I2C_ATMELTWI=m + CONFIG_I2C_GPIO=m + # CONFIG_I2C_OCORES is not set + # CONFIG_I2C_PARPORT_LIGHT is not set +@@ -669,13 +625,12 @@ + # + # Miscellaneous I2C Chip support + # +-# CONFIG_SENSORS_DS1337 is not set +-# CONFIG_SENSORS_DS1374 is not set + # CONFIG_DS1682 is not set + # CONFIG_SENSORS_EEPROM is not set + # CONFIG_SENSORS_PCF8574 is not set +-# CONFIG_SENSORS_PCA9539 is not set ++# CONFIG_PCF8575 is not set + # CONFIG_SENSORS_PCF8591 is not set ++# CONFIG_TPS65010 is not set + # CONFIG_SENSORS_MAX6875 is not set + # CONFIG_SENSORS_TSL2550 is not set + # CONFIG_I2C_DEBUG_CORE is not set +@@ -702,9 +657,27 @@ + # CONFIG_SPI_AT25 is not set + CONFIG_SPI_SPIDEV=m + # CONFIG_SPI_TLE62X0 is not set ++CONFIG_HAVE_GPIO_LIB=y + -+} -+#endif /* CONFIG_BOARD_ATSTK1000_EXTDAC */ ++# ++# GPIO Support ++# ++# CONFIG_DEBUG_GPIO is not set ++ ++# ++# I2C GPIO expanders: ++# ++# CONFIG_GPIO_PCA953X is not set ++# CONFIG_GPIO_PCF857X is not set ++ ++# ++# SPI GPIO expanders: ++# ++# CONFIG_GPIO_MCP23S08 is not set + # CONFIG_W1 is not set + # CONFIG_POWER_SUPPLY is not set + # CONFIG_HWMON is not set ++# CONFIG_THERMAL is not set + CONFIG_WATCHDOG=y + # CONFIG_WATCHDOG_NOWAYOUT is not set - void __init setup_board(void) - { --#ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM -+#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM - at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */ - #else - at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */ -@@ -271,7 +225,7 @@ static int __init atstk1002_init(void) +@@ -757,10 +730,6 @@ + # + # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' + # +- +-# +-# USB Gadget Support +-# + CONFIG_USB_GADGET=y + # CONFIG_USB_GADGET_DEBUG is not set + # CONFIG_USB_GADGET_DEBUG_FILES is not set +@@ -787,21 +756,24 @@ + # CONFIG_USB_FILE_STORAGE_TEST is not set + CONFIG_USB_G_SERIAL=m + # CONFIG_USB_MIDI_GADGET is not set +-CONFIG_MMC=m ++# CONFIG_USB_G_PRINTER is not set ++CONFIG_MMC=y + # CONFIG_MMC_DEBUG is not set + # CONFIG_MMC_UNSAFE_RESUME is not set - at32_add_system_devices(); + # + # MMC/SD Card Drivers + # +-CONFIG_MMC_BLOCK=m ++CONFIG_MMC_BLOCK=y + CONFIG_MMC_BLOCK_BOUNCE=y + # CONFIG_SDIO_UART is not set --#ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM -+#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM - at32_add_device_usart(1); - #else - at32_add_device_usart(0); -@@ -281,12 +235,16 @@ static int __init atstk1002_init(void) - #ifndef CONFIG_BOARD_ATSTK1002_SW6_CUSTOM - set_hw_addr(at32_add_device_eth(0, ð_data[0])); - #endif --#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM -+#ifndef CONFIG_BOARD_ATSTK100X_SW1_CUSTOM - at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); - #endif --#ifdef CONFIG_BOARD_ATSTK1002_SPI1 -+#ifdef CONFIG_BOARD_ATSTK100X_SPI1 - at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); - #endif -+ at32_add_device_twi(0); -+#ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM -+ at32_add_device_mci(0, NULL); -+#endif - #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM - set_hw_addr(at32_add_device_eth(1, ð_data[1])); - #else -@@ -294,17 +252,18 @@ static int __init atstk1002_init(void) - fbmem_start, fbmem_size); - #endif - at32_add_device_usba(0, NULL); --#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM -+#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_AC97 -+ at32_add_device_ac97c(0); -+#else -+ at32_add_device_abdac(0); -+#endif -+#ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM - at32_add_device_ssc(0, ATMEL_SSC_TX); - #endif -+ at32_add_device_cf(0, 2, &cf0_data); + # + # MMC/SD Host Controller Drivers + # ++CONFIG_MMC_ATMELMCI=y + CONFIG_MMC_SPI=m ++# CONFIG_MEMSTICK is not set + CONFIG_NEW_LEDS=y + CONFIG_LEDS_CLASS=y -- setup_j2_leds(); -- --#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM --#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM -- at73c213_set_clk(&at73c213_data); --#endif --#endif -+ atstk1000_setup_j2_leds(); -+ atstk1002_setup_extdac(); +@@ -844,19 +816,22 @@ + # CONFIG_RTC_DRV_PCF8563 is not set + # CONFIG_RTC_DRV_PCF8583 is not set + # CONFIG_RTC_DRV_M41T80 is not set ++# CONFIG_RTC_DRV_S35390A is not set - return 0; - } -diff --git a/arch/avr32/boards/atstk1000/atstk1003.c b/arch/avr32/boards/atstk1000/atstk1003.c -new file mode 100644 -index 0000000..768d204 ---- /dev/null -+++ b/arch/avr32/boards/atstk1000/atstk1003.c -@@ -0,0 +1,181 @@ -+/* -+ * ATSTK1003 daughterboard-specific init code -+ * -+ * Copyright (C) 2007 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 -+#include -+#include -+#include -+ -+#include "atstk1000.h" -+ -+#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC -+static struct at73c213_board_info at73c213_data = { -+ .ssc_id = 0, -+ .shortname = "AVR32 STK1000 external DAC", -+}; -+#endif -+ -+#ifndef CONFIG_BOARD_ATSTK100X_SW1_CUSTOM -+static struct spi_board_info spi0_board_info[] __initdata = { -+#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC -+ { -+ /* AT73C213 */ -+ .modalias = "at73c213", -+ .max_speed_hz = 200000, -+ .chip_select = 0, -+ .mode = SPI_MODE_1, -+ .platform_data = &at73c213_data, -+ }, -+#endif -+ /* -+ * We can control the LTV350QV LCD panel, but it isn't much -+ * point since we don't have an LCD controller... -+ */ -+}; -+#endif -+ -+#ifdef CONFIG_BOARD_ATSTK100X_SPI1 -+static struct spi_board_info spi1_board_info[] __initdata = { { -+ /* patch in custom entries here */ -+} }; -+#endif -+ -+static struct cf_platform_data __initdata cf0_data = { -+#ifdef CONFIG_BOARD_ATSTK1000_CF_HACKS -+ .detect_pin = CONFIG_BOARD_ATSTK1000_CF_DETECT_PIN, -+ .reset_pin = CONFIG_BOARD_ATSTK1000_CF_RESET_PIN, -+#else -+ .detect_pin = GPIO_PIN_NONE, -+ .reset_pin = GPIO_PIN_NONE, -+#endif -+ .vcc_pin = GPIO_PIN_NONE, -+ .ready_pin = GPIO_PIN_PB(27), -+ .cs = 4, -+}; -+ -+#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC -+static void __init atstk1003_setup_extdac(void) -+{ -+ struct clk *gclk; -+ struct clk *pll; -+ -+ gclk = clk_get(NULL, "gclk0"); -+ if (IS_ERR(gclk)) -+ goto err_gclk; -+ pll = clk_get(NULL, "pll0"); -+ if (IS_ERR(pll)) -+ goto err_pll; -+ -+ if (clk_set_parent(gclk, pll)) { -+ pr_debug("STK1000: failed to set pll0 as parent for DAC clock\n"); -+ goto err_set_clk; -+ } -+ -+ at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0); -+ at73c213_data.dac_clk = gclk; -+ -+err_set_clk: -+ clk_put(pll); -+err_pll: -+ clk_put(gclk); -+err_gclk: -+ return; -+} -+#else -+static void __init atstk1003_setup_extdac(void) -+{ -+ -+} -+#endif /* CONFIG_BOARD_ATSTK1000_EXTDAC */ -+ -+void __init setup_board(void) -+{ -+#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM -+ at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */ -+#else -+ at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */ -+#endif -+ /* USART 2/unused: expansion connector */ -+ at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */ -+ -+ at32_setup_serial_console(0); -+} -+ -+static int __init atstk1003_init(void) -+{ -+ /* -+ * ATSTK1000 uses 32-bit SDRAM interface. Reserve the -+ * SDRAM-specific pins so that nobody messes with them. -+ */ -+ at32_reserve_pin(GPIO_PIN_PE(0)); /* DATA[16] */ -+ at32_reserve_pin(GPIO_PIN_PE(1)); /* DATA[17] */ -+ at32_reserve_pin(GPIO_PIN_PE(2)); /* DATA[18] */ -+ at32_reserve_pin(GPIO_PIN_PE(3)); /* DATA[19] */ -+ at32_reserve_pin(GPIO_PIN_PE(4)); /* DATA[20] */ -+ at32_reserve_pin(GPIO_PIN_PE(5)); /* DATA[21] */ -+ at32_reserve_pin(GPIO_PIN_PE(6)); /* DATA[22] */ -+ at32_reserve_pin(GPIO_PIN_PE(7)); /* DATA[23] */ -+ at32_reserve_pin(GPIO_PIN_PE(8)); /* DATA[24] */ -+ at32_reserve_pin(GPIO_PIN_PE(9)); /* DATA[25] */ -+ at32_reserve_pin(GPIO_PIN_PE(10)); /* DATA[26] */ -+ at32_reserve_pin(GPIO_PIN_PE(11)); /* DATA[27] */ -+ at32_reserve_pin(GPIO_PIN_PE(12)); /* DATA[28] */ -+ at32_reserve_pin(GPIO_PIN_PE(13)); /* DATA[29] */ -+ at32_reserve_pin(GPIO_PIN_PE(14)); /* DATA[30] */ -+ at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */ -+ at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */ -+ -+ at32_add_system_devices(); -+ -+#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM -+ at32_add_device_usart(1); -+#else -+ at32_add_device_usart(0); -+#endif -+ at32_add_device_usart(2); -+ -+#ifndef CONFIG_BOARD_ATSTK100X_SW1_CUSTOM -+ at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); -+#endif -+#ifdef CONFIG_BOARD_ATSTK100X_SPI1 -+ at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); -+#endif -+#ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM -+ at32_add_device_mci(0, NULL); -+#endif -+ at32_add_device_usba(0, NULL); -+#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_AC97 -+ at32_add_device_ac97c(0); -+#else -+ at32_add_device_abdac(0); -+#endif -+#ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM -+ at32_add_device_ssc(0, ATMEL_SSC_TX); -+#endif -+ at32_add_device_cf(0, 2, &cf0_data); -+ -+ atstk1000_setup_j2_leds(); -+ atstk1003_setup_extdac(); -+ -+ return 0; -+} -+postcore_initcall(atstk1003_init); -diff --git a/arch/avr32/boards/atstk1000/atstk1004.c b/arch/avr32/boards/atstk1000/atstk1004.c -new file mode 100644 -index 0000000..96015dd ---- /dev/null -+++ b/arch/avr32/boards/atstk1000/atstk1004.c -@@ -0,0 +1,152 @@ -+/* -+ * ATSTK1003 daughterboard-specific init code -+ * -+ * Copyright (C) 2007 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