summaryrefslogtreecommitdiff
path: root/target/linux/ar7-2.6/patches
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar7-2.6/patches')
-rw-r--r--target/linux/ar7-2.6/patches/100-board_support.patch103
-rw-r--r--target/linux/ar7-2.6/patches/110-flash.patch39
-rw-r--r--target/linux/ar7-2.6/patches/120-gpio_chrdev.patch30
-rw-r--r--target/linux/ar7-2.6/patches/130-leds.patch27
-rw-r--r--target/linux/ar7-2.6/patches/140-watchdog.patch27
-rw-r--r--target/linux/ar7-2.6/patches/200-ethernet_driver.patch30
-rw-r--r--target/linux/ar7-2.6/patches/500-serial_kludge.patch22
-rw-r--r--target/linux/ar7-2.6/patches/900-git-fix.diff11
8 files changed, 289 insertions, 0 deletions
diff --git a/target/linux/ar7-2.6/patches/100-board_support.patch b/target/linux/ar7-2.6/patches/100-board_support.patch
new file mode 100644
index 0000000..50970e2
--- /dev/null
+++ b/target/linux/ar7-2.6/patches/100-board_support.patch
@@ -0,0 +1,103 @@
+diff -Nru linux-2.6.19.2/arch/mips/Kconfig linux-ar7/arch/mips/Kconfig
+--- linux-2.6.19.2/arch/mips/Kconfig 2006-12-12 02:32:53.000000000 +0700
++++ linux-ar7/arch/mips/Kconfig 2007-01-29 21:52:21.000000000 +0700
+@@ -12,6 +12,18 @@
+ prompt "System type"
+ default SGI_IP22
+
++config AR7
++ bool "Texas Instruments AR7"
++ select BOOT_ELF32
++ select DMA_NONCOHERENT
++ select HW_HAS_PCI
++ select IRQ_CPU
++ select SWAP_IO_SPACE
++ select SYS_HAS_CPU_MIPS32_R1
++ select SYS_SUPPORTS_32BIT_KERNEL
++ select SYS_SUPPORTS_LITTLE_ENDIAN
++ select NEED_MULTIPLE_NODES
++
+ config MIPS_MTX1
+ bool "4G Systems MTX-1 board"
+ select DMA_NONCOHERENT
+diff -Nru linux-2.6.19.2/arch/mips/Makefile linux-ar7/arch/mips/Makefile
+--- linux-2.6.19.2/arch/mips/Makefile 2006-12-12 02:32:53.000000000 +0700
++++ linux-ar7/arch/mips/Makefile 2007-01-29 21:52:21.000000000 +0700
+@@ -158,6 +158,13 @@
+ #
+
+ #
++# Texas Instruments AR7
++#
++core-$(CONFIG_AR7) += arch/mips/ar7/
++cflags-$(CONFIG_AR7) += -Iinclude/asm-mips/ar7
++load-$(CONFIG_AR7) += 0xffffffff94100000
++
++#
+ # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
+ #
+ core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
+diff -Nru linux-2.6.19.2/arch/mips/kernel/setup.c linux-ar7/arch/mips/kernel/setup.c
+--- linux-2.6.19.2orig/arch/mips/kernel/setup.c 2006-12-12 02:32:53.000000000 +0700
++++ linux-ar7/arch/mips/kernel/setup.c 2007-03-04 22:32:13.000000000 +0700
+@@ -236,7 +236,7 @@
+ * Initialize the bootmem allocator. It also setup initrd related data
+ * if needed.
+ */
+-#ifdef CONFIG_SGI_IP27
++#ifdef CONFIG_NEED_MULTIPLE_NODES
+
+ static void __init bootmem_init(void)
+ {
+@@ -244,7 +244,7 @@
+ finalize_initrd();
+ }
+
+-#else /* !CONFIG_SGI_IP27 */
++#else /* !CONFIG_NEED_MULTIPLE_NODES */
+
+ static void __init bootmem_init(void)
+ {
+@@ -349,7 +349,7 @@
+ finalize_initrd();
+ }
+
+-#endif /* CONFIG_SGI_IP27 */
++#endif /* CONFIG_NEED_MULTIPLE_NODES */
+
+ /*
+ * arch_mem_init - initialize memory managment subsystem
+diff -Nru linux-2.6.19.2/arch/mips/kernel/traps.c linux-ar7/arch/mips/kernel/traps.c
+--- linux-2.6.19.2/arch/mips/kernel/traps.c 2007-01-11 02:10:37.000000000 +0700
++++ linux-ar7/arch/mips/kernel/traps.c 2007-03-15 13:19:19.000000000 +0700
+@@ -1072,11 +1072,6 @@
+ unsigned long exception_handlers[32];
+ unsigned long vi_handlers[64];
+
+-/*
+- * As a side effect of the way this is implemented we're limited
+- * to interrupt handlers in the address range from
+- * KSEG0 <= x < KSEG0 + 256mb on the Nevada. Oh well ...
+- */
+ void *set_except_vector(int n, void *addr)
+ {
+ unsigned long handler = (unsigned long) addr;
+@@ -1084,9 +1079,15 @@
+
+ exception_handlers[n] = handler;
+ if (n == 0 && cpu_has_divec) {
+- *(volatile u32 *)(ebase + 0x200) = 0x08000000 |
+- (0x03ffffff & (handler >> 2));
+- flush_icache_range(ebase + 0x200, ebase + 0x204);
++ /* lui k0, 0x0000 */
++ *(volatile u32 *)(CAC_BASE+0x200) = 0x3c1a0000 | (handler >> 16);
++ /* ori k0, 0x0000 */
++ *(volatile u32 *)(CAC_BASE+0x204) = 0x375a0000 | (handler & 0xffff);
++ /* jr k0 */
++ *(volatile u32 *)(CAC_BASE+0x208) = 0x03400008;
++ /* nop */
++ *(volatile u32 *)(CAC_BASE+0x20C) = 0x00000000;
++ flush_icache_range(CAC_BASE+0x200, CAC_BASE+0x210);
+ }
+ return (void *)old_handler;
+ }
diff --git a/target/linux/ar7-2.6/patches/110-flash.patch b/target/linux/ar7-2.6/patches/110-flash.patch
new file mode 100644
index 0000000..b104067
--- /dev/null
+++ b/target/linux/ar7-2.6/patches/110-flash.patch
@@ -0,0 +1,39 @@
+diff -Nru linux-2.6.19.2/drivers/mtd/Kconfig linux-ar7/drivers/mtd/Kconfig
+--- linux-2.6.19.2/drivers/mtd/Kconfig 2006-12-12 02:32:53.000000000 +0700
++++ linux-ar7/drivers/mtd/Kconfig 2007-02-03 22:47:10.000000000 +0700
+@@ -152,6 +152,12 @@
+ for your particular device. It won't happen automatically. The
+ 'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example.
+
++config MTD_AR7_PARTS
++ tristate "TI AR7 partitioning support"
++ depends on MTD_PARTITIONS
++ ---help---
++ TI AR7 partitioning support
++
+ comment "User Modules And Translation Layers"
+ depends on MTD
+
+diff -Nru linux-2.6.19.2/drivers/mtd/Makefile linux-ar7/drivers/mtd/Makefile
+--- linux-2.6.19.2/drivers/mtd/Makefile 2006-12-12 02:32:53.000000000 +0700
++++ linux-ar7/drivers/mtd/Makefile 2007-02-03 22:02:27.000000000 +0700
+@@ -12,6 +12,7 @@
+ obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
+ obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
+ obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
++obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
+
+ # 'Users' - code which presents functionality to userspace.
+ obj-$(CONFIG_MTD_CHAR) += mtdchar.o
+diff -Nru linux-2.6.19.2/drivers/mtd/maps/physmap.c linux-ar7/drivers/mtd/maps/physmap.c
+--- linux-2.6.19.2/drivers/mtd/maps/physmap.c 2006-12-12 02:32:53.000000000 +0700
++++ linux-ar7/drivers/mtd/maps/physmap.c 2007-02-03 21:57:11.000000000 +0700
+@@ -74,7 +74,7 @@
+
+ static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL };
+ #ifdef CONFIG_MTD_PARTITIONS
+-static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
++static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", "ar7part", NULL };
+ #endif
+
+ static int physmap_flash_probe(struct platform_device *dev)
diff --git a/target/linux/ar7-2.6/patches/120-gpio_chrdev.patch b/target/linux/ar7-2.6/patches/120-gpio_chrdev.patch
new file mode 100644
index 0000000..41a8b8e
--- /dev/null
+++ b/target/linux/ar7-2.6/patches/120-gpio_chrdev.patch
@@ -0,0 +1,30 @@
+diff -ruN linux-2.6.19.2-orig/drivers/char/Kconfig linux-2.6.19.2-ar7/drivers/char/Kconfig
+--- linux-2.6.19.2-orig/drivers/char/Kconfig 2007-01-10 20:10:37.000000000 +0100
++++ linux-2.6.19.2-ar7/drivers/char/Kconfig 2007-02-19 01:22:23.000000000 +0100
+@@ -920,6 +920,15 @@
+ To compile this driver as a module, choose M here: the
+ module will be called mwave.
+
++config AR7_GPIO
++ tristate "TI AR7 GPIO Support"
++ depends on AR7
++ help
++ Give userspace access to the GPIO pins on the Texas Instruments AR7
++ processors.
++
++ If compiled as a module, it will be called ar7_gpio.
++
+ config SCx200_GPIO
+ tristate "NatSemi SCx200 GPIO Support"
+ depends on SCx200
+diff -ruN linux-2.6.19.2-orig/drivers/char/Makefile linux-2.6.19.2-ar7/drivers/char/Makefile
+--- linux-2.6.19.2-orig/drivers/char/Makefile 2007-01-10 20:10:37.000000000 +0100
++++ linux-2.6.19.2-ar7/drivers/char/Makefile 2007-02-19 01:22:23.000000000 +0100
+@@ -83,6 +83,7 @@
+ obj-$(CONFIG_PPDEV) += ppdev.o
+ obj-$(CONFIG_NWBUTTON) += nwbutton.o
+ obj-$(CONFIG_NWFLASH) += nwflash.o
++obj-$(CONFIG_AR7_GPIO) += ar7_gpio.o
+ obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o
+ obj-$(CONFIG_PC8736x_GPIO) += pc8736x_gpio.o
+ obj-$(CONFIG_NSC_GPIO) += nsc_gpio.o
diff --git a/target/linux/ar7-2.6/patches/130-leds.patch b/target/linux/ar7-2.6/patches/130-leds.patch
new file mode 100644
index 0000000..261b712
--- /dev/null
+++ b/target/linux/ar7-2.6/patches/130-leds.patch
@@ -0,0 +1,27 @@
+diff -ruN linux-2.6.19.2-orig/drivers/leds/Kconfig linux-2.6.19.2-ar7/drivers/leds/Kconfig
+--- linux-2.6.19.2-orig/drivers/leds/Kconfig 2007-01-10 20:10:37.000000000 +0100
++++ linux-2.6.19.2-ar7/drivers/leds/Kconfig 2007-02-24 02:30:48.000000000 +0100
+@@ -19,6 +19,12 @@
+
+ comment "LED drivers"
+
++config LEDS_AR7
++ tristate "LED Support for the TI AR7"
++ depends LEDS_CLASS && AR7
++ help
++ This option enables support for the LEDs on TI AR7.
++
+ config LEDS_CORGI
+ tristate "LED Support for the Sharp SL-C7x0 series"
+ depends LEDS_CLASS && PXA_SHARP_C7xx
+diff -ruN linux-2.6.19.2-orig/drivers/leds/Makefile linux-2.6.19.2-ar7/drivers/leds/Makefile
+--- linux-2.6.19.2-orig/drivers/leds/Makefile 2007-01-10 20:10:37.000000000 +0100
++++ linux-2.6.19.2-ar7/drivers/leds/Makefile 2007-02-24 02:29:44.000000000 +0100
+@@ -5,6 +5,7 @@
+ obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o
+
+ # LED Platform Drivers
++obj-$(CONFIG_LEDS_AR7) += leds-ar7.o
+ obj-$(CONFIG_LEDS_CORGI) += leds-corgi.o
+ obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o
+ obj-$(CONFIG_LEDS_SPITZ) += leds-spitz.o
diff --git a/target/linux/ar7-2.6/patches/140-watchdog.patch b/target/linux/ar7-2.6/patches/140-watchdog.patch
new file mode 100644
index 0000000..163df40
--- /dev/null
+++ b/target/linux/ar7-2.6/patches/140-watchdog.patch
@@ -0,0 +1,27 @@
+diff -ruN linux-2.6.19.2-orig/drivers/char/watchdog/Kconfig linux-2.6.19.2-ar7/drivers/char/watchdog/Kconfig
+--- linux-2.6.19.2-orig/drivers/char/watchdog/Kconfig 2007-01-10 20:10:37.000000000 +0100
++++ linux-2.6.19.2-ar7/drivers/char/watchdog/Kconfig 2007-02-26 12:49:29.000000000 +0100
+@@ -544,6 +544,12 @@
+
+ # MIPS Architecture
+
++config AR7_WDT
++ tristate "TI AR7 Watchdog Timer"
++ depends on WATCHDOG && AR7
++ help
++ Hardware driver for the TI AR7 Watchdog Timer.
++
+ config INDYDOG
+ tristate "Indy/I2 Hardware Watchdog"
+ depends on WATCHDOG && SGI_IP22
+diff -ruN linux-2.6.19.2-orig/drivers/char/watchdog/Makefile linux-2.6.19.2-ar7/drivers/char/watchdog/Makefile
+--- linux-2.6.19.2-orig/drivers/char/watchdog/Makefile 2007-01-10 20:10:37.000000000 +0100
++++ linux-2.6.19.2-ar7/drivers/char/watchdog/Makefile 2007-02-26 12:46:36.000000000 +0100
+@@ -71,6 +71,7 @@
+ obj-$(CONFIG_WATCHDOG_RTAS) += wdrtas.o
+
+ # MIPS Architecture
++obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
+ obj-$(CONFIG_INDYDOG) += indydog.o
+
+ # S390 Architecture
diff --git a/target/linux/ar7-2.6/patches/200-ethernet_driver.patch b/target/linux/ar7-2.6/patches/200-ethernet_driver.patch
new file mode 100644
index 0000000..ca603ad
--- /dev/null
+++ b/target/linux/ar7-2.6/patches/200-ethernet_driver.patch
@@ -0,0 +1,30 @@
+diff -Nru linux-2.6.19.2/drivers/net/Kconfig linux-ar7/drivers/net/Kconfig
+--- linux-2.6.19.2/drivers/net/Kconfig 2006-12-12 02:32:53.000000000 +0700
++++ linux-ar7/drivers/net/Kconfig 2007-01-29 21:52:22.000000000 +0700
+@@ -1777,6 +1777,15 @@
+ workstations.
+ See <http://www.semiconductors.philips.com/pip/SAA9730_flyer_1>.
+
++config CPMAC
++ tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)"
++ depends on NET_ETHERNET && EXPERIMENTAL && AR7
++ select PHYLIB
++ select FIXED_PHY
++ select FIXED_MII_100_FDX
++ help
++ TI AR7 CPMAC Ethernet support
++
+ config NET_POCKET
+ bool "Pocket and portable adapters"
+ depends on NET_ETHERNET && PARPORT
+diff -Nru linux-2.6.19.2/drivers/net/Makefile linux-ar7/drivers/net/Makefile
+--- linux-2.6.19.2/drivers/net/Makefile 2006-12-12 02:32:53.000000000 +0700
++++ linux-ar7/drivers/net/Makefile 2007-01-29 21:52:22.000000000 +0700
+@@ -148,6 +148,7 @@
+ obj-$(CONFIG_8139TOO) += 8139too.o
+ obj-$(CONFIG_ZNET) += znet.o
+ obj-$(CONFIG_LAN_SAA9730) += saa9730.o
++obj-$(CONFIG_CPMAC) += cpmac.o
+ obj-$(CONFIG_DEPCA) += depca.o
+ obj-$(CONFIG_EWRK3) += ewrk3.o
+ obj-$(CONFIG_ATP) += atp.o
diff --git a/target/linux/ar7-2.6/patches/500-serial_kludge.patch b/target/linux/ar7-2.6/patches/500-serial_kludge.patch
new file mode 100644
index 0000000..b607951
--- /dev/null
+++ b/target/linux/ar7-2.6/patches/500-serial_kludge.patch
@@ -0,0 +1,22 @@
+diff -Nru linux-2.6.19.2/drivers/serial/8250.c linux-ar7/drivers/serial/8250.c
+--- linux-2.6.19.2/drivers/serial/8250.c 2006-12-12 02:32:53.000000000 +0700
++++ linux-ar7/drivers/serial/8250.c 2007-02-02 14:25:51.000000000 +0700
+@@ -2171,6 +2171,9 @@
+ */
+ up->mcr_mask = ~ALPHA_KLUDGE_MCR;
+ up->mcr_force = ALPHA_KLUDGE_MCR;
++#ifdef CONFIG_AR7
++ up->mcr_force |= UART_MCR_RTS;
++#endif
+
+ up->port.ops = &serial8250_pops;
+ }
+@@ -2243,7 +2246,7 @@
+ {
+ struct uart_8250_port *up = (struct uart_8250_port *)port;
+
+- wait_for_xmitr(up, UART_LSR_THRE);
++ wait_for_xmitr(up, UART_LSR_TEMT);
+ serial_out(up, UART_TX, ch);
+ }
+
diff --git a/target/linux/ar7-2.6/patches/900-git-fix.diff b/target/linux/ar7-2.6/patches/900-git-fix.diff
new file mode 100644
index 0000000..2c5323a
--- /dev/null
+++ b/target/linux/ar7-2.6/patches/900-git-fix.diff
@@ -0,0 +1,11 @@
+--- linux-2.6.19.orig/scripts/setlocalversion 2006-11-30 04:57:37.000000000 +0700
++++ linux-2.6.19/scripts/setlocalversion 2006-12-25 12:50:53.000000000 +0700
+@@ -1,6 +1,8 @@
+ #!/bin/sh
+ # Print additional version information for non-release trees.
+
++exit 0
++
+ usage() {
+ echo "Usage: $0 [srctree]" >&2
+ exit 1