From f2595b4c16718e2e0384d5ca01aadbd690c1688f Mon Sep 17 00:00:00 2001 From: Ulf Samuelsson Date: Tue, 31 Jul 2007 15:47:32 +0000 Subject: Add AVR32 kernel patches for linux 2.6.22.1 --- .../linux-2.6.22.1-003-atmel.3-avr32-updates.patch | 14820 +++++++++++++++++++ ...ux-2.6.22.1-007-ipmisensors-20070314-1214.patch | 1914 +++ 2 files changed, 16734 insertions(+) create mode 100644 toolchain/kernel-headers/linux-2.6.22.1-003-atmel.3-avr32-updates.patch create mode 100644 toolchain/kernel-headers/linux-2.6.22.1-007-ipmisensors-20070314-1214.patch (limited to 'toolchain') diff --git a/toolchain/kernel-headers/linux-2.6.22.1-003-atmel.3-avr32-updates.patch b/toolchain/kernel-headers/linux-2.6.22.1-003-atmel.3-avr32-updates.patch new file mode 100644 index 000000000..9da7547b3 --- /dev/null +++ b/toolchain/kernel-headers/linux-2.6.22.1-003-atmel.3-avr32-updates.patch @@ -0,0 +1,14820 @@ +diff --git a/MAINTAINERS b/MAINTAINERS +index df40a4e..3c5cfef 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -674,6 +674,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 3ec7658..ec6c7c5 100644 +--- a/arch/avr32/Kconfig ++++ b/arch/avr32/Kconfig +@@ -113,6 +113,13 @@ config BOARD_ATNGW100 + bool "ATNGW100 Network Gateway" + 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" + default LOADER_U_BOOT +@@ -171,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" +@@ -185,6 +196,27 @@ config CMDLINE + + endmenu + ++menu "Power managment options" ++ ++menu "CPU Frequency scaling" ++ ++source "drivers/cpufreq/Kconfig" ++ ++config CPU_FREQ_AT32AP ++ bool "CPU frequency driver for AT32AP" ++ depends on CPU_FREQ && PLATFORM_AT32AP ++ default n ++ help ++ This enables the CPU frequency driver for AT32AP processors. ++ ++ For details, take a look in . ++ ++ If in doubt, say N. ++ ++endmenu ++ ++endmenu ++ + menu "Bus options" + + config PCI +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/setup.c b/arch/avr32/boards/atngw100/setup.c +index 6c4dc0a..d649974 100644 +--- a/arch/avr32/boards/atngw100/setup.c ++++ b/arch/avr32/boards/atngw100/setup.c +@@ -9,10 +9,12 @@ + */ + #include + #include ++#include + #include + #include + #include + #include ++#include + #include + + #include +@@ -21,6 +23,7 @@ + #include + #include + #include ++#include + + /* Initialized by bootloader-specific startup code. */ + struct tag *bootloader_tags __initdata; +@@ -39,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 +@@ -100,8 +108,46 @@ void __init setup_board(void) + at32_setup_serial_console(0); + } + ++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, ++ }, ++}; ++#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 @@ 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); ++ ++#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); ++#else ++ at32_add_device_twi(0); ++#endif + + return 0; + } +diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig +new file mode 100644 +index 0000000..718578f +--- /dev/null ++++ b/arch/avr32/boards/atstk1000/Kconfig +@@ -0,0 +1,79 @@ ++# STK1000 customization ++ ++if BOARD_ATSTK1002 ++ ++config BOARD_ATSTK1002_CUSTOM ++ bool "Non-default STK-1002 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 ++ ++config BOARD_ATSTK1002_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 ++ 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 ++ 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 ++ 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 ++ PCI-format connector) connect a video sensor. ++ ++config BOARD_ATSTK1002_SW5_CUSTOM ++ bool "SW5: use MACB1 (not LCDC)" ++ ++config BOARD_ATSTK1002_SW6_CUSTOM ++ bool "SW6: more GPIOs (not MACB0)" ++ ++endif # custom ++ ++config BOARD_ATSTK1002_SPI1 ++ bool "Configure SPI1 controller" ++ depends on !BOARD_ATSTK1002_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 ++ bool ++ default BOARD_ATSTK1002_J2_LED8 || BOARD_ATSTK1002_J2_RGB ++ ++choice ++ prompt "LEDs connected to J2:" ++ depends on LEDS_GPIO && !BOARD_ATSTK1002_SW4_CUSTOM ++ optional ++ help ++ Select this if you have jumpered the J2 jumper block to the ++ LED0..LED7 amber leds, or to the RGB leds, using a ten-pin ++ IDC cable. A default "heartbeat" trigger is provided, but ++ you can of course override this. ++ ++config BOARD_ATSTK1002_J2_LED8 ++ bool "LED0..LED7" ++ help ++ Select this if J2 is jumpered to LED0..LED7 amber leds. ++ ++config BOARD_ATSTK1002_J2_RGB ++ bool "RGB leds" ++ help ++ Select this if J2 is jumpered to the RGB leds. ++ ++endchoice ++ ++endif # stk 1002 +diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c +index e253e86..c958fd4 100644 +--- a/arch/avr32/boards/atstk1000/atstk1002.c ++++ b/arch/avr32/boards/atstk1000/atstk1002.c +@@ -11,10 +11,12 @@ + #include + #include + #include ++#include + #include + #include + #include + #include ++#include + + #include