From 7aaebdead67bbb01ff172dd3116dc7a1649150e6 Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Tue, 16 Oct 2007 12:22:57 +0000 Subject: [PATCH] resync avr32 with 2.6.23.atmel.1 SVN-Revision: 9332 --- target/linux/avr32/Makefile | 2 +- .../avr32/{config-2.6.22 => config-2.6.23} | 3 + target/linux/avr32/patches/100-git_sync.patch | 15935 ++++++++-------- 3 files changed, 8217 insertions(+), 7723 deletions(-) rename target/linux/avr32/{config-2.6.22 => config-2.6.23} (97%) diff --git a/target/linux/avr32/Makefile b/target/linux/avr32/Makefile index 5c7c0bca3c..cd5b4a4d18 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.22.4 +LINUX_VERSION:=2.6.23 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/avr32/config-2.6.22 b/target/linux/avr32/config-2.6.23 similarity index 97% rename from target/linux/avr32/config-2.6.22 rename to target/linux/avr32/config-2.6.23 index 5c62fa6835..75520b4569 100644 --- a/target/linux/avr32/config-2.6.22 +++ b/target/linux/avr32/config-2.6.23 @@ -3,6 +3,7 @@ CONFIG_AP7000_16_BIT_SMC=y # CONFIG_AP7000_8_BIT_SMC is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ATM_DRIVERS is not set +# CONFIG_ATMEL_SSC is not set CONFIG_AVR32=y CONFIG_BOARD_ATNGW100=y # CONFIG_BOARD_ATNGW100_I2C_GPIO is not set @@ -100,7 +101,9 @@ CONFIG_SPI_ATMEL=y # CONFIG_SPI_DEBUG is not set CONFIG_SPI_MASTER=y # CONFIG_SPI_SPIDEV is not set +# CONFIG_SPI_TLE62X0 is not set CONFIG_SPI=y CONFIG_SUBARCH_AVR32B=y # CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_USER_NS is not set # CONFIG_WATCHDOG is not set diff --git a/target/linux/avr32/patches/100-git_sync.patch b/target/linux/avr32/patches/100-git_sync.patch index e9e96144ec..6ce6259b6a 100644 --- a/target/linux/avr32/patches/100-git_sync.patch +++ b/target/linux/avr32/patches/100-git_sync.patch @@ -1,6 +1,173 @@ -diff -x .git -Nur linux-2.6.22.1/arch/avr32/boards/atngw100/Kconfig linux-avr32.git/arch/avr32/boards/atngw100/Kconfig ---- linux-2.6.22.1/arch/avr32/boards/atngw100/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-avr32.git/arch/avr32/boards/atngw100/Kconfig 2007-07-13 11:24:16.000000000 +0200 + 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(-) + create mode 100644 arch/avr32/boards/atngw100/Kconfig + 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/mach-at32ap/gpio-dev.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/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 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 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/MAINTAINERS b/MAINTAINERS +index 9a91d9e..587afe3 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -669,6 +669,13 @@ P: Haavard Skinnemoen + M: hskinnemoen@atmel.com + S: Supported + ++ATMEL USBA UDC DRIVER ++P: Haavard Skinnemoen ++M: hskinnemoen@atmel.com ++L: kernel@avr32linux.org ++W: http://avr32linux.org/twiki/bin/view/Main/AtmelUsbDeviceDriver ++S: Supported ++ + ATMEL WIRELESS DRIVER + P: Simon Kelley + M: simon@thekelleys.org.uk +diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig +index d12346a..ec6c7c5 100644 +--- a/arch/avr32/Kconfig ++++ b/arch/avr32/Kconfig +@@ -116,6 +116,9 @@ 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" +@@ -175,6 +178,10 @@ config OWNERSHIP_TRACE + enabling Nexus-compliant debuggers to keep track of the PID of the + currently executing task. + ++config DW_DMAC ++ tristate "Synopsys DesignWare DMA Controller support" ++ default y if CPU_AT32AP7000 ++ + # FPU emulation goes here + + source "kernel/Kconfig.hz" +diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile +index dc6bc01..eb72198 100644 +--- a/arch/avr32/Makefile ++++ b/arch/avr32/Makefile +@@ -31,6 +31,7 @@ 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-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 @@ +# NGW100 customization + @@ -14,31 +181,42 @@ diff -x .git -Nur linux-2.6.22.1/arch/avr32/boards/atngw100/Kconfig linux-avr32. + + Choose 'Y' here if you're having i2c-related problems and + want to rule out the i2c bus driver. -diff -x .git -Nur linux-2.6.22.1/arch/avr32/boards/atngw100/setup.c linux-avr32.git/arch/avr32/boards/atngw100/setup.c ---- linux-2.6.22.1/arch/avr32/boards/atngw100/setup.c 2007-07-10 20:56:30.000000000 +0200 -+++ linux-avr32.git/arch/avr32/boards/atngw100/setup.c 2007-07-13 11:24:16.000000000 +0200 -@@ -9,10 +9,12 @@ - */ - #include - #include -+#include - #include - #include - #include - #include -+#include - #include - - #include -@@ -21,6 +23,7 @@ - #include - #include - #include -+#include +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, ++}; - /* Initialized by bootloader-specific startup code. */ - struct tag *bootloader_tags __initdata; -@@ -39,6 +42,11 @@ ++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 +--- a/arch/avr32/boards/atngw100/setup.c ++++ b/arch/avr32/boards/atngw100/setup.c +@@ -42,6 +42,11 @@ static struct spi_board_info spi0_board_info[] __initdata = { }, }; @@ -50,329 +228,237 @@ diff -x .git -Nur linux-2.6.22.1/arch/avr32/boards/atngw100/setup.c linux-avr32. /* * The next two functions should go away as the boot loader is * supposed to initialize the macb address registers with a valid -@@ -100,8 +108,46 @@ - at32_setup_serial_console(0); - } +@@ -124,9 +129,13 @@ static struct platform_device ngw_gpio_leds = { + } + }; -+static const struct gpio_led ngw_leds[] = { -+ { .name = "sys", .gpio = GPIO_PIN_PA(16), .active_low = 1, -+ .default_trigger = "heartbeat", -+ }, -+ { .name = "a", .gpio = GPIO_PIN_PA(19), .active_low = 1, }, -+ { .name = "b", .gpio = GPIO_PIN_PE(19), .active_low = 1, }, -+}; -+ -+static const struct gpio_led_platform_data ngw_led_data = { -+ .num_leds = ARRAY_SIZE(ngw_leds), -+ .leds = (void *) ngw_leds, -+}; -+ -+static struct platform_device ngw_gpio_leds = { -+ .name = "leds-gpio", -+ .id = -1, -+ .dev = { -+ .platform_data = (void *) &ngw_led_data, -+ } -+}; -+ +#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), -+}; -+ -+static struct platform_device i2c_gpio_device = { -+ .name = "i2c-gpio", -+ .id = 0, -+ .dev = { -+ .platform_data = &i2c_gpio_data, -+ }, -+}; + 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 = { + .platform_data = &i2c_gpio_data, + }, + }; +#endif -+ + static int __init atngw100_init(void) { -+ unsigned i; -+ - /* - * ATNGW100 uses 16-bit SDRAM interface, so we don't need to - * reserve any pins for it. -@@ -115,6 +161,22 @@ +@@ -154,6 +164,8 @@ 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); -+ -+ for (i = 0; i < ARRAY_SIZE(ngw_leds); i++) { -+ at32_select_gpio(ngw_leds[i].gpio, -+ AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); -+ } -+ platform_device_register(&ngw_gpio_leds); -+ + + 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) + } + 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, 0); -+ at32_select_gpio(i2c_gpio_data.scl_pin, 0); -+ platform_device_register(&i2c_gpio_device); ++ 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); +#endif return 0; } -diff -x .git -Nur linux-2.6.22.1/arch/avr32/boards/atstk1000/atstk1002.c linux-avr32.git/arch/avr32/boards/atstk1000/atstk1002.c ---- linux-2.6.22.1/arch/avr32/boards/atstk1000/atstk1002.c 2007-07-10 20:56:30.000000000 +0200 -+++ linux-avr32.git/arch/avr32/boards/atstk1000/atstk1002.c 2007-07-12 13:59:49.000000000 +0200 -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include +diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig +index 718578f..b1f5a62 100644 +--- a/arch/avr32/boards/atstk1000/Kconfig ++++ b/arch/avr32/boards/atstk1000/Kconfig +@@ -76,4 +76,16 @@ config BOARD_ATSTK1002_J2_RGB + + endchoice + ++config BOARD_ATSTK1002_ENABLE_AC97 ++ bool "Use AC97C instead of ABDAC" ++ help ++ Select this if you want to use the built-in AC97 controller ++ instead of the built-in Audio Bitstream DAC. These share ++ 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. ++ + endif # stk 1002 +diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c +index c9981b7..f7fb509 100644 +--- a/arch/avr32/boards/atstk1000/atstk1002.c ++++ b/arch/avr32/boards/atstk1000/atstk1002.c +@@ -16,6 +16,7 @@ #include #include -@@ -27,7 +28,6 @@ - - #include "atstk1000.h" + #include ++#include --#define SW2_DEFAULT /* MMCI and UART_A available */ + #include