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 + +config BOARD_ATNGW100_I2C_GPIO + bool "Use GPIO for i2c instead of built-in TWI module" + help + The driver for the built-in TWI module has been plagued by + various problems, while the i2c-gpio driver is based on the + trusty old i2c-algo-bit bitbanging engine, making it work + on pretty much any setup. + + 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 --- 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 = { }, }; +static struct mci_platform_data __initdata mci0_data = { + .detect_pin = GPIO_PIN_PC(25), + .wp_pin = GPIO_PIN_PE(0), +}; + /* * 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 = { } }; +#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 = { .platform_data = &i2c_gpio_data, }, }; +#endif static int __init atngw100_init(void) { @@ -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, @@ -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, + 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 --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 #include +#include #include