summaryrefslogtreecommitdiffstats
path: root/target/device/jp/q5/kernel-patches-2.4.29/001-q5
diff options
context:
space:
mode:
Diffstat (limited to 'target/device/jp/q5/kernel-patches-2.4.29/001-q5')
-rw-r--r--target/device/jp/q5/kernel-patches-2.4.29/001-q5420
1 files changed, 420 insertions, 0 deletions
diff --git a/target/device/jp/q5/kernel-patches-2.4.29/001-q5 b/target/device/jp/q5/kernel-patches-2.4.29/001-q5
new file mode 100644
index 000000000..5f1af425a
--- /dev/null
+++ b/target/device/jp/q5/kernel-patches-2.4.29/001-q5
@@ -0,0 +1,420 @@
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/arch/mips/au1000/common/Makefile linux-2.4.25-rc2_q/arch/mips/au1000/common/Makefile
+--- linux-2.4.25-rc2_org/arch/mips/au1000/common/Makefile 2004-02-13 01:03:35.000000000 +0100
++++ linux-2.4.25-rc2_q/arch/mips/au1000/common/Makefile 2004-02-13 10:04:07.000000000 +0100
+@@ -16,7 +16,7 @@ all: au1000.o
+
+ O_TARGET := au1000.o
+
+-export-objs = prom.o clocks.o power.o usbdev.o
++export-objs = prom.o clocks.o power.o usbdev.o setup.o
+
+ obj-y := prom.o int-handler.o dma.o irq.o puts.o time.o reset.o \
+ clocks.o power.o setup.o sleeper.o
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/arch/mips/au1000/common/prom.c linux-2.4.25-rc2_q/arch/mips/au1000/common/prom.c
+--- linux-2.4.25-rc2_org/arch/mips/au1000/common/prom.c 2004-02-13 01:03:32.000000000 +0100
++++ linux-2.4.25-rc2_q/arch/mips/au1000/common/prom.c 2004-02-13 10:07:12.000000000 +0100
+@@ -81,7 +81,7 @@ void prom_init_cmdline(void)
+ }
+
+
+-char *prom_getenv(char *envname)
++char *prom_getenv_n(char *envname, int n)
+ {
+ /*
+ * Return a pointer to the given environment variable.
+@@ -89,19 +89,24 @@ char *prom_getenv(char *envname)
+ */
+
+ t_env_var *env = (t_env_var *)prom_envp;
+- int i;
++ int i, j=0;
+
+ i = strlen(envname);
+
+ while(env->name) {
+ if(strncmp(envname, env->name, i) == 0) {
+- return(env->name + strlen(envname) + 1);
++ if(j++ == n) return(env->name + strlen(envname) + 1);
+ }
+ env++;
+ }
+ return(NULL);
+ }
+
++char *prom_getenv(char *envname)
++{
++ return prom_getenv_n(envname, 0);
++}
++
+ inline unsigned char str2hexnum(unsigned char c)
+ {
+ if(c >= '0' && c <= '9')
+@@ -128,18 +133,18 @@ inline void str2eaddr(unsigned char *ea,
+ }
+ }
+
+-int get_ethernet_addr(char *ethernet_addr)
++int get_ethernet_addr_n(char *ethernet_addr, int n)
+ {
+ char *ethaddr_str;
+
+- ethaddr_str = prom_getenv("ethaddr");
++ ethaddr_str = prom_getenv_n("ethaddr", n);
+ if (!ethaddr_str) {
+ printk("ethaddr not set in boot prom\n");
+ return -1;
+ }
+ str2eaddr(ethernet_addr, ethaddr_str);
+
+-#if 0
++#if 1
+ {
+ int i;
+
+@@ -153,7 +158,13 @@ int get_ethernet_addr(char *ethernet_add
+ return 0;
+ }
+
++int get_ethernet_addr(char *ethernet_addr)
++{
++ return get_ethernet_addr_n(ethernet_addr, 0);
++}
++
+ void prom_free_prom_memory (void) {}
++EXPORT_SYMBOL(get_ethernet_addr_n);
+ EXPORT_SYMBOL(prom_getcmdline);
+ EXPORT_SYMBOL(get_ethernet_addr);
+ EXPORT_SYMBOL(str2eaddr);
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/arch/mips/au1000/common/setup.c linux-2.4.25-rc2_q/arch/mips/au1000/common/setup.c
+--- linux-2.4.25-rc2_org/arch/mips/au1000/common/setup.c 2004-02-13 01:03:31.000000000 +0100
++++ linux-2.4.25-rc2_q/arch/mips/au1000/common/setup.c 2004-02-13 10:04:07.000000000 +0100
+@@ -57,6 +57,7 @@ extern struct ide_ops *ide_ops;
+ #endif
+
+ extern struct rtc_ops no_rtc_ops;
++void (*__wbflush) (void);
+ extern char * __init prom_getcmdline(void);
+ extern void __init board_setup(void);
+ extern void au1000_restart(char *);
+@@ -71,6 +72,11 @@ static phys_t au1500_fixup_bigphys_addr(
+ extern void au1xxx_time_init(void);
+ extern void au1xxx_timer_setup(void);
+
++void au1500_wbflush(void)
++{
++ __asm__ volatile ("sync");
++}
++
+ void __init au1x00_setup(void)
+ {
+ char *argptr;
+@@ -89,6 +95,8 @@ void __init au1x00_setup(void)
+ }
+ #endif
+
++ __wbflush = au1500_wbflush;
++
+ #ifdef CONFIG_FB_AU1100
+ if ((argptr = strstr(argptr, "video=")) == NULL) {
+ argptr = prom_getcmdline();
+@@ -215,3 +223,6 @@ static phys_t au1500_fixup_bigphys_addr(
+ return phys_addr;
+ }
+ #endif
++
++EXPORT_SYMBOL(__wbflush);
++
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/arch/mips/kernel/head.S linux-2.4.25-rc2_q/arch/mips/kernel/head.S
+--- linux-2.4.25-rc2_org/arch/mips/kernel/head.S 2004-02-13 01:02:42.000000000 +0100
++++ linux-2.4.25-rc2_q/arch/mips/kernel/head.S 2004-02-13 10:07:43.000000000 +0100
+@@ -33,7 +33,9 @@
+ * Reserved space for exception handlers.
+ * Necessary for machines which link their kernels at KSEG0.
+ */
+- .fill 0x400
++ j kernel_entry
++ nop
++ .org 0x400
+
+ /* The following two symbols are used for kernel profiling. */
+ EXPORT(stext)
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/arch/mips/Makefile linux-2.4.25-rc2_q/arch/mips/Makefile
+--- linux-2.4.25-rc2_org/arch/mips/Makefile 2004-02-13 01:01:00.000000000 +0100
++++ linux-2.4.25-rc2_q/arch/mips/Makefile 2004-04-09 10:40:09.000000000 +0200
+@@ -69,13 +69,13 @@ endif
+ set_gccflags = $(shell \
+ while :; do \
+ cpu=$(1); isa=-$(2); \
+- for gcc_opt in -march= -mcpu=; do \
++ for gcc_opt in -march=; do \
+ $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
+ -xc /dev/null > /dev/null 2>&1 && \
+ break 2; \
+ done; \
+ cpu=$(3); isa=-$(4); \
+- for gcc_opt in -march= -mcpu=; do \
++ for gcc_opt in -march=; do \
+ $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
+ -xc /dev/null > /dev/null 2>&1 && \
+ break 2; \
+@@ -90,7 +90,7 @@ else \
+ fi; \
+ gas_abi=-Wa,-32; gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
+ while :; do \
+- for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
++ for gas_opt in -Wa,-march=; do \
+ $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \
+ -o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \
+ break 2; \
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/drivers/char/dummy_keyb.c linux-2.4.25-rc2_q/drivers/char/dummy_keyb.c
+--- linux-2.4.25-rc2_org/drivers/char/dummy_keyb.c 2004-02-12 23:51:10.000000000 +0100
++++ linux-2.4.25-rc2_q/drivers/char/dummy_keyb.c 2004-02-13 10:11:06.000000000 +0100
+@@ -29,6 +29,7 @@
+ #include <linux/errno.h>
+ #include <linux/init.h>
+ #include <linux/input.h>
++#include <linux/pm.h>
+
+ void kbd_leds(unsigned char leds)
+ {
+@@ -140,3 +141,46 @@ void __init kbd_init_hw(void)
+ {
+ printk("Dummy keyboard driver installed.\n");
+ }
++
++
++void panic_blink(void)
++ {
++ }
++
++
++ int pckbd_translate(unsigned char scancode, unsigned char *keycode,
++ char raw_mode)
++ {
++ return 0;
++ }
++
++ char pckbd_unexpected_up(unsigned char keycode)
++ {
++ return 0;
++ }
++
++
++ void pckbd_leds(unsigned char leds)
++ {
++ }
++
++
++ int pckbd_setkeycode(unsigned int scancode, unsigned int keycode)
++ {
++ return 0;
++ }
++
++ int pckbd_getkeycode(unsigned int scancode)
++ {
++ return 0;
++ }
++
++ void __init pckbd_init_hw(void)
++ {
++ }
++
++ int pckbd_pm_resume(struct pm_dev *dev, pm_request_t rqst, void *data)
++ {
++ return 0;
++ }
++
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/drivers/char/Makefile linux-2.4.25-rc2_q/drivers/char/Makefile
+--- linux-2.4.25-rc2_org/drivers/char/Makefile 2004-02-12 23:50:40.000000000 +0100
++++ linux-2.4.25-rc2_q/drivers/char/Makefile 2004-02-13 10:11:06.000000000 +0100
+@@ -32,7 +32,7 @@ mod-subdirs := joystick ftape drm drm-4.
+ list-multi :=
+
+ KEYMAP =defkeymap.o
+-KEYBD =pc_keyb.o
++KEYBD =dummy_keyb.o
+ CONSOLE =console.o
+ SERIAL =serial.o
+
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/drivers/mtd/chips/cfi_cmdset_0002.c linux-2.4.25-rc2_q/drivers/mtd/chips/cfi_cmdset_0002.c
+--- linux-2.4.25-rc2_org/drivers/mtd/chips/cfi_cmdset_0002.c 2004-02-13 00:49:45.000000000 +0100
++++ linux-2.4.25-rc2_q/drivers/mtd/chips/cfi_cmdset_0002.c 2004-03-16 10:04:18.000000000 +0100
+@@ -511,7 +511,7 @@ static int do_write_oneword(struct map_i
+ or tells us why it failed. */
+ dq6 = CMD(1<<6);
+ dq5 = CMD(1<<5);
+- timeo = jiffies + (HZ/1000); /* setting timeout to 1ms for now */
++ timeo = jiffies + HZ; /* setting timeout to 1ms for now */
+
+ oldstatus = cfi_read(map, adr);
+ status = cfi_read(map, adr);
+@@ -540,9 +540,7 @@ static int do_write_oneword(struct map_i
+ oldstatus = cfi_read(map, adr);
+ status = cfi_read(map, adr);
+
+- if ( (oldstatus & 0x00FF) == (status & 0x00FF) ) {
+- printk(KERN_WARNING "Warning: DQ5 raised while program operation was in progress, however operation completed OK\n" );
+- } else {
++ if ( (oldstatus & 0x00FF) != (status & 0x00FF) ) {
+ /* DQ5 is active so we can do a reset and stop the erase */
+ cfi_write(map, CMD(0xF0), chip->start);
+ printk(KERN_WARNING "Internal flash device timeout occurred or write operation was performed while flash was programming.\n" );
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/drivers/mtd/maps/physmap.c linux-2.4.25-rc2_q/drivers/mtd/maps/physmap.c
+--- linux-2.4.25-rc2_org/drivers/mtd/maps/physmap.c 2004-02-13 00:50:09.000000000 +0100
++++ linux-2.4.25-rc2_q/drivers/mtd/maps/physmap.c 2004-02-13 10:11:40.000000000 +0100
+@@ -86,28 +86,24 @@ static int mtd_parts_n
+ #else
+ static struct mtd_partition physmap_partitions[] = {
+ /* Put your own partition definitions here */
+-#if 0
+ {
+- name: "bootROM",
+- size: 0x80000,
++ name: "fs1",
++ size: 28*1024*1024,
+ offset: 0,
+- mask_flags: MTD_WRITEABLE, /* force read-only */
+ }, {
+- name: "zImage",
+- size: 0x100000,
++ name: "bootldr",
++ size: 128*1024,
+ offset: MTDPART_OFS_APPEND,
+ mask_flags: MTD_WRITEABLE, /* force read-only */
+ }, {
+- name: "ramdisk.gz",
+- size: 0x300000,
++ name: "kernel",
++ size: 1*1024*1024,
+ offset: MTDPART_OFS_APPEND,
+- mask_flags: MTD_WRITEABLE, /* force read-only */
+ }, {
+- name: "User FS",
++ name: "fs2",
+ size: MTDPART_SIZ_FULL,
+ offset: MTDPART_OFS_APPEND,
+ }
+-#endif
+ };
+
+ #define NUM_PARTITIONS (sizeof(physmap_partitions)/sizeof(struct mtd_partition))
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/drivers/net/natsemi.c linux-2.4.25-rc2_q/drivers/net/natsemi.c
+--- linux-2.4.25-rc2_org/drivers/net/natsemi.c 2004-02-12 23:29:19.000000000 +0100
++++ linux-2.4.25-rc2_q/drivers/net/natsemi.c 2004-04-22 09:28:51.000000000 +0200
+@@ -773,7 +773,11 @@ static int __devinit natsemi_probe1 (str
+ goto err_ioremap;
+ }
+
+- /* Work around the dropped serial bit. */
++#ifdef __mips__
++ if (get_ethernet_addr_n(dev->dev_addr, 2)) {
++ printk(KERN_INFO "%s: No mac address found\n", dev->name);
++ }
++#else
+ prev_eedata = eeprom_read(ioaddr, 6);
+ for (i = 0; i < 3; i++) {
+ int eedata = eeprom_read(ioaddr, i + 7);
+@@ -781,6 +785,7 @@ static int __devinit natsemi_probe1 (str
+ dev->dev_addr[i*2+1] = eedata >> 7;
+ prev_eedata = eedata;
+ }
++#endif
+
+ dev->base_addr = ioaddr;
+ dev->irq = irq;
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/drivers/net/wireless/hermes.h linux-2.4.25-rc2_q/drivers/net/wireless/hermes.h
+--- linux-2.4.25-rc2_org/drivers/net/wireless/hermes.h 2004-02-12 23:47:43.000000000 +0100
++++ linux-2.4.25-rc2_q/drivers/net/wireless/hermes.h 2004-02-13 10:13:40.000000000 +0100
+@@ -302,9 +302,9 @@ typedef struct hermes_response {
+ #define hermes_read_reg(hw, off) ((hw)->io_space ? \
+ inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \
+ readw((hw)->iobase + ( (off) << (hw)->reg_spacing )))
+-#define hermes_write_reg(hw, off, val) ((hw)->io_space ? \
+- outw_p((val), (hw)->iobase + ( (off) << (hw)->reg_spacing )) : \
+- writew((val), (hw)->iobase + ( (off) << (hw)->reg_spacing )))
++#define hermes_write_reg(hw, off, val) { if((hw)->io_space) \
++ outw_p((val), (hw)->iobase + ( (off) << (hw)->reg_spacing )); else \
++ writew((val), (hw)->iobase + ( (off) << (hw)->reg_spacing ));}
+
+ #define hermes_read_regn(hw, name) (hermes_read_reg((hw), HERMES_##name))
+ #define hermes_write_regn(hw, name, val) (hermes_write_reg((hw), HERMES_##name, (val)))
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/include/asm-mips/page.h linux-2.4.25-rc2_q/include/asm-mips/page.h
+--- linux-2.4.25-rc2_org/include/asm-mips/page.h 2004-02-12 23:06:14.000000000 +0100
++++ linux-2.4.25-rc2_q/include/asm-mips/page.h 2004-03-23 14:18:38.000000000 +0100
+@@ -13,7 +13,6 @@
+ #include <linux/config.h>
+ #include <asm/break.h>
+
+-#ifdef __KERNEL__
+
+ /*
+ * PAGE_SHIFT determines the page size
+@@ -30,6 +29,7 @@
+ #define PAGE_SIZE (1L << PAGE_SHIFT)
+ #define PAGE_MASK (~(PAGE_SIZE-1))
+
++#ifdef __KERNEL__
+ #ifndef __ASSEMBLY__
+
+ #include <asm/cacheflush.h>
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/include/asm-mips/wbflush.h linux-2.4.25-rc2_q/include/asm-mips/wbflush.h
+--- linux-2.4.25-rc2_org/include/asm-mips/wbflush.h 2004-02-12 23:06:33.000000000 +0100
++++ linux-2.4.25-rc2_q/include/asm-mips/wbflush.h 2004-02-13 20:42:57.000000000 +0100
+@@ -15,8 +15,11 @@
+
+ #ifdef CONFIG_CPU_HAS_WB
+
+-extern void (*__wbflush)(void);
+-extern void wbflush_setup(void);
++//extern void (*__wbflush)(void);
++//extern void wbflush_setup(void);
++
++
++#define __wbflush() { __asm__ volatile ("sync"); }
+
+ #define wbflush() \
+ do { \
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/include/pcmcia/cs_types.h linux-2.4.25-rc2_q/include/pcmcia/cs_types.h
+--- linux-2.4.25-rc2_org/include/pcmcia/cs_types.h 2004-02-12 23:13:05.000000000 +0100
++++ linux-2.4.25-rc2_q/include/pcmcia/cs_types.h 2004-02-13 10:15:10.000000000 +0100
+@@ -37,6 +37,7 @@
+ #endif
+
+ #if defined(__arm__) || defined(__mips__)
++//obs jp: on mips, "typedef unsigned long long ioaddr_t;" may be needed to support cardbus
+ typedef u_int ioaddr_t;
+ #else
+ typedef u_short ioaddr_t;
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/include/pcmcia/ss.h linux-2.4.25-rc2_q/include/pcmcia/ss.h
+--- linux-2.4.25-rc2_org/include/pcmcia/ss.h 2004-02-12 23:13:02.000000000 +0100
++++ linux-2.4.25-rc2_q/include/pcmcia/ss.h 2004-02-13 10:15:32.000000000 +0100
+@@ -112,7 +112,7 @@ typedef struct pccard_mem_map {
+ u_char map;
+ u_char flags;
+ u_short speed;
+- u_long sys_start, sys_stop;
++ ioaddr_t sys_start, sys_stop;
+ u_int card_start;
+ } pccard_mem_map;
+
+diff -Naur -p -X do_not_diff -I '\$Id' -I '@(#)' linux-2.4.25-rc2_org/init/do_mounts.c linux-2.4.25-rc2_q/init/do_mounts.c
+--- linux-2.4.25-rc2_org/init/do_mounts.c 2004-02-12 22:59:08.000000000 +0100
++++ linux-2.4.25-rc2_q/init/do_mounts.c 2004-02-13 10:16:02.000000000 +0100
+@@ -760,8 +760,6 @@ static void __init devfs_make_root(char
+ static void __init mount_root(void)
+ {
+ #ifdef CONFIG_ROOT_NFS
+- if (MAJOR(ROOT_DEV) == NFS_MAJOR
+- && MINOR(ROOT_DEV) == NFS_MINOR) {
+ if (mount_nfs_root()) {
+ sys_chdir("/root");
+ ROOT_DEV = current->fs->pwdmnt->mnt_sb->s_dev;
+@@ -770,7 +768,6 @@ static void __init mount_root(void)
+ }
+ printk(KERN_ERR "VFS: Unable to mount root fs via NFS, trying floppy.\n");
+ ROOT_DEV = MKDEV(FLOPPY_MAJOR, 0);
+- }
+ #endif
+ devfs_make_root(root_device_name);
+ create_dev("/dev/root", ROOT_DEV, root_device_name);
+