From 5d64853bce8e7b5985af2e023a7e70061bd11647 Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Thu, 7 Feb 2008 20:08:19 +0000 Subject: [PATCH] upgrade AVR32 to 2.6.24 - sync with 2.6.24.atmel.1 SVN-Revision: 10412 --- target/linux/avr32/Makefile | 2 +- .../avr32/{config-2.6.23 => config-default} | 16 +- target/linux/avr32/patches/100-git_sync.patch | 26431 ++++++++++------ 3 files changed, 16061 insertions(+), 10388 deletions(-) rename target/linux/avr32/{config-2.6.23 => config-default} (88%) diff --git a/target/linux/avr32/Makefile b/target/linux/avr32/Makefile index 0530a491223..77b8c96f955 100644 --- a/target/linux/avr32/Makefile +++ b/target/linux/avr32/Makefile @@ -10,7 +10,7 @@ ARCH:=avr32 BOARD:=avr32 BOARDNAME:=Atmel AVR32 FEATURES:=squashfs -LINUX_VERSION:=2.6.23.1 +LINUX_VERSION:=2.6.24 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/avr32/config-2.6.23 b/target/linux/avr32/config-default similarity index 88% rename from target/linux/avr32/config-2.6.23 rename to target/linux/avr32/config-default index 75520b4569c..f33525780e3 100644 --- a/target/linux/avr32/config-2.6.23 +++ b/target/linux/avr32/config-default @@ -1,8 +1,9 @@ -CONFIG_AP7000_16_BIT_SMC=y -# CONFIG_AP7000_32_BIT_SMC is not set -# CONFIG_AP7000_8_BIT_SMC is not set +CONFIG_AP700X_16_BIT_SMC=y +# CONFIG_AP700X_32_BIT_SMC is not set +# CONFIG_AP700X_8_BIT_SMC is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ATM_DRIVERS is not set +# CONFIG_ATMEL_PWM is not set # CONFIG_ATMEL_SSC is not set CONFIG_AVR32=y CONFIG_BOARD_ATNGW100=y @@ -11,15 +12,17 @@ CONFIG_BOARD_ATNGW100=y # CONFIG_BROADCOM_PHY is not set # CONFIG_BT is not set CONFIG_CPU_AT32AP7000=y -CONFIG_CPU_FREQ=y +# CONFIG_CPU_FREQ is not set # CONFIG_CPU_FREQ_DEBUG is not set # CONFIG_CPU_FREQ_STAT is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set # CONFIG_CPU_FREQ_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_AT32AP=y CONFIG_DW_DMAC=y @@ -36,6 +39,7 @@ CONFIG_HZ_250=y CONFIG_INITRAMFS_SOURCE="" CONFIG_LEDS_GPIO=y CONFIG_MACB=y +# CONFIG_MDIO_BITBANG is not set # CONFIG_MTD_ABSENT is not set CONFIG_MTD_BLKDEVS=y # CONFIG_MTD_BLOCK2MTD is not set @@ -85,6 +89,7 @@ CONFIG_MTD_PHYSMAP=y # CONFIG_MTD_ROM is not set # CONFIG_MTD_SLRAM is not set CONFIG_MTD=y +# CONFIG_NMI_DEBUGGING is not set # CONFIG_OWNERSHIP_TRACE is not set CONFIG_PHYS_OFFSET=0x10000000 CONFIG_PLATFORM_AT32AP=y @@ -92,6 +97,7 @@ CONFIG_PLATFORM_AT32AP=y # CONFIG_RTC is not set # CONFIG_SERIAL_8250 is not set CONFIG_SERIAL_ATMEL_CONSOLE=y +CONFIG_SERIAL_ATMEL_PDC=y # CONFIG_SERIAL_ATMEL_TTYAT is not set CONFIG_SERIAL_ATMEL=y # CONFIG_SMSC_PHY is not set diff --git a/target/linux/avr32/patches/100-git_sync.patch b/target/linux/avr32/patches/100-git_sync.patch index 6ce6259b6a6..bfbc8c1d2b8 100644 --- a/target/linux/avr32/patches/100-git_sync.patch +++ b/target/linux/avr32/patches/100-git_sync.patch @@ -1,136 +1,312 @@ - MAINTAINERS | 7 + - Makefile | 2 +- - arch/avr32/Kconfig | 7 + - arch/avr32/Makefile | 1 + - arch/avr32/boards/atngw100/Kconfig | 12 + - arch/avr32/boards/atngw100/flash.c | 5 +- - arch/avr32/boards/atngw100/setup.c | 26 +- - arch/avr32/boards/atstk1000/Kconfig | 12 + - arch/avr32/boards/atstk1000/atstk1002.c | 72 ++ - arch/avr32/boards/atstk1000/flash.c | 5 +- - arch/avr32/configs/atngw100_defconfig | 201 +++- - arch/avr32/configs/atstk1002_defconfig | 354 +++++- - arch/avr32/drivers/Makefile | 1 + - arch/avr32/drivers/dw-dmac.c | 761 ++++++++++++ - arch/avr32/drivers/dw-dmac.h | 42 + - arch/avr32/kernel/Makefile | 6 +- - arch/avr32/kernel/dma-controller.c | 34 + - arch/avr32/kernel/entry-avr32b.S | 26 +- - arch/avr32/kernel/setup.c | 2 +- - arch/avr32/kernel/vmlinux.lds.S | 143 +++ - arch/avr32/kernel/vmlinux.lds.c | 142 --- - arch/avr32/mach-at32ap/Kconfig | 7 + - arch/avr32/mach-at32ap/Makefile | 1 + - arch/avr32/mach-at32ap/at32ap7000.c | 241 ++++- - arch/avr32/mach-at32ap/clock.c | 116 ++ - arch/avr32/mach-at32ap/gpio-dev.c | 573 +++++++++ - arch/avr32/mach-at32ap/hsmc.c | 129 ++- - arch/avr32/mach-at32ap/pio.c | 80 ++ - arch/avr32/mach-at32ap/pm.h | 8 + - arch/avr32/mm/dma-coherent.c | 7 + - arch/avr32/mm/init.c | 12 +- - 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/misc/Kconfig | 9 + - drivers/misc/Makefile | 1 + - drivers/misc/atmel-ssc.c | 174 +++ - drivers/mmc/host/Kconfig | 10 + - drivers/mmc/host/Makefile | 1 + - drivers/mmc/host/atmel-mci.c | 1161 ++++++++++++++++++ - drivers/mmc/host/atmel-mci.h | 192 +++ - drivers/mtd/chips/cfi_cmdset_0001.c | 43 + - drivers/mtd/chips/cfi_cmdset_0002.c | 6 +- - drivers/spi/atmel_spi.c | 4 +- - drivers/usb/gadget/Kconfig | 26 +- - drivers/usb/gadget/Makefile | 1 + - drivers/usb/gadget/atmel_usba_udc.c | 2038 +++++++++++++++++++++++++++++++ - drivers/usb/gadget/atmel_usba_udc.h | 350 ++++++ - drivers/video/atmel_lcdfb.c | 6 +- - drivers/video/backlight/Kconfig | 12 + - drivers/video/backlight/Makefile | 2 + - drivers/video/backlight/ltv350qv.c | 339 +++++ - drivers/video/backlight/ltv350qv.h | 95 ++ - include/asm-avr32/arch-at32ap/board.h | 20 + - include/asm-avr32/arch-at32ap/portmux.h | 13 + - include/asm-avr32/arch-at32ap/smc.h | 51 +- - include/asm-avr32/dma-controller.h | 166 +++ - include/asm-avr32/dma-mapping.h | 17 +- - include/asm-avr32/system.h | 13 +- - include/asm-avr32/unistd.h | 13 + - include/linux/atmel-ssc.h | 312 +++++ - include/linux/spi/at73c213.h | 25 + - scripts/checkstack.pl | 5 + - sound/Kconfig | 6 + - sound/Makefile | 3 +- - 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 + - sound/spi/Kconfig | 31 + - sound/spi/Makefile | 5 + - sound/spi/at73c213.c | 1121 +++++++++++++++++ - sound/spi/at73c213.h | 119 ++ - 78 files changed, 11500 insertions(+), 272 deletions(-) + 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/vmlinux.lds.S - delete mode 100644 arch/avr32/kernel/vmlinux.lds.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/misc/atmel-ssc.c + 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/usb/gadget/atmel_usba_udc.c - create mode 100644 drivers/usb/gadget/atmel_usba_udc.h - create mode 100644 drivers/video/backlight/ltv350qv.c - create mode 100644 drivers/video/backlight/ltv350qv.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-ssc.h - create mode 100644 include/linux/spi/at73c213.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 - create mode 100644 sound/spi/Kconfig - create mode 100644 sound/spi/Makefile - create mode 100644 sound/spi/at73c213.c - create mode 100644 sound/spi/at73c213.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 9a91d9e..587afe3 100644 +index 2340cfb..e349a9e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -669,6 +669,13 @@ P: Haavard Skinnemoen - M: hskinnemoen@atmel.com - S: Supported +@@ -671,6 +671,12 @@ W: http://www.atmel.com/products/AT91/ + W: http://www.at91.com/ + S: Maintained -+ATMEL USBA UDC DRIVER ++ATMEL AT91 / AT32 SERIAL DRIVER +P: Haavard Skinnemoen +M: hskinnemoen@atmel.com -+L: kernel@avr32linux.org -+W: http://avr32linux.org/twiki/bin/view/Main/AtmelUsbDeviceDriver ++L: linux-kernel@vger.kernel.org +S: Supported + - ATMEL WIRELESS DRIVER - P: Simon Kelley - M: simon@thekelleys.org.uk + 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 d12346a..ec6c7c5 100644 +index b77abce..3f09270 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig -@@ -116,6 +116,9 @@ endchoice +@@ -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 @@ -140,10 +316,39 @@ index d12346a..ec6c7c5 100644 choice prompt "Boot loader type" -@@ -175,6 +178,10 @@ config OWNERSHIP_TRACE +@@ -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 @@ -151,14 +356,52 @@ index d12346a..ec6c7c5 100644 # 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 dc6bc01..eb72198 100644 +index 8791864..2d7bacd 100644 --- a/arch/avr32/Makefile +++ b/arch/avr32/Makefile -@@ -31,6 +31,7 @@ core-$(CONFIG_BOARD_ATNGW100) += arch/avr32/boards/atngw100/ +@@ -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/ @@ -181,41 +424,19 @@ 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/flash.c b/arch/avr32/boards/atngw100/flash.c -index f9b32a8..b07ae63 100644 ---- a/arch/avr32/boards/atngw100/flash.c -+++ b/arch/avr32/boards/atngw100/flash.c -@@ -15,7 +15,7 @@ - - #include - --static struct smc_config flash_config __initdata = { -+static struct smc_timing flash_timing __initdata = { - .ncs_read_setup = 0, - .nrd_setup = 40, - .ncs_write_setup = 0, -@@ -28,7 +28,9 @@ static struct smc_config flash_config __initdata = { - - .read_cycle = 120, - .write_cycle = 120, -+}; - -+static struct smc_config flash_config __initdata = { - .bus_width = 2, - .nrd_controlled = 1, - .nwe_controlled = 1, -@@ -82,6 +84,7 @@ static int __init atngw100_flash_init(void) - { - int ret; - -+ smc_set_timing(&flash_config, &flash_timing); - ret = smc_set_configuration(0, &flash_config); - if (ret < 0) { - printk(KERN_ERR "atngw100: failed to set NOR flash timing\n"); diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c -index ef80156..2a5f587 100644 +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 + #include + #include @@ -42,6 +42,11 @@ static struct spi_board_info spi0_board_info[] __initdata = { }, }; @@ -228,23 +449,15 @@ index ef80156..2a5f587 100644 /* * The next two functions should go away as the boot loader is * supposed to initialize the macb address registers with a valid -@@ -124,9 +129,13 @@ static struct platform_device ngw_gpio_leds = { +@@ -124,6 +129,7 @@ static struct platform_device ngw_gpio_leds = { } }; +#ifdef CONFIG_BOARD_ATNGW100_I2C_GPIO static struct i2c_gpio_platform_data i2c_gpio_data = { -- .sda_pin = GPIO_PIN_PA(6), -- .scl_pin = GPIO_PIN_PA(7), -+ .sda_pin = GPIO_PIN_PA(6), -+ .scl_pin = GPIO_PIN_PA(7), -+ .sda_is_open_drain = 1, -+ .scl_is_open_drain = 1, -+ .udelay = 2, /* close to 100 kHz */ - }; - - static struct platform_device i2c_gpio_device = { -@@ -136,6 +145,7 @@ static struct platform_device i2c_gpio_device = { + .sda_pin = GPIO_PIN_PA(6), + .scl_pin = GPIO_PIN_PA(7), +@@ -139,6 +145,7 @@ static struct platform_device i2c_gpio_device = { .platform_data = &i2c_gpio_data, }, }; @@ -252,26 +465,23 @@ index ef80156..2a5f587 100644 static int __init atngw100_init(void) { -@@ -154,6 +164,8 @@ static int __init atngw100_init(void) +@@ -157,6 +164,7 @@ static int __init atngw100_init(void) set_hw_addr(at32_add_device_eth(1, ð_data[1])); at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); + at32_add_device_mci(0, &mci0_data); -+ at32_add_device_usba(0, NULL); + at32_add_device_usba(0, NULL); for (i = 0; i < ARRAY_SIZE(ngw_leds); i++) { - at32_select_gpio(ngw_leds[i].gpio, -@@ -161,9 +173,15 @@ static int __init atngw100_init(void) +@@ -165,11 +173,15 @@ static int __init atngw100_init(void) } platform_device_register(&ngw_gpio_leds); -- at32_select_gpio(i2c_gpio_data.sda_pin, 0); -- at32_select_gpio(i2c_gpio_data.scl_pin, 0); +#ifdef CONFIG_BOARD_ATNGW100_I2C_GPIO -+ at32_select_gpio(i2c_gpio_data.sda_pin, -+ AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); -+ at32_select_gpio(i2c_gpio_data.scl_pin, -+ AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); + at32_select_gpio(i2c_gpio_data.sda_pin, + AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); + at32_select_gpio(i2c_gpio_data.scl_pin, + AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); platform_device_register(&i2c_gpio_device); +#else + at32_add_device_twi(0); @@ -280,14 +490,131 @@ index ef80156..2a5f587 100644 return 0; } diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig -index 718578f..b1f5a62 100644 +index 718578f..56a8d8e 100644 --- a/arch/avr32/boards/atstk1000/Kconfig +++ b/arch/avr32/boards/atstk1000/Kconfig -@@ -76,4 +76,16 @@ config BOARD_ATSTK1002_J2_RGB +@@ -1,34 +1,53 @@ + # STK1000 customization + +-if BOARD_ATSTK1002 ++if BOARD_ATSTK1000 + +-config BOARD_ATSTK1002_CUSTOM +- bool "Non-default STK-1002 jumper settings" ++choice ++ prompt "ATSTK1000 CPU daughterboard type" ++ default BOARD_ATSTK1002 ++ ++config BOARD_ATSTK1002 ++ bool "ATSTK1002" ++ select CPU_AT32AP7000 ++ ++config BOARD_ATSTK1003 ++ bool "ATSTK1003" ++ select CPU_AT32AP7001 ++ ++config BOARD_ATSTK1004 ++ bool "ATSTK1004" ++ select CPU_AT32AP7002 ++ ++endchoice ++ ++ ++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. + +-if BOARD_ATSTK1002_CUSTOM ++if BOARD_ATSTK100X_CUSTOM + +-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. + +-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. + +-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. + +-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 + + config BOARD_ATSTK1002_SW5_CUSTOM + bool "SW5: use MACB1 (not LCDC)" ++ depends on BOARD_ATSTK1002 + + config BOARD_ATSTK1002_SW6_CUSTOM + bool "SW6: more GPIOs (not MACB0)" ++ depends on BOARD_ATSTK1002 + + endif # custom + +-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. + +-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 + + 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. + +-config BOARD_ATSTK1002_J2_RGB ++config BOARD_ATSTK1000_J2_RGB + bool "RGB leds" + help + Select this if J2 is jumpered to the RGB leds. endchoice -+config BOARD_ATSTK1002_ENABLE_AC97 +-endif # stk 1002 ++config BOARD_ATSTK1000_EXTDAC ++ bool ++ depends on !BOARD_ATSTK100X_SW1_CUSTOM && !BOARD_ATSTK100X_SW3_CUSTOM ++ default y ++ ++config BOARD_ATSTK100X_ENABLE_AC97 + bool "Use AC97C instead of ABDAC" + help + Select this if you want to use the built-in AC97 controller @@ -295,37 +622,332 @@ index 718578f..b1f5a62 100644 + the same I/O pins on the AP7000, so both can't be enabled + at the same time. + -+ Note that the STK1000/STK1002 kit doesn't ship with an AC97 -+ codec on board, so say N unless you've got an expansion -+ board with an AC97 codec on it that you want to use. ++ Note that the STK1000 kit doesn't ship with an AC97 codec on ++ board, so say N unless you've got an expansion board with an ++ AC97 codec on it that you want to use. ++ ++config BOARD_ATSTK1000_CF_HACKS ++ bool "ATSTK1000 CompactFlash hacks" ++ depends on !BOARD_ATSTK100X_SW4_CUSTOM ++ help ++ Select this if you have re-routed the CompactFlash RESET and ++ CD signals to GPIOs on your STK1000. This is necessary for ++ reset and card detection to work properly, although some CF ++ cards may be able to cope without reset. ++ ++config BOARD_ATSTK1000_CF_RESET_PIN ++ hex "CompactFlash RESET pin" ++ default 0x30 ++ depends on BOARD_ATSTK1000_CF_HACKS ++ help ++ Select which GPIO pin to use for the CompactFlash RESET ++ signal. This is specified as a hexadecimal number and should ++ be defined as 0x20 * gpio_port + pin. ++ ++ The default is 0x30, which is pin 16 on PIOB, aka GPIO14. ++ ++config BOARD_ATSTK1000_CF_DETECT_PIN ++ hex "CompactFlash DETECT pin" ++ default 0x3e ++ depends on BOARD_ATSTK1000_CF_HACKS ++ help ++ Select which GPIO pin to use for the CompactFlash CD ++ signal. This is specified as a hexadecimal number and should ++ be defined as 0x20 * gpio_port + pin. ++ ++ 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 +--- a/arch/avr32/boards/atstk1000/Makefile ++++ b/arch/avr32/boards/atstk1000/Makefile +@@ -1,2 +1,4 @@ + obj-y += setup.o flash.o + 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 # stk 1002 + #endif /* __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H */ diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c -index c9981b7..f7fb509 100644 +index 5be0d13..90436fa 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c -@@ -16,6 +16,7 @@ +@@ -11,7 +11,6 @@ + #include + #include + #include +-#include + #include #include #include - #include -+#include +@@ -22,7 +21,7 @@ - #include