From: Gabor Juhos Date: Sat, 30 Jun 2007 15:03:56 +0000 (+0000) Subject: move 2.6.22 specific patches into the right place X-Git-Tag: reboot~28794 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=15a3d260fe9cd40f75c4d49f7daa11dde16753af;p=oweals%2Fopenwrt.git move 2.6.22 specific patches into the right place SVN-Revision: 7797 --- diff --git a/target/linux/adm5120-2.6/patches-2.6.22/001-adm5120.patch b/target/linux/adm5120-2.6/patches-2.6.22/001-adm5120.patch new file mode 100644 index 0000000000..da601b919d --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/001-adm5120.patch @@ -0,0 +1,111 @@ +Index: linux-2.6.22-rc6/arch/mips/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/arch/mips/Kconfig ++++ linux-2.6.22-rc6/arch/mips/Kconfig +@@ -15,6 +15,17 @@ choice + prompt "System type" + default SGI_IP22 + ++config MIPS_ADM5120 ++ bool "Support for ADM5120 SoC" ++ select SYS_HAS_CPU_MIPS32_R1 ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ select IRQ_CPU ++ select SYS_SUPPORTS_LITTLE_ENDIAN ++ select SYS_SUPPORTS_BIG_ENDIAN ++ select SYS_SUPPORTS_32BIT_KERNEL ++ select GENERIC_GPIO ++ + config MACH_ALCHEMY + bool "Alchemy processor based machines" + +@@ -658,6 +669,7 @@ config TOSHIBA_RBTX4938 + + endchoice + ++source "arch/mips/adm5120/Kconfig" + source "arch/mips/au1000/Kconfig" + source "arch/mips/ddb5xxx/Kconfig" + source "arch/mips/gt64120/ev64120/Kconfig" +Index: linux-2.6.22-rc6/arch/mips/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/arch/mips/Makefile ++++ linux-2.6.22-rc6/arch/mips/Makefile +@@ -165,6 +165,14 @@ cflags-$(CONFIG_MACH_JAZZ) += -Iinclude/ + load-$(CONFIG_MACH_JAZZ) += 0xffffffff80080000 + + # ++# ADMtek 5120 ++# ++ ++core-$(CONFIG_MIPS_ADM5120) += arch/mips/adm5120/ ++cflags-$(CONFIG_MIPS_ADM5120) += -Iinclude/asm-mips/mach-adm5120 ++load-$(CONFIG_MIPS_ADM5120) += 0xffffffff80001000 ++ ++# + # Common Alchemy Au1x00 stuff + # + core-$(CONFIG_SOC_AU1X00) += arch/mips/au1000/common/ +Index: linux-2.6.22-rc6/include/asm-mips/bootinfo.h +=================================================================== +--- linux-2.6.22-rc6.orig/include/asm-mips/bootinfo.h ++++ linux-2.6.22-rc6/include/asm-mips/bootinfo.h +@@ -213,6 +213,57 @@ + #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */ + #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */ + ++/* ++ * Valid machtype for group ADMtek ADM5120 ++ */ ++#define MACH_GROUP_ADM5120 26 ++#define MACH_ADM5120_UNKNOWN 0 /* Unknown board */ ++#define MACH_ADM5120_WP54G_WRT 1 /* Compex WP54G-WRT */ ++#define MACH_ADM5120_WP54G 2 /* Compex WP54G */ ++#define MACH_ADM5120_WP54AG 3 /* Compex WP54AG */ ++#define MACH_ADM5120_WPP54G 4 /* Compex WPP54G */ ++#define MACH_ADM5120_WPP54AG 5 /* Compex WPP54AG */ ++#define MACH_ADM5120_NP28G 6 /* Compex NP28G */ ++#define MACH_ADM5120_NP28GHS 7 /* Compex NP28G HotSpot */ ++#define MACH_ADM5120_NP27G 8 /* Compex NP27G */ ++#define MACH_ADM5120_WP54Gv1C 9 /* Compex WP54G version 1C */ ++#define MACH_ADM5120_RB_111 10 /* Mikrotik RouterBOARD 111 */ ++#define MACH_ADM5120_RB_112 11 /* Mikrotik RouterBOARD 112 */ ++#define MACH_ADM5120_RB_133 12 /* Mikrotik RouterBOARD 133 */ ++#define MACH_ADM5120_RB_133C 13 /* Mikrotik RouterBOARD 133c */ ++#define MACH_ADM5120_RB_150 14 /* Mikrotik RouterBOARD 150 */ ++#define MACH_ADM5120_RB_153 15 /* Mikrotik RouterBOARD 153 */ ++#define MACH_ADM5120_HS100 16 /* ZyXEL HomeSafe 100/100W */ ++#define MACH_ADM5120_P334 17 /* ZyXEL Prestige 334 */ ++#define MACH_ADM5120_P334U 18 /* ZyXEL Prestige 334U */ ++#define MACH_ADM5120_P334W 19 /* ZyXEL Prestige 334W */ ++#define MACH_ADM5120_P334WH 20 /* ZyXEL Prestige 334WH */ ++#define MACH_ADM5120_P334WHD 21 /* ZyXEL Prestige 334WHD */ ++#define MACH_ADM5120_P334WT 22 /* ZyXEL Prestige 334WT */ ++#define MACH_ADM5120_P335 23 /* ZyXEL Prestige 335/335WT */ ++#define MACH_ADM5120_P335PLUS 24 /* ZyXEL Prestige 335Plus */ ++#define MACH_ADM5120_P335U 25 /* ZyXEL Prestige 335U */ ++#define MACH_ADM5120_ES2108 26 /* ZyXEL Ethernet Switch 2108 */ ++#define MACH_ADM5120_ES2108F 27 /* ZyXEL Ethernet Switch 2108-F */ ++#define MACH_ADM5120_ES2108G 28 /* ZyXEL Ethernet Switch 2108-G */ ++#define MACH_ADM5120_ES2108LC 29 /* ZyXEL Ethernet Switch 2108-LC */ ++#define MACH_ADM5120_ES2108PWR 30 /* ZyXEL Ethernet Switch 2108-PWR */ ++#define MACH_ADM5120_ES2024A 31 /* ZyXEL Ethernet Switch 2024A */ ++#define MACH_ADM5120_ES2024PWR 32 /* ZyXEL Ethernet Switch 2024PWR */ ++#define MACH_ADM5120_CAS630 33 /* Cellvision CAS-630/630W */ ++#define MACH_ADM5120_CAS670 34 /* Cellvision CAS-670/670W */ ++#define MACH_ADM5120_CAS700 36 /* Cellvision CAS-700/700W */ ++#define MACH_ADM5120_CAS771 37 /* Cellvision CAS-771/771W */ ++#define MACH_ADM5120_CAS790 38 /* Cellvision CAS-790 */ ++#define MACH_ADM5120_CAS861 39 /* Cellvision CAS-861/861W */ ++#define MACH_ADM5120_NFS101U 40 /* Cellvision NFS-101U/101WU */ ++#define MACH_ADM5120_NFS202U 41 /* Cellvision NFS-202U/202WU */ ++#define MACH_ADM5120_EASY5120 43 /* Infineon EASY 5120 */ ++#define MACH_ADM5120_EASY5120RT 44 /* Infineon EASY 5120-RT */ ++#define MACH_ADM5120_EASY5120PATA 45 /* Infineon EASY 5120P-ATA */ ++#define MACH_ADM5120_EASY83000 46 /* Infineon EASY-83000 */ ++#define MACH_ADM5120_BR6104K 47 /* Edimax BR-6104K */ ++ + #define CL_SIZE COMMAND_LINE_SIZE + + const char *get_system_type(void); diff --git a/target/linux/adm5120-2.6/patches-2.6.22/002-adm5120_flash.patch b/target/linux/adm5120-2.6/patches-2.6.22/002-adm5120_flash.patch new file mode 100644 index 0000000000..355c126c92 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/002-adm5120_flash.patch @@ -0,0 +1,27 @@ +Index: linux-2.6.22-rc6/drivers/mtd/maps/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/mtd/maps/Kconfig ++++ linux-2.6.22-rc6/drivers/mtd/maps/Kconfig +@@ -620,5 +620,10 @@ config MTD_PLATRAM + + This selection automatically selects the map_ram driver. + ++config MTD_ADM5120 ++ tristate "Map driver for ADMtek ADM5120 boards" ++ depends on MIPS_ADM5120 ++ select MTD_CFI_AMDSTD ++ + endmenu + +Index: linux-2.6.22-rc6/drivers/mtd/maps/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/mtd/maps/Makefile ++++ linux-2.6.22-rc6/drivers/mtd/maps/Makefile +@@ -47,6 +47,7 @@ obj-$(CONFIG_MTD_OCELOT) += ocelot.o + obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o + obj-$(CONFIG_MTD_PCI) += pci.o + obj-$(CONFIG_MTD_ALCHEMY) += alchemy-flash.o ++obj-$(CONFIG_MTD_ADM5120) += adm5120_mtd.o + obj-$(CONFIG_MTD_LASAT) += lasat.o + obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o + obj-$(CONFIG_MTD_EDB7312) += edb7312.o diff --git a/target/linux/adm5120-2.6/patches-2.6.22/003-adm5120_switch.patch b/target/linux/adm5120-2.6/patches-2.6.22/003-adm5120_switch.patch new file mode 100644 index 0000000000..9dde782501 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/003-adm5120_switch.patch @@ -0,0 +1,27 @@ +Index: linux-2.6.22-rc6/drivers/net/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/net/Kconfig ++++ linux-2.6.22-rc6/drivers/net/Kconfig +@@ -574,6 +574,10 @@ config MIPS_AU1X00_ENET + If you have an Alchemy Semi AU1X00 based system + say Y. Otherwise, say N. + ++config MIPS_ADM5120_ENET ++ tristate "MIPS ADM5120 Ethernet switch support" ++ depends on NET_ETHERNET && MIPS_ADM5120 ++ + config NET_SB1250_MAC + tristate "SB1250 Ethernet support" + depends on NET_ETHERNET && SIBYTE_SB1xxx_SOC +Index: linux-2.6.22-rc6/drivers/net/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/net/Makefile ++++ linux-2.6.22-rc6/drivers/net/Makefile +@@ -165,6 +165,7 @@ obj-$(CONFIG_SC92031) += sc92031.o + # This is also a 82596 and should probably be merged + obj-$(CONFIG_LP486E) += lp486e.o + ++obj-$(CONFIG_MIPS_ADM5120_ENET) += adm5120sw.o + obj-$(CONFIG_ETH16I) += eth16i.o + obj-$(CONFIG_ZORRO8390) += zorro8390.o + obj-$(CONFIG_HPLANCE) += hplance.o 7990.o diff --git a/target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_uart.patch b/target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_uart.patch new file mode 100644 index 0000000000..eb78e03574 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_uart.patch @@ -0,0 +1,53 @@ +Index: linux-2.6.22-rc6/drivers/serial/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/serial/Makefile ++++ linux-2.6.22-rc6/drivers/serial/Makefile +@@ -21,6 +21,7 @@ obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) + obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o + obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o + obj-$(CONFIG_SERIAL_8250_AU1X00) += 8250_au1x00.o ++obj-$(CONFIG_SERIAL_ADM5120) += adm5120_uart.o + obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o + obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o + obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o +Index: linux-2.6.22-rc6/include/linux/serial_core.h +=================================================================== +--- linux-2.6.22-rc6.orig/include/linux/serial_core.h ++++ linux-2.6.22-rc6/include/linux/serial_core.h +@@ -143,6 +143,9 @@ + #define PORT_KS8695 76 + + ++/* ADMtek ADM5120 SoC */ ++#define PORT_ADM5120 77 ++ + #ifdef __KERNEL__ + + #include +Index: linux-2.6.22-rc6/drivers/serial/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/serial/Kconfig ++++ linux-2.6.22-rc6/drivers/serial/Kconfig +@@ -270,6 +270,22 @@ config SERIAL_8250_RM9K + + comment "Non-8250 serial port support" + ++config SERIAL_ADM5120 ++ bool "ADM5120 serial port support" ++ depends on MIPS_ADM5120 ++ select SERIAL_CORE ++ select SERIAL_CORE_CONSOLE ++ help ++ Driver for the on chip UARTs on the ADM5120 SoC ++ ++config ADM5120_NR_UARTS ++ int "Maximum number of ADM5120 serial ports" ++ depends on SERIAL_ADM5120 ++ default "2" ++ ---help--- ++ Set this to the number of serial ports you want the driver to ++ support. ++ + config SERIAL_AMBA_PL010 + tristate "ARM AMBA PL010 serial port support" + depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE) diff --git a/target/linux/adm5120-2.6/patches-2.6.22/005-adm5120_usb.patch b/target/linux/adm5120-2.6/patches-2.6.22/005-adm5120_usb.patch new file mode 100644 index 0000000000..c862f906e3 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/005-adm5120_usb.patch @@ -0,0 +1,232 @@ +Index: linux-2.6.22-rc6/drivers/usb/core/hub.c +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/usb/core/hub.c ++++ linux-2.6.22-rc6/drivers/usb/core/hub.c +@@ -464,7 +464,7 @@ void usb_hub_tt_clear_buffer (struct usb + : (USB_ENDPOINT_XFER_BULK << 11); + if (usb_pipein (pipe)) + clear->devinfo |= 1 << 15; +- ++ + /* tell keventd to clear state for this TT */ + spin_lock_irqsave (&tt->lock, flags); + list_add_tail (&clear->clear_list, &tt->clear_list); +@@ -540,7 +540,7 @@ static int hub_hub_status(struct usb_hub + "%s failed (err = %d)\n", __FUNCTION__, ret); + else { + *status = le16_to_cpu(hub->status->hub.wHubStatus); +- *change = le16_to_cpu(hub->status->hub.wHubChange); ++ *change = le16_to_cpu(hub->status->hub.wHubChange); + ret = 0; + } + mutex_unlock(&hub->status_mutex); +@@ -1424,7 +1424,7 @@ static int hub_port_status(struct usb_hu + ret = -EIO; + } else { + *status = le16_to_cpu(hub->status->port.wPortStatus); +- *change = le16_to_cpu(hub->status->port.wPortChange); ++ *change = le16_to_cpu(hub->status->port.wPortChange); + ret = 0; + } + mutex_unlock(&hub->status_mutex); +@@ -2007,7 +2007,7 @@ static inline int remote_wakeup(struct u + * Between connect detection and reset signaling there must be a delay + * of 100ms at least for debounce and power-settling. The corresponding + * timer shall restart whenever the downstream port detects a disconnect. +- * ++ * + * Apparently there are some bluetooth and irda-dongles and a number of + * low-speed devices for which this debounce period may last over a second. + * Not covered by the spec - but easy to deal with. +@@ -2142,7 +2142,7 @@ hub_port_init (struct usb_hub *hub, stru + goto fail; + } + oldspeed = udev->speed; +- ++ + /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... + * it's fixed size except for full speed devices. + * For Wireless USB devices, ep0 max packet is always 512 (tho +@@ -2168,7 +2168,7 @@ hub_port_init (struct usb_hub *hub, stru + default: + goto fail; + } +- ++ + type = ""; + switch (udev->speed) { + case USB_SPEED_LOW: speed = "low"; break; +@@ -2194,7 +2194,7 @@ hub_port_init (struct usb_hub *hub, stru + udev->tt = &hub->tt; + udev->ttport = port1; + } +- ++ + /* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way? + * Because device hardware and firmware is sometimes buggy in + * this area, and this is how Linux has done it for ages. +@@ -2230,6 +2230,8 @@ hub_port_init (struct usb_hub *hub, stru + USB_DT_DEVICE << 8, 0, + buf, GET_DESCRIPTOR_BUFSIZE, + USB_CTRL_GET_TIMEOUT); ++printk(KERN_CRIT "usb_control_msg: %d %d %d (%d)\n", r, buf->bMaxPacketSize0, ++buf->bDescriptorType, USB_DT_DEVICE); + switch (buf->bMaxPacketSize0) { + case 8: case 16: case 32: case 64: case 255: + if (buf->bDescriptorType == +@@ -2281,7 +2283,7 @@ hub_port_init (struct usb_hub *hub, stru + udev->devnum, retval); + goto fail; + } +- ++ + /* cope with hardware quirkiness: + * - let SET_ADDRESS settle, some device hardware wants it + * - read ep0 maxpacket even for high and low speed, +@@ -2318,7 +2320,7 @@ hub_port_init (struct usb_hub *hub, stru + udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i); + ep0_reinit(udev); + } +- ++ + retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE); + if (retval < (signed)sizeof(udev->descriptor)) { + dev_err(&udev->dev, "device descriptor read/%s, error %d\n", +@@ -2416,7 +2418,7 @@ static void hub_port_connect_change(stru + struct device *hub_dev = hub->intfdev; + u16 wHubCharacteristics = le16_to_cpu(hub->descriptor->wHubCharacteristics); + int status, i; +- ++ + dev_dbg (hub_dev, + "port %d, status %04x, change %04x, %s\n", + port1, portstatus, portchange, portspeed (portstatus)); +@@ -2425,7 +2427,7 @@ static void hub_port_connect_change(stru + set_port_led(hub, port1, HUB_LED_AUTO); + hub->indicator[port1-1] = INDICATOR_AUTO; + } +- ++ + /* Disconnect any existing devices under this port */ + if (hdev->children[port1-1]) + usb_disconnect(&hdev->children[port1-1]); +@@ -2455,7 +2457,7 @@ static void hub_port_connect_change(stru + if ((wHubCharacteristics & HUB_CHAR_LPSM) < 2 + && !(portstatus & (1 << USB_PORT_FEAT_POWER))) + set_port_feature(hdev, port1, USB_PORT_FEAT_POWER); +- ++ + if (portstatus & USB_PORT_STAT_ENABLE) + goto done; + return; +@@ -2535,7 +2537,7 @@ static void hub_port_connect_change(stru + goto loop_disable; + } + } +- ++ + /* check for devices running slower than they could */ + if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0200 + && udev->speed == USB_SPEED_FULL +@@ -2587,7 +2589,7 @@ loop: + if (status == -ENOTCONN) + break; + } +- ++ + done: + hub_port_disable(hub, port1, 1); + } +@@ -2720,7 +2722,7 @@ static void hub_events(void) + * EM interference sometimes causes badly + * shielded USB devices to be shutdown by + * the hub, this hack enables them again. +- * Works at least with mouse driver. ++ * Works at least with mouse driver. + */ + if (!(portstatus & USB_PORT_STAT_ENABLE) + && !connect_change +@@ -2750,7 +2752,7 @@ static void hub_events(void) + "resume on port %d, status %d\n", + i, ret); + } +- ++ + if (portchange & USB_PORT_STAT_C_OVERCURRENT) { + dev_err (hub_dev, + "over-current change on port %d\n", +@@ -2985,7 +2987,7 @@ int usb_reset_device(struct usb_device * + + if (ret < 0) + goto re_enumerate; +- ++ + /* Device might have changed firmware (DFU or similar) */ + if (memcmp(&udev->descriptor, &descriptor, sizeof descriptor) + || config_descriptors_changed (udev)) { +@@ -2993,7 +2995,7 @@ int usb_reset_device(struct usb_device * + udev->descriptor = descriptor; /* for disconnect() calls */ + goto re_enumerate; + } +- ++ + if (!udev->actconfig) + goto done; + +@@ -3031,7 +3033,7 @@ int usb_reset_device(struct usb_device * + + done: + return 0; +- ++ + re_enumerate: + hub_port_logical_disconnect(parent_hub, port1); + return -ENODEV; +Index: linux-2.6.22-rc6/drivers/usb/host/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/usb/host/Kconfig ++++ linux-2.6.22-rc6/drivers/usb/host/Kconfig +@@ -224,3 +224,6 @@ config USB_SL811_CS + To compile this driver as a module, choose M here: the + module will be called "sl811_cs". + ++config USB_ADM5120_HCD ++ tristate "ADM5120 HCD support" ++ depends on USB && MIPS_ADM5120 +Index: linux-2.6.22-rc6/drivers/usb/host/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/usb/host/Makefile ++++ linux-2.6.22-rc6/drivers/usb/host/Makefile +@@ -8,6 +8,7 @@ endif + + obj-$(CONFIG_PCI) += pci-quirks.o + ++obj-$(CONFIG_USB_ADM5120_HCD) += adm5120-hcd.o + obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o + obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o + obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o +Index: linux-2.6.22-rc6/drivers/usb/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/usb/Kconfig ++++ linux-2.6.22-rc6/drivers/usb/Kconfig +@@ -88,8 +88,6 @@ source "drivers/usb/storage/Kconfig" + + source "drivers/usb/image/Kconfig" + +-source "drivers/usb/mon/Kconfig" +- + comment "USB port drivers" + depends on USB + +Index: linux-2.6.22-rc6/drivers/usb/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/usb/Makefile ++++ linux-2.6.22-rc6/drivers/usb/Makefile +@@ -16,6 +16,7 @@ obj-$(CONFIG_USB_UHCI_HCD) += host/ + obj-$(CONFIG_USB_SL811_HCD) += host/ + obj-$(CONFIG_USB_U132_HCD) += host/ + obj-$(CONFIG_USB_OHCI_AT91) += host/ ++obj-$(CONFIG_USB_ADM5120_HCD) += host/ + + obj-$(CONFIG_USB_ACM) += class/ + obj-$(CONFIG_USB_PRINTER) += class/ diff --git a/target/linux/adm5120-2.6/patches-2.6.22/006-adm5120_leds.patch b/target/linux/adm5120-2.6/patches-2.6.22/006-adm5120_leds.patch new file mode 100644 index 0000000000..91ca638ded --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/006-adm5120_leds.patch @@ -0,0 +1,45 @@ +Index: linux-2.6.22-rc6/drivers/leds/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/leds/Kconfig ++++ linux-2.6.22-rc6/drivers/leds/Kconfig +@@ -20,6 +20,27 @@ config LEDS_CLASS + + comment "LED drivers" + ++config LEDS_GPIO ++ tristate "LED support for LEDS on GPIO lines" ++ depends on LEDS_CLASS && GENERIC_GPIO ++ help ++ This option enables support for LEDs connected to GPIO lines ++ ++config LEDS_ADM5120 ++ tristate "LED Support for ADM5120 GPIO LEDs" ++ depends on LEDS_GPIO && MIPS_ADM5120 ++ help ++ This option enables support for LEDs connected to GPIO lines ++ on ADM5120 SoC based platforms. ++ ++config LEDS_ADM5120_EXPERIMENTAL ++ bool "Enable ADM5120 LEDs experimental code" ++ depends on LEDS_ADM5120 ++ ++config LEDS_ADM5120_DIAG ++ bool "Enable ADM5120 LEDs diagnostic mode" ++ depends on LEDS_ADM5120 ++ + config LEDS_CORGI + tristate "LED Support for the Sharp SL-C7x0 series" + depends on LEDS_CLASS && PXA_SHARP_C7xx +Index: linux-2.6.22-rc6/drivers/leds/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/leds/Makefile ++++ linux-2.6.22-rc6/drivers/leds/Makefile +@@ -5,6 +5,8 @@ obj-$(CONFIG_LEDS_CLASS) += led-class.o + obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o + + # LED Platform Drivers ++obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o ++obj-$(CONFIG_LEDS_ADM5120) += leds-adm5120.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/adm5120-2.6/patches-2.6.22/007-adm5120_pci.patch b/target/linux/adm5120-2.6/patches-2.6.22/007-adm5120_pci.patch new file mode 100644 index 0000000000..18839cf362 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/007-adm5120_pci.patch @@ -0,0 +1,23 @@ +Index: linux-2.6.22-rc6/arch/mips/pci/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/arch/mips/pci/Makefile ++++ linux-2.6.22-rc6/arch/mips/pci/Makefile +@@ -50,3 +50,4 @@ obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup- + obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o + obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o + obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o ++obj-$(CONFIG_PCI_ADM5120) += fixup-adm5120.o ops-adm5120.o pci-adm5120.o +Index: linux-2.6.22-rc6/include/linux/pci_ids.h +=================================================================== +--- linux-2.6.22-rc6.orig/include/linux/pci_ids.h ++++ linux-2.6.22-rc6/include/linux/pci_ids.h +@@ -1712,6 +1712,9 @@ + #define PCI_VENDOR_ID_ESDGMBH 0x12fe + #define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111 + ++#define PCI_VENDOR_ID_ADMTEK 0x1317 ++#define PCI_DEVICE_ID_ADMTEK_ADM5120 0x5120 ++ + #define PCI_VENDOR_ID_SIIG 0x131f + #define PCI_SUBVENDOR_ID_SIIG 0x131f + #define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000 diff --git a/target/linux/adm5120-2.6/patches-2.6.22/008-adm5120_hardware_swab.patch b/target/linux/adm5120-2.6/patches-2.6.22/008-adm5120_hardware_swab.patch new file mode 100644 index 0000000000..c0fd645b5d --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/008-adm5120_hardware_swab.patch @@ -0,0 +1,40 @@ +Index: linux-2.6.22-rc6/include/asm-mips/byteorder.h +=================================================================== +--- linux-2.6.22-rc6.orig/include/asm-mips/byteorder.h ++++ linux-2.6.22-rc6/include/asm-mips/byteorder.h +@@ -58,6 +58,35 @@ static __inline__ __attribute_const__ __ + + #endif /* CONFIG_CPU_MIPSR2 */ + ++#ifdef CONFIG_ADM5120_HARDWARE_SWAB ++ ++static __inline__ __attribute_const__ __u16 ___adm5120__swab16(__u16 x) ++{ ++ __asm__ ( ++ " sh %2, 0xCA(%1) \n" ++ " lhu %0, 0xCC(%1) \n" ++ : "=r" (x) ++ : "r" (0xB2000000), "r" (x)); ++ ++ return x; ++} ++ ++static __inline__ __attribute_const__ __u32 ___adm5120__swab32(__u32 x) ++{ ++ __asm__ ( ++ " sw %2, 0xC8(%1) \n" ++ " lw %0, 0xCC(%1) \n" ++ : "=r" (x) ++ : "r" (0xB2000000), "r" (x)); ++ ++ return x; ++} ++ ++#define __arch__swab16(x) ___adm5120__swab16(x) ++#define __arch__swab32(x) ___adm5120__swab32(x) ++ ++#endif /* CONFIG_ADM5120_HARDWARE_SWAB */ ++ + #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) + # define __BYTEORDER_HAS_U64__ + # define __SWAB_64_THRU_32__ diff --git a/target/linux/adm5120-2.6/patches-2.6.22/100-mtd-myloder-partition-parser.patch b/target/linux/adm5120-2.6/patches-2.6.22/100-mtd-myloder-partition-parser.patch new file mode 100644 index 0000000000..2b4381cd98 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/100-mtd-myloder-partition-parser.patch @@ -0,0 +1,39 @@ +Index: linux-2.6.22-rc6/drivers/mtd/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/mtd/Kconfig ++++ linux-2.6.22-rc6/drivers/mtd/Kconfig +@@ -155,6 +155,22 @@ config MTD_AFS_PARTS + for your particular device. It won't happen automatically. The + 'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example. + ++config MTD_MYLOADER_PARTS ++ tristate "MyLoader partition parsing" ++ depends on MIPS_ADM5120 && MTD_PARTITIONS ++ ---help--- ++ MyLoader is a bootloader which allows the user to define partitions ++ in flash devices, by putting a table in the second erase block ++ on the device, similar to a partition table. This table gives the ++ offsets and lengths of the user defined partitions. ++ ++ If you need code which can detect and parse these tables, and ++ register MTD 'partitions' corresponding to each image detected, ++ enable this option. ++ ++ You will still need the parsing functions to be called by the driver ++ for your particular device. It won't happen automatically. ++ + comment "User Modules And Translation Layers" + + config MTD_CHAR +Index: linux-2.6.22-rc6/drivers/mtd/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/mtd/Makefile ++++ linux-2.6.22-rc6/drivers/mtd/Makefile +@@ -11,6 +11,7 @@ obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o + obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o + obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o + obj-$(CONFIG_MTD_AFS_PARTS) += afs.o ++obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o + + # 'Users' - code which presents functionality to userspace. + obj-$(CONFIG_MTD_CHAR) += mtdchar.o diff --git a/target/linux/adm5120-2.6/patches-2.6.22/101-cfi-fixup-macronix-bootloc.patch b/target/linux/adm5120-2.6/patches-2.6.22/101-cfi-fixup-macronix-bootloc.patch new file mode 100644 index 0000000000..543cb940a4 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/101-cfi-fixup-macronix-bootloc.patch @@ -0,0 +1,87 @@ +Index: linux-2.6.22-rc6/drivers/mtd/chips/cfi_cmdset_0002.c +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/mtd/chips/cfi_cmdset_0002.c ++++ linux-2.6.22-rc6/drivers/mtd/chips/cfi_cmdset_0002.c +@@ -47,12 +47,17 @@ + #define MANUFACTURER_AMD 0x0001 + #define MANUFACTURER_ATMEL 0x001F + #define MANUFACTURER_SST 0x00BF ++#define MANUFACTURER_MACRONIX 0x00C2 + #define SST49LF004B 0x0060 + #define SST49LF040B 0x0050 + #define SST49LF008A 0x005a + #define AT49BV6416 0x00d6 + #define MANUFACTURER_SAMSUNG 0x00ec + ++/* Macronix */ ++#define MX29LV160B 0x2249 /* MX29LV160 Bottom-boot chip */ ++#define MX29LV320B 0x22A8 /* MX29LV320 Bottom-boot chip */ ++ + static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); + static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); + static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); +@@ -217,6 +222,35 @@ static void fixup_use_atmel_lock(struct + mtd->flags |= MTD_STUPID_LOCK; + } + ++#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC ++/* ++ * Some Macronix chips has bad bootblock information in the CFI table ++ */ ++static void fixup_macronix_bootloc(struct mtd_info *mtd, void* param) ++{ ++ struct map_info *map = mtd->priv; ++ struct cfi_private *cfi = map->fldrv_priv; ++ struct cfi_pri_amdstd *extp = cfi->cmdset_priv; ++ __u8 major = extp->MajorVersion; ++ __u8 minor = extp->MinorVersion; ++ ++ switch (cfi->id) { ++ /* TODO: put affected chip ids here */ ++ case MX29LV160B: ++ case MX29LV320B: ++ if (((major << 8) | minor) != 0x3131) ++ break; ++ ++ if (extp->TopBottom == 2) ++ break; ++ ++ extp->TopBottom = 2; /* Bottom boot */ ++ printk("%s: weird Macronix chip detected, id:0x%04X, boot location " ++ "forced to bottom\n", map->name, cfi->id); ++ } ++} ++#endif /* CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC */ ++ + static struct cfi_fixup cfi_fixup_table[] = { + #ifdef AMD_BOOTLOC_BUG + { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL }, +@@ -231,6 +265,9 @@ static struct cfi_fixup cfi_fixup_table[ + { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, }, + #endif + { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL }, ++#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC ++ { MANUFACTURER_MACRONIX, CFI_ID_ANY, fixup_macronix_bootloc, NULL, }, ++#endif + { 0, 0, NULL, NULL } + }; + static struct cfi_fixup jedec_fixup_table[] = { +Index: linux-2.6.22-rc6/drivers/mtd/chips/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/mtd/chips/Kconfig ++++ linux-2.6.22-rc6/drivers/mtd/chips/Kconfig +@@ -196,6 +196,14 @@ config MTD_CFI_AMDSTD + provides support for one of those command sets, used on chips + including the AMD Am29LV320. + ++config MTD_CFI_FIXUP_MACRONIX_BOOTLOC ++ bool "Force bottom boot for Macronix flash chips" ++ depends on MTD_CFI_AMDSTD ++ help ++ Some Macronix flash chips have wrong boot-block location in the ++ CFI table, and the driver may detect the type incorrectly. Select ++ this if your board has such chip. ++ + config MTD_CFI_STAA + tristate "Support for ST (Advanced Architecture) flash chips" + depends on MTD_GEN_PROBE diff --git a/target/linux/adm5120-2.6/patches-2.6.22/140-cmdline_hack.patch b/target/linux/adm5120-2.6/patches-2.6.22/140-cmdline_hack.patch new file mode 100644 index 0000000000..47378e5a90 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/140-cmdline_hack.patch @@ -0,0 +1,26 @@ +Index: linux-2.6.22-rc6/arch/mips/kernel/head.S +=================================================================== +--- linux-2.6.22-rc6.orig/arch/mips/kernel/head.S ++++ linux-2.6.22-rc6/arch/mips/kernel/head.S +@@ -129,14 +129,19 @@ + #endif + .endm + +- + j kernel_entry + nop +- ++ nop ++ + /* + * Reserved space for exception handlers. + * Necessary for machines which link their kernels at KSEG0. ++ * Use as temporary storage for the kernel command line, so that it ++ * can be updated easily without having to relink the kernel. + */ ++ ++EXPORT(_image_cmdline) ++ .ascii "CMDLINE:" + .align 10 + + EXPORT(stext) # used for profiling diff --git a/target/linux/adm5120-2.6/patches-2.6.22/500-Nand.patch b/target/linux/adm5120-2.6/patches-2.6.22/500-Nand.patch new file mode 100644 index 0000000000..fb503c5dcf --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/500-Nand.patch @@ -0,0 +1,29 @@ +Index: linux-2.6.22-rc6/drivers/mtd/nand/Kconfig +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/mtd/nand/Kconfig ++++ linux-2.6.22-rc6/drivers/mtd/nand/Kconfig +@@ -81,6 +81,12 @@ config MTD_NAND_TS7250 + help + Support for NAND flash on Technologic Systems TS-7250 platform. + ++config MTD_NAND_RB100 ++ tristate "NAND Flash device on RB100 board" ++ depends on MTD_NAND ++ help ++ Support for NAND flash on RB100 platform. ++ + config MTD_NAND_IDS + tristate + +Index: linux-2.6.22-rc6/drivers/mtd/nand/Makefile +=================================================================== +--- linux-2.6.22-rc6.orig/drivers/mtd/nand/Makefile ++++ linux-2.6.22-rc6/drivers/mtd/nand/Makefile +@@ -10,6 +10,7 @@ obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nan + obj-$(CONFIG_MTD_NAND_SPIA) += spia.o + obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o + obj-$(CONFIG_MTD_NAND_TOTO) += toto.o ++obj-$(CONFIG_MTD_NAND_RB100) += rbmipsnand.o + obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o + obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o + obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o diff --git a/target/linux/adm5120-2.6/patches/001-adm5120.patch b/target/linux/adm5120-2.6/patches/001-adm5120.patch deleted file mode 100644 index da601b919d..0000000000 --- a/target/linux/adm5120-2.6/patches/001-adm5120.patch +++ /dev/null @@ -1,111 +0,0 @@ -Index: linux-2.6.22-rc6/arch/mips/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/arch/mips/Kconfig -+++ linux-2.6.22-rc6/arch/mips/Kconfig -@@ -15,6 +15,17 @@ choice - prompt "System type" - default SGI_IP22 - -+config MIPS_ADM5120 -+ bool "Support for ADM5120 SoC" -+ select SYS_HAS_CPU_MIPS32_R1 -+ select DMA_NONCOHERENT -+ select HW_HAS_PCI -+ select IRQ_CPU -+ select SYS_SUPPORTS_LITTLE_ENDIAN -+ select SYS_SUPPORTS_BIG_ENDIAN -+ select SYS_SUPPORTS_32BIT_KERNEL -+ select GENERIC_GPIO -+ - config MACH_ALCHEMY - bool "Alchemy processor based machines" - -@@ -658,6 +669,7 @@ config TOSHIBA_RBTX4938 - - endchoice - -+source "arch/mips/adm5120/Kconfig" - source "arch/mips/au1000/Kconfig" - source "arch/mips/ddb5xxx/Kconfig" - source "arch/mips/gt64120/ev64120/Kconfig" -Index: linux-2.6.22-rc6/arch/mips/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/arch/mips/Makefile -+++ linux-2.6.22-rc6/arch/mips/Makefile -@@ -165,6 +165,14 @@ cflags-$(CONFIG_MACH_JAZZ) += -Iinclude/ - load-$(CONFIG_MACH_JAZZ) += 0xffffffff80080000 - - # -+# ADMtek 5120 -+# -+ -+core-$(CONFIG_MIPS_ADM5120) += arch/mips/adm5120/ -+cflags-$(CONFIG_MIPS_ADM5120) += -Iinclude/asm-mips/mach-adm5120 -+load-$(CONFIG_MIPS_ADM5120) += 0xffffffff80001000 -+ -+# - # Common Alchemy Au1x00 stuff - # - core-$(CONFIG_SOC_AU1X00) += arch/mips/au1000/common/ -Index: linux-2.6.22-rc6/include/asm-mips/bootinfo.h -=================================================================== ---- linux-2.6.22-rc6.orig/include/asm-mips/bootinfo.h -+++ linux-2.6.22-rc6/include/asm-mips/bootinfo.h -@@ -213,6 +213,57 @@ - #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */ - #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */ - -+/* -+ * Valid machtype for group ADMtek ADM5120 -+ */ -+#define MACH_GROUP_ADM5120 26 -+#define MACH_ADM5120_UNKNOWN 0 /* Unknown board */ -+#define MACH_ADM5120_WP54G_WRT 1 /* Compex WP54G-WRT */ -+#define MACH_ADM5120_WP54G 2 /* Compex WP54G */ -+#define MACH_ADM5120_WP54AG 3 /* Compex WP54AG */ -+#define MACH_ADM5120_WPP54G 4 /* Compex WPP54G */ -+#define MACH_ADM5120_WPP54AG 5 /* Compex WPP54AG */ -+#define MACH_ADM5120_NP28G 6 /* Compex NP28G */ -+#define MACH_ADM5120_NP28GHS 7 /* Compex NP28G HotSpot */ -+#define MACH_ADM5120_NP27G 8 /* Compex NP27G */ -+#define MACH_ADM5120_WP54Gv1C 9 /* Compex WP54G version 1C */ -+#define MACH_ADM5120_RB_111 10 /* Mikrotik RouterBOARD 111 */ -+#define MACH_ADM5120_RB_112 11 /* Mikrotik RouterBOARD 112 */ -+#define MACH_ADM5120_RB_133 12 /* Mikrotik RouterBOARD 133 */ -+#define MACH_ADM5120_RB_133C 13 /* Mikrotik RouterBOARD 133c */ -+#define MACH_ADM5120_RB_150 14 /* Mikrotik RouterBOARD 150 */ -+#define MACH_ADM5120_RB_153 15 /* Mikrotik RouterBOARD 153 */ -+#define MACH_ADM5120_HS100 16 /* ZyXEL HomeSafe 100/100W */ -+#define MACH_ADM5120_P334 17 /* ZyXEL Prestige 334 */ -+#define MACH_ADM5120_P334U 18 /* ZyXEL Prestige 334U */ -+#define MACH_ADM5120_P334W 19 /* ZyXEL Prestige 334W */ -+#define MACH_ADM5120_P334WH 20 /* ZyXEL Prestige 334WH */ -+#define MACH_ADM5120_P334WHD 21 /* ZyXEL Prestige 334WHD */ -+#define MACH_ADM5120_P334WT 22 /* ZyXEL Prestige 334WT */ -+#define MACH_ADM5120_P335 23 /* ZyXEL Prestige 335/335WT */ -+#define MACH_ADM5120_P335PLUS 24 /* ZyXEL Prestige 335Plus */ -+#define MACH_ADM5120_P335U 25 /* ZyXEL Prestige 335U */ -+#define MACH_ADM5120_ES2108 26 /* ZyXEL Ethernet Switch 2108 */ -+#define MACH_ADM5120_ES2108F 27 /* ZyXEL Ethernet Switch 2108-F */ -+#define MACH_ADM5120_ES2108G 28 /* ZyXEL Ethernet Switch 2108-G */ -+#define MACH_ADM5120_ES2108LC 29 /* ZyXEL Ethernet Switch 2108-LC */ -+#define MACH_ADM5120_ES2108PWR 30 /* ZyXEL Ethernet Switch 2108-PWR */ -+#define MACH_ADM5120_ES2024A 31 /* ZyXEL Ethernet Switch 2024A */ -+#define MACH_ADM5120_ES2024PWR 32 /* ZyXEL Ethernet Switch 2024PWR */ -+#define MACH_ADM5120_CAS630 33 /* Cellvision CAS-630/630W */ -+#define MACH_ADM5120_CAS670 34 /* Cellvision CAS-670/670W */ -+#define MACH_ADM5120_CAS700 36 /* Cellvision CAS-700/700W */ -+#define MACH_ADM5120_CAS771 37 /* Cellvision CAS-771/771W */ -+#define MACH_ADM5120_CAS790 38 /* Cellvision CAS-790 */ -+#define MACH_ADM5120_CAS861 39 /* Cellvision CAS-861/861W */ -+#define MACH_ADM5120_NFS101U 40 /* Cellvision NFS-101U/101WU */ -+#define MACH_ADM5120_NFS202U 41 /* Cellvision NFS-202U/202WU */ -+#define MACH_ADM5120_EASY5120 43 /* Infineon EASY 5120 */ -+#define MACH_ADM5120_EASY5120RT 44 /* Infineon EASY 5120-RT */ -+#define MACH_ADM5120_EASY5120PATA 45 /* Infineon EASY 5120P-ATA */ -+#define MACH_ADM5120_EASY83000 46 /* Infineon EASY-83000 */ -+#define MACH_ADM5120_BR6104K 47 /* Edimax BR-6104K */ -+ - #define CL_SIZE COMMAND_LINE_SIZE - - const char *get_system_type(void); diff --git a/target/linux/adm5120-2.6/patches/002-adm5120_flash.patch b/target/linux/adm5120-2.6/patches/002-adm5120_flash.patch deleted file mode 100644 index 355c126c92..0000000000 --- a/target/linux/adm5120-2.6/patches/002-adm5120_flash.patch +++ /dev/null @@ -1,27 +0,0 @@ -Index: linux-2.6.22-rc6/drivers/mtd/maps/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/mtd/maps/Kconfig -+++ linux-2.6.22-rc6/drivers/mtd/maps/Kconfig -@@ -620,5 +620,10 @@ config MTD_PLATRAM - - This selection automatically selects the map_ram driver. - -+config MTD_ADM5120 -+ tristate "Map driver for ADMtek ADM5120 boards" -+ depends on MIPS_ADM5120 -+ select MTD_CFI_AMDSTD -+ - endmenu - -Index: linux-2.6.22-rc6/drivers/mtd/maps/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/mtd/maps/Makefile -+++ linux-2.6.22-rc6/drivers/mtd/maps/Makefile -@@ -47,6 +47,7 @@ obj-$(CONFIG_MTD_OCELOT) += ocelot.o - obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o - obj-$(CONFIG_MTD_PCI) += pci.o - obj-$(CONFIG_MTD_ALCHEMY) += alchemy-flash.o -+obj-$(CONFIG_MTD_ADM5120) += adm5120_mtd.o - obj-$(CONFIG_MTD_LASAT) += lasat.o - obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o - obj-$(CONFIG_MTD_EDB7312) += edb7312.o diff --git a/target/linux/adm5120-2.6/patches/003-adm5120_switch.patch b/target/linux/adm5120-2.6/patches/003-adm5120_switch.patch deleted file mode 100644 index 9dde782501..0000000000 --- a/target/linux/adm5120-2.6/patches/003-adm5120_switch.patch +++ /dev/null @@ -1,27 +0,0 @@ -Index: linux-2.6.22-rc6/drivers/net/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/net/Kconfig -+++ linux-2.6.22-rc6/drivers/net/Kconfig -@@ -574,6 +574,10 @@ config MIPS_AU1X00_ENET - If you have an Alchemy Semi AU1X00 based system - say Y. Otherwise, say N. - -+config MIPS_ADM5120_ENET -+ tristate "MIPS ADM5120 Ethernet switch support" -+ depends on NET_ETHERNET && MIPS_ADM5120 -+ - config NET_SB1250_MAC - tristate "SB1250 Ethernet support" - depends on NET_ETHERNET && SIBYTE_SB1xxx_SOC -Index: linux-2.6.22-rc6/drivers/net/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/net/Makefile -+++ linux-2.6.22-rc6/drivers/net/Makefile -@@ -165,6 +165,7 @@ obj-$(CONFIG_SC92031) += sc92031.o - # This is also a 82596 and should probably be merged - obj-$(CONFIG_LP486E) += lp486e.o - -+obj-$(CONFIG_MIPS_ADM5120_ENET) += adm5120sw.o - obj-$(CONFIG_ETH16I) += eth16i.o - obj-$(CONFIG_ZORRO8390) += zorro8390.o - obj-$(CONFIG_HPLANCE) += hplance.o 7990.o diff --git a/target/linux/adm5120-2.6/patches/004-adm5120_uart.patch b/target/linux/adm5120-2.6/patches/004-adm5120_uart.patch deleted file mode 100644 index eb78e03574..0000000000 --- a/target/linux/adm5120-2.6/patches/004-adm5120_uart.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: linux-2.6.22-rc6/drivers/serial/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/serial/Makefile -+++ linux-2.6.22-rc6/drivers/serial/Makefile -@@ -21,6 +21,7 @@ obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) - obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o - obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o - obj-$(CONFIG_SERIAL_8250_AU1X00) += 8250_au1x00.o -+obj-$(CONFIG_SERIAL_ADM5120) += adm5120_uart.o - obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o - obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o - obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o -Index: linux-2.6.22-rc6/include/linux/serial_core.h -=================================================================== ---- linux-2.6.22-rc6.orig/include/linux/serial_core.h -+++ linux-2.6.22-rc6/include/linux/serial_core.h -@@ -143,6 +143,9 @@ - #define PORT_KS8695 76 - - -+/* ADMtek ADM5120 SoC */ -+#define PORT_ADM5120 77 -+ - #ifdef __KERNEL__ - - #include -Index: linux-2.6.22-rc6/drivers/serial/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/serial/Kconfig -+++ linux-2.6.22-rc6/drivers/serial/Kconfig -@@ -270,6 +270,22 @@ config SERIAL_8250_RM9K - - comment "Non-8250 serial port support" - -+config SERIAL_ADM5120 -+ bool "ADM5120 serial port support" -+ depends on MIPS_ADM5120 -+ select SERIAL_CORE -+ select SERIAL_CORE_CONSOLE -+ help -+ Driver for the on chip UARTs on the ADM5120 SoC -+ -+config ADM5120_NR_UARTS -+ int "Maximum number of ADM5120 serial ports" -+ depends on SERIAL_ADM5120 -+ default "2" -+ ---help--- -+ Set this to the number of serial ports you want the driver to -+ support. -+ - config SERIAL_AMBA_PL010 - tristate "ARM AMBA PL010 serial port support" - depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE) diff --git a/target/linux/adm5120-2.6/patches/005-adm5120_usb.patch b/target/linux/adm5120-2.6/patches/005-adm5120_usb.patch deleted file mode 100644 index c862f906e3..0000000000 --- a/target/linux/adm5120-2.6/patches/005-adm5120_usb.patch +++ /dev/null @@ -1,232 +0,0 @@ -Index: linux-2.6.22-rc6/drivers/usb/core/hub.c -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/usb/core/hub.c -+++ linux-2.6.22-rc6/drivers/usb/core/hub.c -@@ -464,7 +464,7 @@ void usb_hub_tt_clear_buffer (struct usb - : (USB_ENDPOINT_XFER_BULK << 11); - if (usb_pipein (pipe)) - clear->devinfo |= 1 << 15; -- -+ - /* tell keventd to clear state for this TT */ - spin_lock_irqsave (&tt->lock, flags); - list_add_tail (&clear->clear_list, &tt->clear_list); -@@ -540,7 +540,7 @@ static int hub_hub_status(struct usb_hub - "%s failed (err = %d)\n", __FUNCTION__, ret); - else { - *status = le16_to_cpu(hub->status->hub.wHubStatus); -- *change = le16_to_cpu(hub->status->hub.wHubChange); -+ *change = le16_to_cpu(hub->status->hub.wHubChange); - ret = 0; - } - mutex_unlock(&hub->status_mutex); -@@ -1424,7 +1424,7 @@ static int hub_port_status(struct usb_hu - ret = -EIO; - } else { - *status = le16_to_cpu(hub->status->port.wPortStatus); -- *change = le16_to_cpu(hub->status->port.wPortChange); -+ *change = le16_to_cpu(hub->status->port.wPortChange); - ret = 0; - } - mutex_unlock(&hub->status_mutex); -@@ -2007,7 +2007,7 @@ static inline int remote_wakeup(struct u - * Between connect detection and reset signaling there must be a delay - * of 100ms at least for debounce and power-settling. The corresponding - * timer shall restart whenever the downstream port detects a disconnect. -- * -+ * - * Apparently there are some bluetooth and irda-dongles and a number of - * low-speed devices for which this debounce period may last over a second. - * Not covered by the spec - but easy to deal with. -@@ -2142,7 +2142,7 @@ hub_port_init (struct usb_hub *hub, stru - goto fail; - } - oldspeed = udev->speed; -- -+ - /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... - * it's fixed size except for full speed devices. - * For Wireless USB devices, ep0 max packet is always 512 (tho -@@ -2168,7 +2168,7 @@ hub_port_init (struct usb_hub *hub, stru - default: - goto fail; - } -- -+ - type = ""; - switch (udev->speed) { - case USB_SPEED_LOW: speed = "low"; break; -@@ -2194,7 +2194,7 @@ hub_port_init (struct usb_hub *hub, stru - udev->tt = &hub->tt; - udev->ttport = port1; - } -- -+ - /* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way? - * Because device hardware and firmware is sometimes buggy in - * this area, and this is how Linux has done it for ages. -@@ -2230,6 +2230,8 @@ hub_port_init (struct usb_hub *hub, stru - USB_DT_DEVICE << 8, 0, - buf, GET_DESCRIPTOR_BUFSIZE, - USB_CTRL_GET_TIMEOUT); -+printk(KERN_CRIT "usb_control_msg: %d %d %d (%d)\n", r, buf->bMaxPacketSize0, -+buf->bDescriptorType, USB_DT_DEVICE); - switch (buf->bMaxPacketSize0) { - case 8: case 16: case 32: case 64: case 255: - if (buf->bDescriptorType == -@@ -2281,7 +2283,7 @@ hub_port_init (struct usb_hub *hub, stru - udev->devnum, retval); - goto fail; - } -- -+ - /* cope with hardware quirkiness: - * - let SET_ADDRESS settle, some device hardware wants it - * - read ep0 maxpacket even for high and low speed, -@@ -2318,7 +2320,7 @@ hub_port_init (struct usb_hub *hub, stru - udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i); - ep0_reinit(udev); - } -- -+ - retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE); - if (retval < (signed)sizeof(udev->descriptor)) { - dev_err(&udev->dev, "device descriptor read/%s, error %d\n", -@@ -2416,7 +2418,7 @@ static void hub_port_connect_change(stru - struct device *hub_dev = hub->intfdev; - u16 wHubCharacteristics = le16_to_cpu(hub->descriptor->wHubCharacteristics); - int status, i; -- -+ - dev_dbg (hub_dev, - "port %d, status %04x, change %04x, %s\n", - port1, portstatus, portchange, portspeed (portstatus)); -@@ -2425,7 +2427,7 @@ static void hub_port_connect_change(stru - set_port_led(hub, port1, HUB_LED_AUTO); - hub->indicator[port1-1] = INDICATOR_AUTO; - } -- -+ - /* Disconnect any existing devices under this port */ - if (hdev->children[port1-1]) - usb_disconnect(&hdev->children[port1-1]); -@@ -2455,7 +2457,7 @@ static void hub_port_connect_change(stru - if ((wHubCharacteristics & HUB_CHAR_LPSM) < 2 - && !(portstatus & (1 << USB_PORT_FEAT_POWER))) - set_port_feature(hdev, port1, USB_PORT_FEAT_POWER); -- -+ - if (portstatus & USB_PORT_STAT_ENABLE) - goto done; - return; -@@ -2535,7 +2537,7 @@ static void hub_port_connect_change(stru - goto loop_disable; - } - } -- -+ - /* check for devices running slower than they could */ - if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0200 - && udev->speed == USB_SPEED_FULL -@@ -2587,7 +2589,7 @@ loop: - if (status == -ENOTCONN) - break; - } -- -+ - done: - hub_port_disable(hub, port1, 1); - } -@@ -2720,7 +2722,7 @@ static void hub_events(void) - * EM interference sometimes causes badly - * shielded USB devices to be shutdown by - * the hub, this hack enables them again. -- * Works at least with mouse driver. -+ * Works at least with mouse driver. - */ - if (!(portstatus & USB_PORT_STAT_ENABLE) - && !connect_change -@@ -2750,7 +2752,7 @@ static void hub_events(void) - "resume on port %d, status %d\n", - i, ret); - } -- -+ - if (portchange & USB_PORT_STAT_C_OVERCURRENT) { - dev_err (hub_dev, - "over-current change on port %d\n", -@@ -2985,7 +2987,7 @@ int usb_reset_device(struct usb_device * - - if (ret < 0) - goto re_enumerate; -- -+ - /* Device might have changed firmware (DFU or similar) */ - if (memcmp(&udev->descriptor, &descriptor, sizeof descriptor) - || config_descriptors_changed (udev)) { -@@ -2993,7 +2995,7 @@ int usb_reset_device(struct usb_device * - udev->descriptor = descriptor; /* for disconnect() calls */ - goto re_enumerate; - } -- -+ - if (!udev->actconfig) - goto done; - -@@ -3031,7 +3033,7 @@ int usb_reset_device(struct usb_device * - - done: - return 0; -- -+ - re_enumerate: - hub_port_logical_disconnect(parent_hub, port1); - return -ENODEV; -Index: linux-2.6.22-rc6/drivers/usb/host/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/usb/host/Kconfig -+++ linux-2.6.22-rc6/drivers/usb/host/Kconfig -@@ -224,3 +224,6 @@ config USB_SL811_CS - To compile this driver as a module, choose M here: the - module will be called "sl811_cs". - -+config USB_ADM5120_HCD -+ tristate "ADM5120 HCD support" -+ depends on USB && MIPS_ADM5120 -Index: linux-2.6.22-rc6/drivers/usb/host/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/usb/host/Makefile -+++ linux-2.6.22-rc6/drivers/usb/host/Makefile -@@ -8,6 +8,7 @@ endif - - obj-$(CONFIG_PCI) += pci-quirks.o - -+obj-$(CONFIG_USB_ADM5120_HCD) += adm5120-hcd.o - obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o - obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o - obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o -Index: linux-2.6.22-rc6/drivers/usb/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/usb/Kconfig -+++ linux-2.6.22-rc6/drivers/usb/Kconfig -@@ -88,8 +88,6 @@ source "drivers/usb/storage/Kconfig" - - source "drivers/usb/image/Kconfig" - --source "drivers/usb/mon/Kconfig" -- - comment "USB port drivers" - depends on USB - -Index: linux-2.6.22-rc6/drivers/usb/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/usb/Makefile -+++ linux-2.6.22-rc6/drivers/usb/Makefile -@@ -16,6 +16,7 @@ obj-$(CONFIG_USB_UHCI_HCD) += host/ - obj-$(CONFIG_USB_SL811_HCD) += host/ - obj-$(CONFIG_USB_U132_HCD) += host/ - obj-$(CONFIG_USB_OHCI_AT91) += host/ -+obj-$(CONFIG_USB_ADM5120_HCD) += host/ - - obj-$(CONFIG_USB_ACM) += class/ - obj-$(CONFIG_USB_PRINTER) += class/ diff --git a/target/linux/adm5120-2.6/patches/006-adm5120_leds.patch b/target/linux/adm5120-2.6/patches/006-adm5120_leds.patch deleted file mode 100644 index 91ca638ded..0000000000 --- a/target/linux/adm5120-2.6/patches/006-adm5120_leds.patch +++ /dev/null @@ -1,45 +0,0 @@ -Index: linux-2.6.22-rc6/drivers/leds/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/leds/Kconfig -+++ linux-2.6.22-rc6/drivers/leds/Kconfig -@@ -20,6 +20,27 @@ config LEDS_CLASS - - comment "LED drivers" - -+config LEDS_GPIO -+ tristate "LED support for LEDS on GPIO lines" -+ depends on LEDS_CLASS && GENERIC_GPIO -+ help -+ This option enables support for LEDs connected to GPIO lines -+ -+config LEDS_ADM5120 -+ tristate "LED Support for ADM5120 GPIO LEDs" -+ depends on LEDS_GPIO && MIPS_ADM5120 -+ help -+ This option enables support for LEDs connected to GPIO lines -+ on ADM5120 SoC based platforms. -+ -+config LEDS_ADM5120_EXPERIMENTAL -+ bool "Enable ADM5120 LEDs experimental code" -+ depends on LEDS_ADM5120 -+ -+config LEDS_ADM5120_DIAG -+ bool "Enable ADM5120 LEDs diagnostic mode" -+ depends on LEDS_ADM5120 -+ - config LEDS_CORGI - tristate "LED Support for the Sharp SL-C7x0 series" - depends on LEDS_CLASS && PXA_SHARP_C7xx -Index: linux-2.6.22-rc6/drivers/leds/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/leds/Makefile -+++ linux-2.6.22-rc6/drivers/leds/Makefile -@@ -5,6 +5,8 @@ obj-$(CONFIG_LEDS_CLASS) += led-class.o - obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o - - # LED Platform Drivers -+obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o -+obj-$(CONFIG_LEDS_ADM5120) += leds-adm5120.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/adm5120-2.6/patches/007-adm5120_pci.patch b/target/linux/adm5120-2.6/patches/007-adm5120_pci.patch deleted file mode 100644 index 18839cf362..0000000000 --- a/target/linux/adm5120-2.6/patches/007-adm5120_pci.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: linux-2.6.22-rc6/arch/mips/pci/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/arch/mips/pci/Makefile -+++ linux-2.6.22-rc6/arch/mips/pci/Makefile -@@ -50,3 +50,4 @@ obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup- - obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o - obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o - obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o -+obj-$(CONFIG_PCI_ADM5120) += fixup-adm5120.o ops-adm5120.o pci-adm5120.o -Index: linux-2.6.22-rc6/include/linux/pci_ids.h -=================================================================== ---- linux-2.6.22-rc6.orig/include/linux/pci_ids.h -+++ linux-2.6.22-rc6/include/linux/pci_ids.h -@@ -1712,6 +1712,9 @@ - #define PCI_VENDOR_ID_ESDGMBH 0x12fe - #define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111 - -+#define PCI_VENDOR_ID_ADMTEK 0x1317 -+#define PCI_DEVICE_ID_ADMTEK_ADM5120 0x5120 -+ - #define PCI_VENDOR_ID_SIIG 0x131f - #define PCI_SUBVENDOR_ID_SIIG 0x131f - #define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000 diff --git a/target/linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch b/target/linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch deleted file mode 100644 index c0fd645b5d..0000000000 --- a/target/linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch +++ /dev/null @@ -1,40 +0,0 @@ -Index: linux-2.6.22-rc6/include/asm-mips/byteorder.h -=================================================================== ---- linux-2.6.22-rc6.orig/include/asm-mips/byteorder.h -+++ linux-2.6.22-rc6/include/asm-mips/byteorder.h -@@ -58,6 +58,35 @@ static __inline__ __attribute_const__ __ - - #endif /* CONFIG_CPU_MIPSR2 */ - -+#ifdef CONFIG_ADM5120_HARDWARE_SWAB -+ -+static __inline__ __attribute_const__ __u16 ___adm5120__swab16(__u16 x) -+{ -+ __asm__ ( -+ " sh %2, 0xCA(%1) \n" -+ " lhu %0, 0xCC(%1) \n" -+ : "=r" (x) -+ : "r" (0xB2000000), "r" (x)); -+ -+ return x; -+} -+ -+static __inline__ __attribute_const__ __u32 ___adm5120__swab32(__u32 x) -+{ -+ __asm__ ( -+ " sw %2, 0xC8(%1) \n" -+ " lw %0, 0xCC(%1) \n" -+ : "=r" (x) -+ : "r" (0xB2000000), "r" (x)); -+ -+ return x; -+} -+ -+#define __arch__swab16(x) ___adm5120__swab16(x) -+#define __arch__swab32(x) ___adm5120__swab32(x) -+ -+#endif /* CONFIG_ADM5120_HARDWARE_SWAB */ -+ - #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) - # define __BYTEORDER_HAS_U64__ - # define __SWAB_64_THRU_32__ diff --git a/target/linux/adm5120-2.6/patches/100-mtd-myloder-partition-parser.patch b/target/linux/adm5120-2.6/patches/100-mtd-myloder-partition-parser.patch deleted file mode 100644 index 2b4381cd98..0000000000 --- a/target/linux/adm5120-2.6/patches/100-mtd-myloder-partition-parser.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: linux-2.6.22-rc6/drivers/mtd/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/mtd/Kconfig -+++ linux-2.6.22-rc6/drivers/mtd/Kconfig -@@ -155,6 +155,22 @@ config MTD_AFS_PARTS - for your particular device. It won't happen automatically. The - 'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example. - -+config MTD_MYLOADER_PARTS -+ tristate "MyLoader partition parsing" -+ depends on MIPS_ADM5120 && MTD_PARTITIONS -+ ---help--- -+ MyLoader is a bootloader which allows the user to define partitions -+ in flash devices, by putting a table in the second erase block -+ on the device, similar to a partition table. This table gives the -+ offsets and lengths of the user defined partitions. -+ -+ If you need code which can detect and parse these tables, and -+ register MTD 'partitions' corresponding to each image detected, -+ enable this option. -+ -+ You will still need the parsing functions to be called by the driver -+ for your particular device. It won't happen automatically. -+ - comment "User Modules And Translation Layers" - - config MTD_CHAR -Index: linux-2.6.22-rc6/drivers/mtd/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/mtd/Makefile -+++ linux-2.6.22-rc6/drivers/mtd/Makefile -@@ -11,6 +11,7 @@ obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o - obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o - obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o - obj-$(CONFIG_MTD_AFS_PARTS) += afs.o -+obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o - - # 'Users' - code which presents functionality to userspace. - obj-$(CONFIG_MTD_CHAR) += mtdchar.o diff --git a/target/linux/adm5120-2.6/patches/101-cfi-fixup-macronix-bootloc.patch b/target/linux/adm5120-2.6/patches/101-cfi-fixup-macronix-bootloc.patch deleted file mode 100644 index 543cb940a4..0000000000 --- a/target/linux/adm5120-2.6/patches/101-cfi-fixup-macronix-bootloc.patch +++ /dev/null @@ -1,87 +0,0 @@ -Index: linux-2.6.22-rc6/drivers/mtd/chips/cfi_cmdset_0002.c -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/mtd/chips/cfi_cmdset_0002.c -+++ linux-2.6.22-rc6/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -47,12 +47,17 @@ - #define MANUFACTURER_AMD 0x0001 - #define MANUFACTURER_ATMEL 0x001F - #define MANUFACTURER_SST 0x00BF -+#define MANUFACTURER_MACRONIX 0x00C2 - #define SST49LF004B 0x0060 - #define SST49LF040B 0x0050 - #define SST49LF008A 0x005a - #define AT49BV6416 0x00d6 - #define MANUFACTURER_SAMSUNG 0x00ec - -+/* Macronix */ -+#define MX29LV160B 0x2249 /* MX29LV160 Bottom-boot chip */ -+#define MX29LV320B 0x22A8 /* MX29LV320 Bottom-boot chip */ -+ - static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); - static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); - static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); -@@ -217,6 +222,35 @@ static void fixup_use_atmel_lock(struct - mtd->flags |= MTD_STUPID_LOCK; - } - -+#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC -+/* -+ * Some Macronix chips has bad bootblock information in the CFI table -+ */ -+static void fixup_macronix_bootloc(struct mtd_info *mtd, void* param) -+{ -+ struct map_info *map = mtd->priv; -+ struct cfi_private *cfi = map->fldrv_priv; -+ struct cfi_pri_amdstd *extp = cfi->cmdset_priv; -+ __u8 major = extp->MajorVersion; -+ __u8 minor = extp->MinorVersion; -+ -+ switch (cfi->id) { -+ /* TODO: put affected chip ids here */ -+ case MX29LV160B: -+ case MX29LV320B: -+ if (((major << 8) | minor) != 0x3131) -+ break; -+ -+ if (extp->TopBottom == 2) -+ break; -+ -+ extp->TopBottom = 2; /* Bottom boot */ -+ printk("%s: weird Macronix chip detected, id:0x%04X, boot location " -+ "forced to bottom\n", map->name, cfi->id); -+ } -+} -+#endif /* CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC */ -+ - static struct cfi_fixup cfi_fixup_table[] = { - #ifdef AMD_BOOTLOC_BUG - { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL }, -@@ -231,6 +265,9 @@ static struct cfi_fixup cfi_fixup_table[ - { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, }, - #endif - { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL }, -+#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC -+ { MANUFACTURER_MACRONIX, CFI_ID_ANY, fixup_macronix_bootloc, NULL, }, -+#endif - { 0, 0, NULL, NULL } - }; - static struct cfi_fixup jedec_fixup_table[] = { -Index: linux-2.6.22-rc6/drivers/mtd/chips/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/mtd/chips/Kconfig -+++ linux-2.6.22-rc6/drivers/mtd/chips/Kconfig -@@ -196,6 +196,14 @@ config MTD_CFI_AMDSTD - provides support for one of those command sets, used on chips - including the AMD Am29LV320. - -+config MTD_CFI_FIXUP_MACRONIX_BOOTLOC -+ bool "Force bottom boot for Macronix flash chips" -+ depends on MTD_CFI_AMDSTD -+ help -+ Some Macronix flash chips have wrong boot-block location in the -+ CFI table, and the driver may detect the type incorrectly. Select -+ this if your board has such chip. -+ - config MTD_CFI_STAA - tristate "Support for ST (Advanced Architecture) flash chips" - depends on MTD_GEN_PROBE diff --git a/target/linux/adm5120-2.6/patches/140-cmdline_hack.patch b/target/linux/adm5120-2.6/patches/140-cmdline_hack.patch deleted file mode 100644 index 47378e5a90..0000000000 --- a/target/linux/adm5120-2.6/patches/140-cmdline_hack.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: linux-2.6.22-rc6/arch/mips/kernel/head.S -=================================================================== ---- linux-2.6.22-rc6.orig/arch/mips/kernel/head.S -+++ linux-2.6.22-rc6/arch/mips/kernel/head.S -@@ -129,14 +129,19 @@ - #endif - .endm - -- - j kernel_entry - nop -- -+ nop -+ - /* - * Reserved space for exception handlers. - * Necessary for machines which link their kernels at KSEG0. -+ * Use as temporary storage for the kernel command line, so that it -+ * can be updated easily without having to relink the kernel. - */ -+ -+EXPORT(_image_cmdline) -+ .ascii "CMDLINE:" - .align 10 - - EXPORT(stext) # used for profiling diff --git a/target/linux/adm5120-2.6/patches/500-Nand.patch b/target/linux/adm5120-2.6/patches/500-Nand.patch deleted file mode 100644 index fb503c5dcf..0000000000 --- a/target/linux/adm5120-2.6/patches/500-Nand.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: linux-2.6.22-rc6/drivers/mtd/nand/Kconfig -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/mtd/nand/Kconfig -+++ linux-2.6.22-rc6/drivers/mtd/nand/Kconfig -@@ -81,6 +81,12 @@ config MTD_NAND_TS7250 - help - Support for NAND flash on Technologic Systems TS-7250 platform. - -+config MTD_NAND_RB100 -+ tristate "NAND Flash device on RB100 board" -+ depends on MTD_NAND -+ help -+ Support for NAND flash on RB100 platform. -+ - config MTD_NAND_IDS - tristate - -Index: linux-2.6.22-rc6/drivers/mtd/nand/Makefile -=================================================================== ---- linux-2.6.22-rc6.orig/drivers/mtd/nand/Makefile -+++ linux-2.6.22-rc6/drivers/mtd/nand/Makefile -@@ -10,6 +10,7 @@ obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nan - obj-$(CONFIG_MTD_NAND_SPIA) += spia.o - obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o - obj-$(CONFIG_MTD_NAND_TOTO) += toto.o -+obj-$(CONFIG_MTD_NAND_RB100) += rbmipsnand.o - obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o - obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o - obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o diff --git a/target/linux/adm5120eb-2.6/patches-2.6.22 b/target/linux/adm5120eb-2.6/patches-2.6.22 new file mode 120000 index 0000000000..377f3ad9d8 --- /dev/null +++ b/target/linux/adm5120eb-2.6/patches-2.6.22 @@ -0,0 +1 @@ +../adm5120-2.6/patches-2.6.22 \ No newline at end of file