X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/cc8d0a8850bff29fb230afbedadc390285f8c5ef..3af3950aff488dd093e97736e909427a236d76bb:/target/linux/avr32/patches/100-git_sync.patch?ds=sidebyside diff --git a/target/linux/avr32/patches/100-git_sync.patch b/target/linux/avr32/patches/100-git_sync.patch index a840e45f3..2f6291a7d 100644 --- a/target/linux/avr32/patches/100-git_sync.patch +++ b/target/linux/avr32/patches/100-git_sync.patch @@ -1,423 +1,107 @@ -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/at91cap9_devices.c avr32-2.6/arch/arm/mach-at91/at91cap9_devices.c ---- linux-2.6.25.6/arch/arm/mach-at91/at91cap9_devices.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/at91cap9_devices.c 2008-06-12 15:09:38.603815938 +0200 -@@ -278,20 +278,25 @@ - * -------------------------------------------------------------------- */ - - #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) --static struct at91_nand_data nand_data; -+static struct atmel_nand_data nand_data; - - #define NAND_BASE AT91_CHIPSELECT_3 - - static struct resource nand_resources[] = { -- { -+ [0] = { - .start = NAND_BASE, - .end = NAND_BASE + SZ_256M - 1, - .flags = IORESOURCE_MEM, -+ }, -+ [1] = { -+ .start = AT91_BASE_SYS + AT91_ECC, -+ .end = AT91_BASE_SYS + AT91_ECC + SZ_512 - 1, -+ .flags = IORESOURCE_MEM, - } - }; - - static struct platform_device at91cap9_nand_device = { -- .name = "at91_nand", -+ .name = "atmel_nand", - .id = -1, - .dev = { - .platform_data = &nand_data, -@@ -300,7 +305,7 @@ - .num_resources = ARRAY_SIZE(nand_resources), - }; - --void __init at91_add_device_nand(struct at91_nand_data *data) -+void __init at91_add_device_nand(struct atmel_nand_data *data) - { - unsigned long csa, mode; - -@@ -341,7 +346,7 @@ - platform_device_register(&at91cap9_nand_device); - } - #else --void __init at91_add_device_nand(struct at91_nand_data *data) {} -+void __init at91_add_device_nand(struct atmel_nand_data *data) {} - #endif - - /* -------------------------------------------------------------------- -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/at91rm9200_devices.c avr32-2.6/arch/arm/mach-at91/at91rm9200_devices.c ---- linux-2.6.25.6/arch/arm/mach-at91/at91rm9200_devices.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/at91rm9200_devices.c 2008-06-12 15:09:38.603815938 +0200 -@@ -369,7 +369,7 @@ - * -------------------------------------------------------------------- */ - - #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) --static struct at91_nand_data nand_data; -+static struct atmel_nand_data nand_data; - - #define NAND_BASE AT91_CHIPSELECT_3 - -@@ -382,7 +382,7 @@ - }; - - static struct platform_device at91rm9200_nand_device = { -- .name = "at91_nand", -+ .name = "atmel_nand", - .id = -1, - .dev = { - .platform_data = &nand_data, -@@ -391,7 +391,7 @@ - .num_resources = ARRAY_SIZE(nand_resources), - }; - --void __init at91_add_device_nand(struct at91_nand_data *data) -+void __init at91_add_device_nand(struct atmel_nand_data *data) - { - unsigned int csa; - -@@ -429,7 +429,7 @@ - platform_device_register(&at91rm9200_nand_device); - } - #else --void __init at91_add_device_nand(struct at91_nand_data *data) {} -+void __init at91_add_device_nand(struct atmel_nand_data *data) {} - #endif - - -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/at91sam9260_devices.c avr32-2.6/arch/arm/mach-at91/at91sam9260_devices.c ---- linux-2.6.25.6/arch/arm/mach-at91/at91sam9260_devices.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/at91sam9260_devices.c 2008-06-12 15:09:38.603815938 +0200 -@@ -283,20 +283,25 @@ - * -------------------------------------------------------------------- */ - - #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) --static struct at91_nand_data nand_data; -+static struct atmel_nand_data nand_data; - - #define NAND_BASE AT91_CHIPSELECT_3 - - static struct resource nand_resources[] = { -- { -+ [0] = { - .start = NAND_BASE, - .end = NAND_BASE + SZ_256M - 1, - .flags = IORESOURCE_MEM, -+ }, -+ [1] = { -+ .start = AT91_BASE_SYS + AT91_ECC, -+ .end = AT91_BASE_SYS + AT91_ECC + SZ_512 - 1, -+ .flags = IORESOURCE_MEM, - } - }; - - static struct platform_device at91sam9260_nand_device = { -- .name = "at91_nand", -+ .name = "atmel_nand", - .id = -1, - .dev = { - .platform_data = &nand_data, -@@ -305,7 +310,7 @@ - .num_resources = ARRAY_SIZE(nand_resources), - }; - --void __init at91_add_device_nand(struct at91_nand_data *data) -+void __init at91_add_device_nand(struct atmel_nand_data *data) - { - unsigned long csa, mode; - -@@ -346,7 +351,7 @@ - platform_device_register(&at91sam9260_nand_device); - } - #else --void __init at91_add_device_nand(struct at91_nand_data *data) {} -+void __init at91_add_device_nand(struct atmel_nand_data *data) {} - #endif - - -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/at91sam9261_devices.c avr32-2.6/arch/arm/mach-at91/at91sam9261_devices.c ---- linux-2.6.25.6/arch/arm/mach-at91/at91sam9261_devices.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/at91sam9261_devices.c 2008-06-12 15:09:38.607815889 +0200 -@@ -199,7 +199,7 @@ - * -------------------------------------------------------------------- */ - - #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) --static struct at91_nand_data nand_data; -+static struct atmel_nand_data nand_data; - - #define NAND_BASE AT91_CHIPSELECT_3 - -@@ -211,8 +211,8 @@ - } - }; - --static struct platform_device at91_nand_device = { -- .name = "at91_nand", -+static struct platform_device atmel_nand_device = { -+ .name = "atmel_nand", - .id = -1, - .dev = { - .platform_data = &nand_data, -@@ -221,7 +221,7 @@ - .num_resources = ARRAY_SIZE(nand_resources), - }; - --void __init at91_add_device_nand(struct at91_nand_data *data) -+void __init at91_add_device_nand(struct atmel_nand_data *data) - { - unsigned long csa, mode; - -@@ -262,11 +262,11 @@ - at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */ - - nand_data = *data; -- platform_device_register(&at91_nand_device); -+ platform_device_register(&atmel_nand_device); - } - - #else --void __init at91_add_device_nand(struct at91_nand_data *data) {} -+void __init at91_add_device_nand(struct atmel_nand_data *data) {} - #endif - - -@@ -539,6 +539,20 @@ - at91_set_B_periph(AT91_PIN_PB28, 0); /* LCDD23 */ - #endif +--- 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 +@@ -47,6 +47,9 @@ + config GENERIC_TIME + def_bool y -+#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 ++config GENERIC_CLOCKEVENTS ++ def_bool y + - lcdc_data = *data; - platform_device_register(&at91_lcdc_device); - } -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/at91sam9263_devices.c avr32-2.6/arch/arm/mach-at91/at91sam9263_devices.c ---- linux-2.6.25.6/arch/arm/mach-at91/at91sam9263_devices.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/at91sam9263_devices.c 2008-06-12 15:09:38.607815889 +0200 -@@ -353,20 +353,25 @@ - * -------------------------------------------------------------------- */ - - #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) --static struct at91_nand_data nand_data; -+static struct atmel_nand_data nand_data; - - #define NAND_BASE AT91_CHIPSELECT_3 - - static struct resource nand_resources[] = { -- { -+ [0] = { - .start = NAND_BASE, - .end = NAND_BASE + SZ_256M - 1, - .flags = IORESOURCE_MEM, -+ }, -+ [1] = { -+ .start = AT91_BASE_SYS + AT91_ECC0, -+ .end = AT91_BASE_SYS + AT91_ECC0 + SZ_512 - 1, -+ .flags = IORESOURCE_MEM, - } - }; - - static struct platform_device at91sam9263_nand_device = { -- .name = "at91_nand", -+ .name = "atmel_nand", - .id = -1, - .dev = { - .platform_data = &nand_data, -@@ -375,7 +380,7 @@ - .num_resources = ARRAY_SIZE(nand_resources), - }; - --void __init at91_add_device_nand(struct at91_nand_data *data) -+void __init at91_add_device_nand(struct atmel_nand_data *data) - { - unsigned long csa, mode; - -@@ -416,7 +421,7 @@ - platform_device_register(&at91sam9263_nand_device); - } - #else --void __init at91_add_device_nand(struct at91_nand_data *data) {} -+void __init at91_add_device_nand(struct atmel_nand_data *data) {} - #endif - - -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/at91sam9rl_devices.c avr32-2.6/arch/arm/mach-at91/at91sam9rl_devices.c ---- linux-2.6.25.6/arch/arm/mach-at91/at91sam9rl_devices.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/at91sam9rl_devices.c 2008-06-12 15:09:38.607815889 +0200 -@@ -100,20 +100,25 @@ - * -------------------------------------------------------------------- */ - - #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) --static struct at91_nand_data nand_data; -+static struct atmel_nand_data nand_data; - - #define NAND_BASE AT91_CHIPSELECT_3 - - static struct resource nand_resources[] = { -- { -+ [0] = { - .start = NAND_BASE, - .end = NAND_BASE + SZ_256M - 1, - .flags = IORESOURCE_MEM, -+ }, -+ [1] = { -+ .start = AT91_BASE_SYS + AT91_ECC, -+ .end = AT91_BASE_SYS + AT91_ECC + SZ_512 - 1, -+ .flags = IORESOURCE_MEM, - } - }; - --static struct platform_device at91_nand_device = { -- .name = "at91_nand", -+static struct platform_device atmel_nand_device = { -+ .name = "atmel_nand", - .id = -1, - .dev = { - .platform_data = &nand_data, -@@ -122,7 +127,7 @@ - .num_resources = ARRAY_SIZE(nand_resources), - }; + config RWSEM_XCHGADD_ALGORITHM + def_bool n --void __init at91_add_device_nand(struct at91_nand_data *data) -+void __init at91_add_device_nand(struct atmel_nand_data *data) - { - unsigned long csa; +@@ -70,6 +73,8 @@ -@@ -159,11 +164,11 @@ - at91_set_A_periph(AT91_PIN_PB5, 0); /* NANDWE */ + menu "System Type and features" - nand_data = *data; -- platform_device_register(&at91_nand_device); -+ platform_device_register(&atmel_nand_device); - } ++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 - #else --void __init at91_add_device_nand(struct at91_nand_data *data) {} -+void __init at91_add_device_nand(struct atmel_nand_data *data) {} - #endif + # + # CPU types +@@ -117,6 +123,9 @@ + 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" +@@ -142,6 +151,9 @@ -@@ -376,6 +381,20 @@ - at91_set_B_periph(AT91_PIN_PC24, 0); /* LCDD22 */ - at91_set_B_periph(AT91_PIN_PC25, 0); /* LCDD23 */ + source "kernel/Kconfig.preempt" -+#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 ++config QUICKLIST ++ def_bool y + - lcdc_data = *data; - platform_device_register(&at91_lcdc_device); - } -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/board-cap9adk.c avr32-2.6/arch/arm/mach-at91/board-cap9adk.c ---- linux-2.6.25.6/arch/arm/mach-at91/board-cap9adk.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/board-cap9adk.c 2008-06-12 15:09:38.607815889 +0200 -@@ -175,7 +175,7 @@ - return cap9adk_nand_partitions; - } + config HAVE_ARCH_BOOTMEM_NODE + def_bool n --static struct at91_nand_data __initdata cap9adk_nand_data = { -+static struct atmel_nand_data __initdata cap9adk_nand_data = { - .ale = 21, - .cle = 22, - // .det_pin = ... not connected -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/board-dk.c avr32-2.6/arch/arm/mach-at91/board-dk.c ---- linux-2.6.25.6/arch/arm/mach-at91/board-dk.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/board-dk.c 2008-06-12 15:09:38.611815840 +0200 -@@ -151,7 +151,7 @@ - return dk_nand_partition; - } +@@ -180,6 +192,10 @@ + be dumped to the console when a Non-Maskable Interrupt + happens. --static struct at91_nand_data __initdata dk_nand_data = { -+static struct atmel_nand_data __initdata dk_nand_data = { - .ale = 22, - .cle = 21, - .det_pin = AT91_PIN_PB1, -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/board-kb9202.c avr32-2.6/arch/arm/mach-at91/board-kb9202.c ---- linux-2.6.25.6/arch/arm/mach-at91/board-kb9202.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/board-kb9202.c 2008-06-12 15:09:38.611815840 +0200 -@@ -102,7 +102,7 @@ - return kb9202_nand_partition; - } ++config DW_DMAC ++ tristate "Synopsys DesignWare DMA Controller support" ++ default y if CPU_AT32AP7000 ++ + # FPU emulation goes here --static struct at91_nand_data __initdata kb9202_nand_data = { -+static struct atmel_nand_data __initdata kb9202_nand_data = { - .ale = 22, - .cle = 21, - // .det_pin = ... not there -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/board-sam9260ek.c avr32-2.6/arch/arm/mach-at91/board-sam9260ek.c ---- linux-2.6.25.6/arch/arm/mach-at91/board-sam9260ek.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/board-sam9260ek.c 2008-06-12 15:09:38.611815840 +0200 -@@ -146,7 +146,7 @@ - return ek_nand_partition; - } + source "kernel/Kconfig.hz" +@@ -196,6 +212,11 @@ --static struct at91_nand_data __initdata ek_nand_data = { -+static struct atmel_nand_data __initdata ek_nand_data = { - .ale = 21, - .cle = 22, - // .det_pin = ... not connected -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/board-sam9261ek.c avr32-2.6/arch/arm/mach-at91/board-sam9261ek.c ---- linux-2.6.25.6/arch/arm/mach-at91/board-sam9261ek.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/board-sam9261ek.c 2008-06-12 15:09:38.611815840 +0200 -@@ -189,7 +189,7 @@ - return ek_nand_partition; - } + menu "Power management options" --static struct at91_nand_data __initdata ek_nand_data = { -+static struct atmel_nand_data __initdata ek_nand_data = { - .ale = 22, - .cle = 21, - // .det_pin = ... not connected -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/board-sam9263ek.c avr32-2.6/arch/arm/mach-at91/board-sam9263ek.c ---- linux-2.6.25.6/arch/arm/mach-at91/board-sam9263ek.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/board-sam9263ek.c 2008-06-12 15:09:38.611815840 +0200 -@@ -192,7 +192,7 @@ - return ek_nand_partition; - } ++config ARCH_SUSPEND_POSSIBLE ++ def_bool y ++ ++source "kernel/power/Kconfig" ++ + menu "CPU Frequency scaling" --static struct at91_nand_data __initdata ek_nand_data = { -+static struct atmel_nand_data __initdata ek_nand_data = { - .ale = 21, - .cle = 22, - // .det_pin = ... not connected -diff --exclude=.git -urN linux-2.6.25.6/arch/arm/mach-at91/board-sam9rlek.c avr32-2.6/arch/arm/mach-at91/board-sam9rlek.c ---- linux-2.6.25.6/arch/arm/mach-at91/board-sam9rlek.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/arm/mach-at91/board-sam9rlek.c 2008-06-12 15:09:38.611815840 +0200 -@@ -93,7 +93,7 @@ - return ek_nand_partition; - } + source "drivers/cpufreq/Kconfig" +--- a/arch/avr32/Makefile ++++ b/arch/avr32/Makefile +@@ -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/ --static struct at91_nand_data __initdata ek_nand_data = { -+static struct atmel_nand_data __initdata ek_nand_data = { - .ale = 21, - .cle = 22, - // .det_pin = ... not connected -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atngw100/Kconfig avr32-2.6/arch/avr32/boards/atngw100/Kconfig ---- linux-2.6.25.6/arch/avr32/boards/atngw100/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ avr32-2.6/arch/avr32/boards/atngw100/Kconfig 2008-06-12 15:09:38.711815728 +0200 + archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap +--- /dev/null ++++ b/arch/avr32/boards/atngw100/Kconfig @@ -0,0 +1,12 @@ +# NGW100 customization + @@ -431,9 +115,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atngw100/Kconfig avr32 + + Choose 'Y' here if you're having i2c-related problems and + want to rule out the i2c bus driver. -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atngw100/setup.c avr32-2.6/arch/avr32/boards/atngw100/setup.c ---- linux-2.6.25.6/arch/avr32/boards/atngw100/setup.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/boards/atngw100/setup.c 2008-06-12 15:09:38.711815728 +0200 +--- a/arch/avr32/boards/atngw100/setup.c ++++ b/arch/avr32/boards/atngw100/setup.c @@ -25,6 +25,13 @@ #include #include @@ -506,9 +189,89 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atngw100/setup.c avr32 return 0; } -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1002.c avr32-2.6/arch/avr32/boards/atstk1000/atstk1002.c ---- linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1002.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/boards/atstk1000/atstk1002.c 2008-06-12 15:09:38.711815728 +0200 +--- a/arch/avr32/boards/atstk1000/Kconfig ++++ b/arch/avr32/boards/atstk1000/Kconfig +@@ -18,6 +18,10 @@ + bool "ATSTK1004" + select CPU_AT32AP7002 + ++config BOARD_ATSTK1006 ++ bool "ATSTK1006" ++ select CPU_AT32AP7000 ++ + endchoice + + +@@ -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 ++ 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 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. ++ ++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 @@ -1,7 +1,7 @@ /* - * ATSTK1002 daughterboard-specific init code @@ -650,7 +413,7 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1002.c #endif at32_add_device_usba(0, NULL); +#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_AC97 -+ at32_add_device_ac97c(0); ++ at32_add_device_ac97c(0, NULL); +#else + at32_add_device_abdac(0); +#endif @@ -665,9 +428,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1002.c atstk1000_setup_j2_leds(); atstk1002_setup_extdac(); -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1003.c avr32-2.6/arch/avr32/boards/atstk1000/atstk1003.c ---- linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1003.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/boards/atstk1000/atstk1003.c 2008-06-12 15:09:38.711815728 +0200 +--- a/arch/avr32/boards/atstk1000/atstk1003.c ++++ b/arch/avr32/boards/atstk1000/atstk1003.c @@ -27,6 +27,13 @@ #include "atstk1000.h" @@ -711,7 +473,7 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1003.c #endif at32_add_device_usba(0, NULL); +#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_AC97 -+ at32_add_device_ac97c(0); ++ at32_add_device_ac97c(0, NULL); +#else + at32_add_device_abdac(0); +#endif @@ -726,9 +488,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1003.c atstk1000_setup_j2_leds(); atstk1003_setup_extdac(); -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1004.c avr32-2.6/arch/avr32/boards/atstk1000/atstk1004.c ---- linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1004.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/boards/atstk1000/atstk1004.c 2008-06-12 15:09:38.715815679 +0200 +--- a/arch/avr32/boards/atstk1000/atstk1004.c ++++ b/arch/avr32/boards/atstk1000/atstk1004.c @@ -29,6 +29,13 @@ #include "atstk1000.h" @@ -755,7 +516,7 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1004.c + fbmem_start, fbmem_size, 0); at32_add_device_usba(0, NULL); +#ifdef CONFIG_BOARD_ATSTK100X_ENABLE_AC97 -+ at32_add_device_ac97c(0); ++ at32_add_device_ac97c(0, NULL); +#else + at32_add_device_abdac(0); +#endif @@ -769,92 +530,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/atstk1004.c atstk1000_setup_j2_leds(); atstk1004_setup_extdac(); -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/Kconfig avr32-2.6/arch/avr32/boards/atstk1000/Kconfig ---- linux-2.6.25.6/arch/avr32/boards/atstk1000/Kconfig 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/boards/atstk1000/Kconfig 2008-06-12 15:09:38.711815728 +0200 -@@ -18,6 +18,10 @@ - bool "ATSTK1004" - select CPU_AT32AP7002 - -+config BOARD_ATSTK1006 -+ bool "ATSTK1006" -+ select CPU_AT32AP7000 -+ - endchoice - - -@@ -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 -+ 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 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. -+ -+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 -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/boards/atstk1000/Makefile avr32-2.6/arch/avr32/boards/atstk1000/Makefile ---- linux-2.6.25.6/arch/avr32/boards/atstk1000/Makefile 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/boards/atstk1000/Makefile 2008-06-12 15:09:38.711815728 +0200 -@@ -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 -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atngw100_defconfig avr32-2.6/arch/avr32/configs/atngw100_defconfig ---- linux-2.6.25.6/arch/avr32/configs/atngw100_defconfig 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/configs/atngw100_defconfig 2008-06-12 15:09:38.715815679 +0200 +--- a/arch/avr32/configs/atngw100_defconfig ++++ b/arch/avr32/configs/atngw100_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit @@ -1475,9 +1152,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atngw100_defconfig av CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atstk1002_defconfig avr32-2.6/arch/avr32/configs/atstk1002_defconfig ---- linux-2.6.25.6/arch/avr32/configs/atstk1002_defconfig 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/configs/atstk1002_defconfig 2008-06-12 15:09:38.715815679 +0200 +--- a/arch/avr32/configs/atstk1002_defconfig ++++ b/arch/avr32/configs/atstk1002_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit @@ -1995,9 +1671,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atstk1002_defconfig a CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atstk1003_defconfig avr32-2.6/arch/avr32/configs/atstk1003_defconfig ---- linux-2.6.25.6/arch/avr32/configs/atstk1003_defconfig 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/configs/atstk1003_defconfig 2008-06-12 15:09:38.715815679 +0200 +--- a/arch/avr32/configs/atstk1003_defconfig ++++ b/arch/avr32/configs/atstk1003_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit @@ -2459,9 +2134,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atstk1003_defconfig a CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atstk1004_defconfig avr32-2.6/arch/avr32/configs/atstk1004_defconfig ---- linux-2.6.25.6/arch/avr32/configs/atstk1004_defconfig 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/configs/atstk1004_defconfig 2008-06-12 15:09:38.719815350 +0200 +--- a/arch/avr32/configs/atstk1004_defconfig ++++ b/arch/avr32/configs/atstk1004_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit @@ -2731,9 +2405,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atstk1004_defconfig a CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atstk1006_defconfig avr32-2.6/arch/avr32/configs/atstk1006_defconfig ---- linux-2.6.25.6/arch/avr32/configs/atstk1006_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ avr32-2.6/arch/avr32/configs/atstk1006_defconfig 2008-06-12 15:09:38.719815350 +0200 +--- /dev/null ++++ b/arch/avr32/configs/atstk1006_defconfig @@ -0,0 +1,1235 @@ +# +# Automatically generated make config: don't edit @@ -3970,9 +3643,12 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/configs/atstk1006_defconfig a +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/drivers/dw-dmac.c avr32-2.6/arch/avr32/drivers/dw-dmac.c ---- linux-2.6.25.6/arch/avr32/drivers/dw-dmac.c 1970-01-01 01:00:00.000000000 +0100 -+++ avr32-2.6/arch/avr32/drivers/dw-dmac.c 2008-06-12 15:09:38.719815350 +0200 +--- /dev/null ++++ b/arch/avr32/drivers/Makefile +@@ -0,0 +1 @@ ++obj-$(CONFIG_DW_DMAC) += dw-dmac.o +--- /dev/null ++++ b/arch/avr32/drivers/dw-dmac.c @@ -0,0 +1,761 @@ +/* + * Driver for the Synopsys DesignWare DMA Controller @@ -4735,9 +4411,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/drivers/dw-dmac.c avr32-2.6/a +MODULE_DESCRIPTION("Synopsys DesignWare DMA Controller driver"); +MODULE_AUTHOR("Haavard Skinnemoen "); +MODULE_LICENSE("GPL"); -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/drivers/dw-dmac.h avr32-2.6/arch/avr32/drivers/dw-dmac.h ---- linux-2.6.25.6/arch/avr32/drivers/dw-dmac.h 1970-01-01 01:00:00.000000000 +0100 -+++ avr32-2.6/arch/avr32/drivers/dw-dmac.h 2008-06-12 15:09:38.719815350 +0200 +--- /dev/null ++++ b/arch/avr32/drivers/dw-dmac.h @@ -0,0 +1,42 @@ +/* + * Driver for the Synopsys DesignWare DMA Controller @@ -4781,77 +4456,18 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/drivers/dw-dmac.h avr32-2.6/a +#define DW_DMAC_CHAN_DSR 0x050 + +#endif /* __AVR32_DW_DMAC_H__ */ -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/drivers/Makefile avr32-2.6/arch/avr32/drivers/Makefile ---- linux-2.6.25.6/arch/avr32/drivers/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ avr32-2.6/arch/avr32/drivers/Makefile 2008-06-12 15:09:38.719815350 +0200 -@@ -0,0 +1 @@ -+obj-$(CONFIG_DW_DMAC) += dw-dmac.o -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/Kconfig avr32-2.6/arch/avr32/Kconfig ---- linux-2.6.25.6/arch/avr32/Kconfig 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/Kconfig 2008-06-12 15:09:38.711815728 +0200 -@@ -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 -+if BOARD_ATNGW100 -+source "arch/avr32/boards/atngw100/Kconfig" -+endif - - choice - prompt "Boot loader type" -@@ -180,6 +189,10 @@ - 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 -+ - # FPU emulation goes here - - source "kernel/Kconfig.hz" -@@ -196,6 +209,11 @@ - - menu "Power management options" - -+config ARCH_SUSPEND_POSSIBLE -+ def_bool y -+ -+source "kernel/power/Kconfig" -+ - menu "CPU Frequency scaling" - - source "drivers/cpufreq/Kconfig" -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/avr32_ksyms.c avr32-2.6/arch/avr32/kernel/avr32_ksyms.c ---- linux-2.6.25.6/arch/avr32/kernel/avr32_ksyms.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/kernel/avr32_ksyms.c 2008-06-12 15:03:55.883815569 +0200 +--- a/arch/avr32/kernel/Makefile ++++ b/arch/avr32/kernel/Makefile +@@ -9,6 +9,7 @@ + obj-y += setup.o traps.o semaphore.o ocd.o ptrace.o + obj-y += signal.o sys_avr32.o process.o time.o + obj-y += init_task.o switch_to.o cpu.o ++obj-y += dma-controller.o + obj-$(CONFIG_MODULES) += module.o avr32_ksyms.o + obj-$(CONFIG_KPROBES) += kprobes.o + obj-$(CONFIG_STACKTRACE) += stacktrace.o +--- a/arch/avr32/kernel/avr32_ksyms.c ++++ b/arch/avr32/kernel/avr32_ksyms.c @@ -29,7 +29,9 @@ */ EXPORT_SYMBOL(memset); @@ -4871,9 +4487,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/avr32_ksyms.c avr32-2. EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial_copy_generic); -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/dma-controller.c avr32-2.6/arch/avr32/kernel/dma-controller.c ---- linux-2.6.25.6/arch/avr32/kernel/dma-controller.c 1970-01-01 01:00:00.000000000 +0100 -+++ avr32-2.6/arch/avr32/kernel/dma-controller.c 2008-06-12 15:09:38.719815350 +0200 +--- /dev/null ++++ b/arch/avr32/kernel/dma-controller.c @@ -0,0 +1,34 @@ +/* + * Preliminary DMA controller framework for AVR32 @@ -4909,10 +4524,149 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/dma-controller.c avr32 + return NULL; +} +EXPORT_SYMBOL(find_dma_controller); -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/entry-avr32b.S avr32-2.6/arch/avr32/kernel/entry-avr32b.S ---- linux-2.6.25.6/arch/avr32/kernel/entry-avr32b.S 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/kernel/entry-avr32b.S 2008-06-12 15:03:55.883815569 +0200 -@@ -741,26 +741,6 @@ +--- a/arch/avr32/kernel/entry-avr32b.S ++++ b/arch/avr32/kernel/entry-avr32b.S +@@ -74,50 +74,41 @@ + .align 2 + bral do_dtlb_modified + +- /* +- * r0 : PGD/PT/PTE +- * r1 : Offending address +- * r2 : Scratch register +- * r3 : Cause (5, 12 or 13) +- */ + #define tlbmiss_save pushm r0-r3 + #define tlbmiss_restore popm r0-r3 + +- .section .tlbx.ex.text,"ax",@progbits ++ .org 0x50 + .global itlb_miss + itlb_miss: + tlbmiss_save + rjmp tlb_miss_common + +- .section .tlbr.ex.text,"ax",@progbits ++ .org 0x60 + dtlb_miss_read: + tlbmiss_save + rjmp tlb_miss_common + +- .section .tlbw.ex.text,"ax",@progbits ++ .org 0x70 + dtlb_miss_write: + tlbmiss_save + + .global tlb_miss_common ++ .align 2 + tlb_miss_common: + mfsr r0, SYSREG_TLBEAR + mfsr r1, SYSREG_PTBR + +- /* Is it the vmalloc space? */ +- bld r0, 31 +- brcs handle_vmalloc_miss +- +- /* First level lookup */ ++ /* ++ * First level lookup: The PGD contains virtual pointers to ++ * the second-level page tables, but they may be NULL if not ++ * present. ++ */ + pgtbl_lookup: + lsr r2, r0, PGDIR_SHIFT + ld.w r3, r1[r2 << 2] + bfextu r1, r0, PAGE_SHIFT, PGDIR_SHIFT - PAGE_SHIFT +- bld r3, _PAGE_BIT_PRESENT +- brcc page_table_not_present +- +- /* Translate to virtual address in P1. */ +- andl r3, 0xf000 +- sbr r3, 31 ++ cp.w r3, 0 ++ breq page_table_not_present + + /* Second level lookup */ + ld.w r2, r3[r1 << 2] +@@ -148,16 +139,55 @@ + tlbmiss_restore + rete + +-handle_vmalloc_miss: +- /* Simply do the lookup in init's page table */ ++ /* The slow path of the TLB miss handler */ ++ .align 2 ++page_table_not_present: ++ /* Do we need to synchronize with swapper_pg_dir? */ ++ bld r0, 31 ++ brcs sync_with_swapper_pg_dir ++ ++page_not_present: ++ tlbmiss_restore ++ sub sp, 4 ++ stmts --sp, r0-lr ++ rcall save_full_context_ex ++ mfsr r12, SYSREG_ECR ++ mov r11, sp ++ rcall do_page_fault ++ rjmp ret_from_exception ++ ++ .align 2 ++sync_with_swapper_pg_dir: ++ /* ++ * If swapper_pg_dir contains a non-NULL second-level page ++ * table pointer, copy it into the current PGD. If not, we ++ * must handle it as a full-blown page fault. ++ * ++ * Jumping back to pgtbl_lookup causes an unnecessary lookup, ++ * but it is guaranteed to be a cache hit, it won't happen ++ * very often, and we absolutely do not want to sacrifice any ++ * performance in the fast path in order to improve this. ++ */ + mov r1, lo(swapper_pg_dir) + orh r1, hi(swapper_pg_dir) ++ ld.w r3, r1[r2 << 2] ++ cp.w r3, 0 ++ breq page_not_present ++ mfsr r1, SYSREG_PTBR ++ st.w r1[r2 << 2], r3 + rjmp pgtbl_lookup + ++ /* ++ * We currently have two bytes left at this point until we ++ * crash into the system call handler... ++ * ++ * Don't worry, the assembler will let us know. ++ */ ++ + + /* --- System Call --- */ + +- .section .scall.text,"ax",@progbits ++ .org 0x100 + system_call: + #ifdef CONFIG_PREEMPT + mask_interrupts +@@ -266,18 +296,6 @@ + brcc syscall_exit_cont + rjmp enter_monitor_mode + +- /* The slow path of the TLB miss handler */ +-page_table_not_present: +-page_not_present: +- tlbmiss_restore +- sub sp, 4 +- stmts --sp, r0-lr +- rcall save_full_context_ex +- mfsr r12, SYSREG_ECR +- mov r11, sp +- rcall do_page_fault +- rjmp ret_from_exception +- + /* This function expects to find offending PC in SYSREG_RAR_EX */ + .type save_full_context_ex, @function + .align 2 +@@ -741,26 +759,6 @@ .section .irq.text,"ax",@progbits @@ -4939,20 +4693,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/entry-avr32b.S avr32-2 .global irq_level0 .global irq_level1 .global irq_level2 -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/Makefile avr32-2.6/arch/avr32/kernel/Makefile ---- linux-2.6.25.6/arch/avr32/kernel/Makefile 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/kernel/Makefile 2008-06-12 15:09:38.719815350 +0200 -@@ -9,6 +9,7 @@ - obj-y += setup.o traps.o semaphore.o ocd.o ptrace.o - obj-y += signal.o sys_avr32.o process.o time.o - obj-y += init_task.o switch_to.o cpu.o -+obj-y += dma-controller.o - obj-$(CONFIG_MODULES) += module.o avr32_ksyms.o - obj-$(CONFIG_KPROBES) += kprobes.o - obj-$(CONFIG_STACKTRACE) += stacktrace.o -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/process.c avr32-2.6/arch/avr32/kernel/process.c ---- linux-2.6.25.6/arch/avr32/kernel/process.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/kernel/process.c 2008-06-12 15:03:55.887814682 +0200 +--- a/arch/avr32/kernel/process.c ++++ b/arch/avr32/kernel/process.c @@ -18,11 +18,11 @@ #include #include @@ -4976,9 +4718,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/process.c avr32-2.6/ar } void machine_restart(char *cmd) -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/setup.c avr32-2.6/arch/avr32/kernel/setup.c ---- linux-2.6.25.6/arch/avr32/kernel/setup.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/kernel/setup.c 2008-06-12 15:03:55.887814682 +0200 +--- a/arch/avr32/kernel/setup.c ++++ b/arch/avr32/kernel/setup.c @@ -274,6 +274,8 @@ printk(KERN_WARNING "Failed to allocate framebuffer memory\n"); @@ -4988,9 +4729,8 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/setup.c avr32-2.6/arch } } -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/signal.c avr32-2.6/arch/avr32/kernel/signal.c ---- linux-2.6.25.6/arch/avr32/kernel/signal.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/kernel/signal.c 2008-06-12 15:09:38.719815350 +0200 +--- a/arch/avr32/kernel/signal.c ++++ b/arch/avr32/kernel/signal.c @@ -93,6 +93,9 @@ if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) goto badframe; @@ -5001,10 +4741,9 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/signal.c avr32-2.6/arc pr_debug("Context restored: pc = %08lx, lr = %08lx, sp = %08lx\n", regs->pc, regs->lr, regs->sp); -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/time.c avr32-2.6/arch/avr32/kernel/time.c ---- linux-2.6.25.6/arch/avr32/kernel/time.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/kernel/time.c 2008-06-12 15:03:55.887814682 +0200 -@@ -1,16 +1,12 @@ +--- a/arch/avr32/kernel/time.c ++++ b/arch/avr32/kernel/time.c +@@ -1,233 +1,147 @@ /* * Copyright (C) 2004-2007 Atmel Corporation * @@ -5018,13 +4757,25 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/time.c avr32-2.6/arch/ - #include -#include +-#include +-#include +#include - #include - #include ++#include #include -@@ -27,207 +23,133 @@ - #include - #include + #include +-#include +-#include +-#include +-#include +-#include +-#include ++#include ++#include + +-#include + #include +-#include +-#include -/* how many counter cycles in a jiffy? */ -static u32 cycles_per_jiffy; @@ -5070,20 +4821,20 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/time.c avr32-2.6/arch/ - * By default we provide the null RTC ops - */ -static unsigned long null_rtc_get_time(void) -+static irqreturn_t timer_interrupt(int irq, void *dev_id) - { +-{ - return mktime(2007, 1, 1, 0, 0, 0); -} - -static int null_rtc_set_time(unsigned long sec) --{ ++static irqreturn_t timer_interrupt(int irq, void *dev_id) + { - return 0; -} -+ struct clock_event_device *evdev = dev_id; - +- -static unsigned long (*rtc_get_time)(void) = null_rtc_get_time; -static int (*rtc_set_time)(unsigned long) = null_rtc_set_time; -- ++ struct clock_event_device *evdev = dev_id; + -static void avr32_timer_ack(void) -{ - u32 count; @@ -5314,9 +5065,36 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/kernel/time.c avr32-2.6/arch/ } - -device_initcall(init_timer_sysfs); -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/lib/io-readsb.S avr32-2.6/arch/avr32/lib/io-readsb.S ---- linux-2.6.25.6/arch/avr32/lib/io-readsb.S 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/lib/io-readsb.S 2008-06-12 15:09:38.719815350 +0200 +--- a/arch/avr32/kernel/vmlinux.lds.S ++++ b/arch/avr32/kernel/vmlinux.lds.S +@@ -68,14 +68,6 @@ + _evba = .; + _text = .; + *(.ex.text) +- . = 0x50; +- *(.tlbx.ex.text) +- . = 0x60; +- *(.tlbr.ex.text) +- . = 0x70; +- *(.tlbw.ex.text) +- . = 0x100; +- *(.scall.text) + *(.irq.text) + KPROBES_TEXT + TEXT_TEXT +@@ -107,6 +99,10 @@ + */ + *(.data.init_task) + ++ /* Then, the page-aligned data */ ++ . = ALIGN(PAGE_SIZE); ++ *(.data.page_aligned) ++ + /* Then, the cacheline aligned data */ + . = ALIGN(L1_CACHE_BYTES); + *(.data.cacheline_aligned) +--- a/arch/avr32/lib/io-readsb.S ++++ b/arch/avr32/lib/io-readsb.S @@ -41,7 +41,7 @@ 2: sub r10, -4 reteq r12 @@ -5326,49 +5104,138 @@ diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/lib/io-readsb.S avr32-2.6/arc sub r10, 1 st.b r11++, r8 brne 3b -diff --exclude=.git -urN linux-2.6.25.6/arch/avr32/mach-at32ap/at32ap700x.c avr32-2.6/arch/avr32/mach-at32ap/at32ap700x.c ---- linux-2.6.25.6/arch/avr32/mach-at32ap/at32ap700x.c 2008-06-09 20:27:19.000000000 +0200 -+++ avr32-2.6/arch/avr32/mach-at32ap/at32ap700x.c 2008-06-12 15:09:38.723815860 +0200 -@@ -6,11 +6,13 @@ - * published by the Free Software Foundation. - */ - #include -+#include - #include - #include - #include - #include - #include -+#include - - #include - #include -@@ -18,6 +20,7 @@ - #include - #include - #include -+#include - - #include