X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/8166449e2a9bd8b1dcd9ca301060540966393292..3af3950aff488dd093e97736e909427a236d76bb:/target/linux/avr32/patches/100-git_sync.patch?ds=inline diff --git a/target/linux/avr32/patches/100-git_sync.patch b/target/linux/avr32/patches/100-git_sync.patch index 6ce6259b6..2f6291a7d 100644 --- a/target/linux/avr32/patches/100-git_sync.patch +++ b/target/linux/avr32/patches/100-git_sync.patch @@ -1,136 +1,53 @@ - 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/Documentation/serial/driver ++++ b/Documentation/serial/driver +@@ -186,6 +186,17 @@ + Locking: port_sem taken. + Interrupts: caller dependent. + ++ flush_buffer(port) ++ Flush any write buffers, reset any DMA state and stop any ++ ongoing DMA transfers. ++ ++ This will be called whenever the port->info->xmit circular ++ buffer is cleared. ++ ++ Locking: port->lock taken. ++ Interrupts: locally disabled. ++ This call must not sleep ++ + set_termios(port,termios,oldtermios) + Change the port parameters, including word length, parity, stop + bits. Update read_status_mask and ignore_status_mask to indicate --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig -@@ -116,6 +116,9 @@ endchoice +@@ -47,6 +47,9 @@ + config GENERIC_TIME + def_bool y + ++config GENERIC_CLOCKEVENTS ++ def_bool y ++ + config RWSEM_XCHGADD_ALGORITHM + def_bool n + +@@ -70,6 +73,8 @@ + + menu "System Type and features" + ++source "kernel/time/Kconfig" ++ + config SUBARCH_AVR32B + bool + config MMU +@@ -83,6 +88,7 @@ + select MMU + select PERFORMANCE_COUNTERS + select HAVE_GPIO_LIB ++ select GENERIC_ALLOCATOR + + # + # CPU types +@@ -117,6 +123,9 @@ if BOARD_ATSTK1000 source "arch/avr32/boards/atstk1000/Kconfig" endif @@ -140,9 +57,19 @@ index d12346a..ec6c7c5 100644 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. +@@ -142,6 +151,9 @@ + + source "kernel/Kconfig.preempt" + ++config QUICKLIST ++ def_bool y ++ + config HAVE_ARCH_BOOTMEM_NODE + def_bool n + +@@ -180,6 +192,10 @@ + be dumped to the console when a Non-Maskable Interrupt + happens. +config DW_DMAC + tristate "Synopsys DesignWare DMA Controller support" @@ -151,21 +78,28 @@ index d12346a..ec6c7c5 100644 # FPU emulation goes here source "kernel/Kconfig.hz" -diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile -index dc6bc01..eb72198 100644 +@@ -196,6 +212,11 @@ + + menu "Power management options" + ++config ARCH_SUSPEND_POSSIBLE ++ def_bool y ++ ++source "kernel/power/Kconfig" ++ + menu "CPU Frequency scaling" + + source "drivers/cpufreq/Kconfig" --- 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/ +@@ -32,6 +32,7 @@ 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 @@ @@ -181,42 +115,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/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 = { +@@ -25,6 +25,13 @@ + #include + #include + ++/* 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, }, }; @@ -228,23 +149,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 +136,7 @@ } }; +#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 +152,7 @@ .platform_data = &i2c_gpio_data, }, }; @@ -252,42 +165,48 @@ index ef80156..2a5f587 100644 static int __init atngw100_init(void) { -@@ -154,6 +164,8 @@ 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)); + 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 +180,15 @@ } 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); ++ 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..b1f5a62 100644 --- a/arch/avr32/boards/atstk1000/Kconfig +++ b/arch/avr32/boards/atstk1000/Kconfig -@@ -76,4 +76,16 @@ config BOARD_ATSTK1002_J2_RGB +@@ -18,6 +18,10 @@ + bool "ATSTK1004" + select CPU_AT32AP7002 ++config BOARD_ATSTK1006 ++ bool "ATSTK1006" ++ select CPU_AT32AP7000 ++ endchoice -+config BOARD_ATSTK1002_ENABLE_AC97 + +@@ -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 + Select this if you want to use the built-in AC97 controller @@ -295,1007 +214,1836 @@ 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. + - endif # stk 1002 -diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c -index c9981b7..f7fb509 100644 ++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. ++ ++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 +@@ -2,3 +2,4 @@ + obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o + obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o + obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o ++obj-$(CONFIG_BOARD_ATSTK1006) += atstk1002.o --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - - #include