1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

Upgrade to Linux 2.6.19

- Includes large parts of the patch from #1021 by dpalffy
- Includes RB532 NAND driver changes by n0-1



git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5789 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd
2006-12-14 16:41:33 +00:00
parent a8131d4638
commit c92885c466
93 changed files with 33484 additions and 19072 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/bcm47xx-flash.c
--- linux.old/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100
+++ linux.dev/drivers/mtd/maps/bcm47xx-flash.c 2006-06-23 19:54:06.000000000 +0200
diff -urN linux-2.6.19.ref/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.19/drivers/mtd/maps/bcm47xx-flash.c
--- linux-2.6.19.ref/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.19/drivers/mtd/maps/bcm47xx-flash.c 2006-12-04 21:33:58.000000000 +0100
@@ -0,0 +1,490 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
@@ -45,7 +45,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/wait.h>
+#include <linux/config.h>
+#include <linux/autoconf.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#ifdef CONFIG_MTD_PARTITIONS
@@ -133,7 +133,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ /*
+ * Read into buffer
+ */
+ if (MTD_READ(mtd, off, sizeof(buf), &len, buf) ||
+ if (mtd->read(mtd, off, sizeof(buf), &len, buf) ||
+ len != sizeof(buf))
+ continue;
+
@@ -195,7 +195,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ set_current_state(TASK_INTERRUPTIBLE);
+ add_wait_queue(&wait_q, &wait);
+
+ ret = MTD_ERASE(mtd, &erase);
+ ret = mtd->erase(mtd, &erase);
+ if (ret) {
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&wait_q, &wait);
@@ -212,7 +212,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ * Next, writhe data to flash.
+ */
+
+ ret = MTD_WRITE (mtd, pos, len, &retlen, buf);
+ ret = mtd->write(mtd, pos, len, &retlen, buf);
+ if (ret)
+ return ret;
+ if (retlen != len)
@@ -243,7 +243,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ /*
+ * Read into buffer
+ */
+ if (MTD_READ(mtd, off, sizeof(trx), &len, (char *) &trx) ||
+ if (mtd->read(mtd, off, sizeof(trx), &len, (char *) &trx) ||
+ len != sizeof(trx))
+ continue;
+
@@ -269,7 +269,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ if (part->size == 0)
+ return 0;
+
+ if (MTD_READ(mtd, part->offset, sizeof(buf), &len, buf) || len != sizeof(buf))
+ if (mtd->read(mtd, part->offset, sizeof(buf), &len, buf) || len != sizeof(buf))
+ return 0;
+
+ if (*((__u32 *) buf) == SQUASHFS_MAGIC) {
@@ -297,7 +297,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+
+ /* Update the trx crc32 */
+ for (i = (u32) &(((struct trx_header *)NULL)->flag_version); i <= trx.len; i += sizeof(buf)) {
+ if (MTD_READ(mtd, off + i, sizeof(buf), &len, buf) || len != sizeof(buf))
+ if (mtd->read(mtd, off + i, sizeof(buf), &len, buf) || len != sizeof(buf))
+ return 0;
+ crc = crc32_le(crc, buf, min(sizeof(buf), trx.len - i));
+ }
@@ -306,7 +306,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+ /* read first eraseblock from the trx */
+ block = kmalloc(mtd->erasesize, GFP_KERNEL);
+ trx2 = (struct trx_header *) block;
+ if (MTD_READ(mtd, off, mtd->erasesize, &len, block) || len != mtd->erasesize) {
+ if (mtd->read(mtd, off, mtd->erasesize, &len, block) || len != mtd->erasesize) {
+ printk("Error accessing the first trx eraseblock\n");
+ return 0;
+ }
@@ -492,9 +492,9 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
+
+module_init(init_bcm947xx_map);
+module_exit(cleanup_bcm947xx_map);
diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig
--- linux.old/drivers/mtd/maps/Kconfig 2006-06-23 19:13:51.000000000 +0200
+++ linux.dev/drivers/mtd/maps/Kconfig 2006-06-23 18:47:58.000000000 +0200
diff -urN linux-2.6.19.ref/drivers/mtd/maps/Kconfig linux-2.6.19/drivers/mtd/maps/Kconfig
--- linux-2.6.19.ref/drivers/mtd/maps/Kconfig 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19/drivers/mtd/maps/Kconfig 2006-12-04 21:33:58.000000000 +0100
@@ -299,6 +299,12 @@
Mapping for the Flaga digital module. If you don't have one, ignore
this setting.
@@ -508,10 +508,10 @@ diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig
config MTD_BEECH
tristate "CFI Flash device mapped on IBM 405LP Beech"
depends on MTD_CFI && BEECH
diff -urN linux.old/drivers/mtd/maps/Makefile linux.dev/drivers/mtd/maps/Makefile
--- linux.old/drivers/mtd/maps/Makefile 2006-06-23 19:13:51.000000000 +0200
+++ linux.dev/drivers/mtd/maps/Makefile 2006-06-23 18:47:58.000000000 +0200
@@ -30,6 +30,7 @@
diff -urN linux-2.6.19.ref/drivers/mtd/maps/Makefile linux-2.6.19/drivers/mtd/maps/Makefile
--- linux-2.6.19.ref/drivers/mtd/maps/Makefile 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19/drivers/mtd/maps/Makefile 2006-12-04 21:33:58.000000000 +0100
@@ -29,6 +29,7 @@
obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o
obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o
obj-$(CONFIG_MTD_TQM8XXL) += tqm8xxl.o

View File

@@ -1,6 +1,6 @@
diff -ur linux.old/arch/mips/kernel/genex.S linux.dev/arch/mips/kernel/genex.S
--- linux.old/arch/mips/kernel/genex.S 2006-10-16 19:09:36.000000000 +0200
+++ linux.dev/arch/mips/kernel/genex.S 2006-10-16 19:06:50.000000000 +0200
diff -urN linux-2.6.19.ref/arch/mips/kernel/genex.S linux-2.6.19/arch/mips/kernel/genex.S
--- linux-2.6.19.ref/arch/mips/kernel/genex.S 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19/arch/mips/kernel/genex.S 2006-12-04 21:34:09.000000000 +0100
@@ -73,6 +73,10 @@
.set push
.set mips3
@@ -12,10 +12,10 @@ diff -ur linux.old/arch/mips/kernel/genex.S linux.dev/arch/mips/kernel/genex.S
mfc0 k1, CP0_CAUSE
li k0, 31<<2
andi k1, k1, 0x7c
diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
--- linux.old/arch/mips/mm/c-r4k.c 2006-10-16 19:09:36.000000000 +0200
+++ linux.dev/arch/mips/mm/c-r4k.c 2006-10-16 19:08:46.000000000 +0200
@@ -14,6 +14,15 @@
diff -urN linux-2.6.19.ref/arch/mips/mm/c-r4k.c linux-2.6.19/arch/mips/mm/c-r4k.c
--- linux-2.6.19.ref/arch/mips/mm/c-r4k.c 2006-12-04 21:34:04.000000000 +0100
+++ linux-2.6.19/arch/mips/mm/c-r4k.c 2006-12-04 21:34:09.000000000 +0100
@@ -13,6 +13,15 @@
#include <linux/mm.h>
#include <linux/bitops.h>
@@ -31,7 +31,7 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
#include <asm/bcache.h>
#include <asm/bootinfo.h>
#include <asm/cache.h>
@@ -30,6 +39,9 @@
@@ -29,6 +38,9 @@
#include <asm/cacheflush.h> /* for run_uncached() */
@@ -41,40 +41,37 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
/*
* Special Variant of smp_call_function for use by cache functions:
*
@@ -94,7 +106,9 @@
@@ -93,6 +105,9 @@
{
unsigned long dc_lsize = cpu_dcache_line_size();
- if (dc_lsize == 16)
+ if (bcm4710)
+ r4k_blast_dcache_page = blast_dcache_page;
+ else if (dc_lsize == 16)
r4k_blast_dcache_page = blast_dcache16_page;
else if (dc_lsize == 32)
r4k_blast_dcache_page = r4k_blast_dcache_page_dc32;
@@ -106,7 +120,9 @@
+ else
if (dc_lsize == 0)
r4k_blast_dcache_page = (void *)cache_noop;
else if (dc_lsize == 16)
@@ -107,6 +122,9 @@
{
unsigned long dc_lsize = cpu_dcache_line_size();
- if (dc_lsize == 16)
+ if (bcm4710)
+ r4k_blast_dcache_page_indexed = blast_dcache_page_indexed;
+ else if (dc_lsize == 16)
r4k_blast_dcache_page_indexed = blast_dcache16_page_indexed;
else if (dc_lsize == 32)
r4k_blast_dcache_page_indexed = blast_dcache32_page_indexed;
@@ -118,7 +134,9 @@
+ else
if (dc_lsize == 0)
r4k_blast_dcache_page_indexed = (void *)cache_noop;
else if (dc_lsize == 16)
@@ -121,6 +139,9 @@
{
unsigned long dc_lsize = cpu_dcache_line_size();
- if (dc_lsize == 16)
+ if (bcm4710)
+ r4k_blast_dcache = blast_dcache;
+ else if (dc_lsize == 16)
r4k_blast_dcache = blast_dcache16;
else if (dc_lsize == 32)
r4k_blast_dcache = blast_dcache32;
@@ -527,6 +545,9 @@
+ else
if (dc_lsize == 0)
r4k_blast_dcache = (void *)cache_noop;
else if (dc_lsize == 16)
@@ -538,6 +559,9 @@
r4k_blast_icache();
else
protected_blast_icache_range(start, end);
@@ -84,17 +81,17 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
}
static void r4k_flush_icache_range(unsigned long start, unsigned long end)
@@ -683,6 +704,8 @@
@@ -618,6 +642,8 @@
unsigned long addr = (unsigned long) arg;
R4600_HIT_CACHEOP_WAR_IMPL;
+ BCM4710_PROTECTED_FILL_TLB(addr);
+ BCM4710_PROTECTED_FILL_TLB(addr + 4);
protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
if (dc_lsize)
protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
if (!cpu_icache_snoops_remote_store && scache_size)
protected_writeback_scache_line(addr & ~(sc_lsize - 1));
@@ -1189,6 +1212,16 @@
static inline void coherency_setup(void)
@@ -1135,6 +1161,16 @@
static void __init coherency_setup(void)
{
change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT);
+#ifdef CONFIG_BCM947XX
@@ -110,7 +107,7 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
/*
* c0_status.cu=0 specifies that updates by the sc instruction use
@@ -1227,6 +1260,15 @@
@@ -1173,6 +1209,15 @@
/* Default cache error handler for R4000 and R5000 family */
set_uncached_handler (0x100, &except_vec2_generic, 0x80);
@@ -126,21 +123,21 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
probe_pcache();
setup_scache();
diff -ur linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
--- linux.old/arch/mips/mm/tlbex.c 2006-10-16 19:09:36.000000000 +0200
+++ linux.dev/arch/mips/mm/tlbex.c 2006-10-16 19:06:50.000000000 +0200
@@ -38,6 +38,10 @@
/* #define DEBUG_TLB */
diff -urN linux-2.6.19.ref/arch/mips/mm/tlbex.c linux-2.6.19/arch/mips/mm/tlbex.c
--- linux-2.6.19.ref/arch/mips/mm/tlbex.c 2006-12-04 21:33:48.000000000 +0100
+++ linux-2.6.19/arch/mips/mm/tlbex.c 2006-12-04 21:34:09.000000000 +0100
@@ -1174,6 +1174,10 @@
#endif
}
+#ifdef CONFIG_BCM947XX
+extern int bcm4710;
+#endif
+
static __init int __attribute__((unused)) r45k_bvahwbug(void)
static void __init build_r4000_tlb_refill_handler(void)
{
/* XXX: We should probe for the presence of this bug, but we don't. */
@@ -1184,6 +1188,12 @@
u32 *p = tlb_handler;
@@ -1188,6 +1192,12 @@
memset(relocs, 0, sizeof(relocs));
memset(final_handler, 0, sizeof(final_handler));
@@ -153,9 +150,9 @@ diff -ur linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
/*
* create the plain linear handler
*/
diff -ur linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcache.h
--- linux.old/include/asm-mips/r4kcache.h 2006-10-16 19:09:36.000000000 +0200
+++ linux.dev/include/asm-mips/r4kcache.h 2006-10-16 19:09:11.000000000 +0200
diff -urN linux-2.6.19.ref/include/asm-mips/r4kcache.h linux-2.6.19/include/asm-mips/r4kcache.h
--- linux-2.6.19.ref/include/asm-mips/r4kcache.h 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19/include/asm-mips/r4kcache.h 2006-12-04 21:34:09.000000000 +0100
@@ -17,6 +17,18 @@
#include <asm/cpu-features.h>
#include <asm/mipsmtregs.h>
@@ -356,10 +353,10 @@ diff -ur linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcac
+__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD,,, )
#endif /* _ASM_R4KCACHE_H */
diff -ur linux.old/include/asm-mips/stackframe.h linux.dev/include/asm-mips/stackframe.h
--- linux.old/include/asm-mips/stackframe.h 2006-10-16 19:09:36.000000000 +0200
+++ linux.dev/include/asm-mips/stackframe.h 2006-10-16 19:06:50.000000000 +0200
@@ -361,6 +361,10 @@
diff -urN linux-2.6.19.ref/include/asm-mips/stackframe.h linux-2.6.19/include/asm-mips/stackframe.h
--- linux-2.6.19.ref/include/asm-mips/stackframe.h 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19/include/asm-mips/stackframe.h 2006-12-04 21:34:09.000000000 +0100
@@ -334,6 +334,10 @@
.macro RESTORE_SP_AND_RET
LONG_L sp, PT_R29(sp)
.set mips3

View File

@@ -1,6 +1,6 @@
diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
--- linux-2.6.17/drivers/net/b44.c 2006-06-18 03:49:35.000000000 +0200
+++ linux-2.6.17-owrt/drivers/net/b44.c 2006-06-18 16:24:14.000000000 +0200
diff -urN linux-2.6.19.ref/drivers/net/b44.c linux-2.6.19/drivers/net/b44.c
--- linux-2.6.19.ref/drivers/net/b44.c 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19/drivers/net/b44.c 2006-12-04 21:34:14.000000000 +0100
@@ -1,7 +1,9 @@
-/* b44.c: Broadcom 4400 device driver.
+/* b44.c: Broadcom 4400/47xx device driver.
@@ -14,8 +14,8 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
*
* Distribute under GPL.
@@ -32,6 +34,28 @@
#define DRV_MODULE_VERSION "1.00"
#define DRV_MODULE_RELDATE "Apr 7, 2006"
#define DRV_MODULE_VERSION "1.01"
#define DRV_MODULE_RELDATE "Jun 16, 2006"
+#ifdef CONFIG_BCM947XX
+extern char *nvram_get(char *name);
@@ -42,7 +42,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
#define B44_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \
NETIF_MSG_PROBE | \
@@ -78,8 +102,8 @@
@@ -87,8 +111,8 @@
static char version[] __devinitdata =
DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
@@ -53,7 +53,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_MODULE_VERSION);
@@ -94,6 +118,10 @@
@@ -103,6 +127,10 @@
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401B1,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
@@ -64,7 +64,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
{ } /* terminate list with empty entry */
};
@@ -132,17 +160,6 @@
@@ -141,17 +169,6 @@
dma_desc_sync_size, dir);
}
@@ -82,7 +82,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
static int b44_wait_bit(struct b44 *bp, unsigned long reg,
u32 bit, unsigned long timeout, const int clear)
{
@@ -269,6 +286,10 @@
@@ -278,6 +295,10 @@
break;
};
#endif
@@ -93,7 +93,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
return 0;
}
@@ -278,6 +299,30 @@
@@ -287,6 +308,30 @@
== SBTMSLOW_CLOCK);
}
@@ -124,7 +124,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
static void __b44_cam_write(struct b44 *bp, unsigned char *data, int index)
{
u32 val;
@@ -314,14 +359,14 @@
@@ -323,14 +368,14 @@
bw32(bp, B44_IMASK, bp->imask);
}
@@ -141,7 +141,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
(reg << MDIO_DATA_RA_SHIFT) |
(MDIO_TA_VALID << MDIO_DATA_TA_SHIFT)));
err = b44_wait_bit(bp, B44_EMAC_ISTAT, EMAC_INT_MII, 100, 0);
@@ -330,18 +375,34 @@
@@ -339,18 +384,34 @@
return err;
}
@@ -178,7 +178,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
/* miilib interface */
/* FIXME FIXME: phy_id is ignored, bp->phy_addr use is unconditional
* due to code existing before miilib use was added to this driver.
@@ -370,6 +431,8 @@
@@ -379,6 +440,8 @@
u32 val;
int err;
@@ -187,7 +187,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
err = b44_writephy(bp, MII_BMCR, BMCR_RESET);
if (err)
return err;
@@ -433,6 +496,22 @@
@@ -442,6 +505,22 @@
u32 val;
int err;
@@ -210,7 +210,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
if ((err = b44_readphy(bp, B44_MII_ALEDCTRL, &val)) != 0)
goto out;
if ((err = b44_writephy(bp, B44_MII_ALEDCTRL,
@@ -528,6 +607,19 @@
@@ -537,6 +616,19 @@
{
u32 bmsr, aux;
@@ -230,7 +230,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
if (!b44_readphy(bp, MII_BMSR, &bmsr) &&
!b44_readphy(bp, B44_MII_AUXCTRL, &aux) &&
(bmsr != 0xffff)) {
@@ -1282,9 +1374,10 @@
@@ -1292,9 +1384,10 @@
bw32(bp, B44_DMARX_CTRL, 0);
bp->rx_prod = bp->rx_cons = 0;
} else {
@@ -244,7 +244,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
}
ssb_core_reset(bp);
@@ -1292,8 +1385,14 @@
@@ -1302,8 +1395,14 @@
b44_clear_stats(bp);
/* Make PHY accessible. */
@@ -260,7 +260,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
br32(bp, B44_MDIO_CTRL);
if (!(br32(bp, B44_DEVCTRL) & DEVCTRL_IPP)) {
@@ -1837,18 +1936,297 @@
@@ -2034,18 +2133,297 @@
.get_perm_addr = ethtool_op_get_perm_addr,
};
@@ -447,7 +447,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
+
+ b44_halt(bp);
+ b44_init_rings(bp);
+ b44_init_hw(bp);
+ b44_init_hw(bp, 1);
+ netif_wake_queue(bp->dev);
+ spin_unlock_irq(&bp->lock);
+
@@ -490,7 +490,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
+ if (bp->flags & B44_FLAG_PAUSE_AUTO) {
+ b44_halt(bp);
+ b44_init_rings(bp);
+ b44_init_hw(bp);
+ b44_init_hw(bp, 1);
+ } else {
+ __b44_set_flow_ctrl(bp, bp->flags);
+ }
@@ -562,7 +562,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
out:
return err;
}
@@ -1868,27 +2246,60 @@
@@ -2065,27 +2443,60 @@
static int __devinit b44_get_invariants(struct b44 *bp)
{
u8 eeprom[128];
@@ -639,7 +639,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
/* With this, plus the rx_header prepended to the data by the
* hardware, we'll land the ethernet header on a 2-byte boundary.
@@ -1898,7 +2309,6 @@
@@ -2095,7 +2506,6 @@
bp->imask = IMASK_DEF;
bp->core_unit = ssb_core_unit(bp);
@@ -647,7 +647,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
/* XXX - really required?
bp->flags |= B44_FLAG_BUGGY_TXPTR;
@@ -2048,11 +2458,17 @@
@@ -2246,11 +2656,17 @@
*/
b44_chip_reset(bp);
@@ -666,10 +666,10 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
return 0;
err_out_iounmap:
diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h
--- linux-2.6.17/drivers/net/b44.h 2006-06-18 03:49:35.000000000 +0200
+++ linux-2.6.17-owrt/drivers/net/b44.h 2006-06-18 16:01:10.000000000 +0200
@@ -292,6 +292,10 @@
diff -urN linux-2.6.19.ref/drivers/net/b44.h linux-2.6.19/drivers/net/b44.h
--- linux-2.6.19.ref/drivers/net/b44.h 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19/drivers/net/b44.h 2006-12-04 21:34:14.000000000 +0100
@@ -297,6 +297,10 @@
#define SSB_PCI_MASK1 0xfc000000
#define SSB_PCI_MASK2 0xc0000000
@@ -680,7 +680,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h
/* 4400 PHY registers */
#define B44_MII_AUXCTRL 24 /* Auxiliary Control */
#define MII_AUXCTRL_DUPLEX 0x0001 /* Full Duplex */
@@ -345,6 +349,8 @@
@@ -350,6 +354,8 @@
};
#define B44_MCAST_TABLE_SIZE 32
@@ -689,11 +689,11 @@ diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h
#define B44_STAT_REG_DECLARE \
_B44(tx_good_octets) \
@@ -420,6 +426,7 @@
u32 dma_offset;
u32 flags;
+#define B44_FLAG_INIT_COMPLETE 0x00000001
@@ -428,6 +434,7 @@
#define B44_FLAG_B0_ANDLATER 0x00000001
#define B44_FLAG_BUGGY_TXPTR 0x00000002
#define B44_FLAG_REORDER_BUG 0x00000004
+#define B44_FLAG_INIT_COMPLETE 0x00000008
#define B44_FLAG_PAUSE_AUTO 0x00008000
#define B44_FLAG_FULL_DUPLEX 0x00010000
#define B44_FLAG_100_BASE_T 0x00020000

View File

@@ -0,0 +1,94 @@
diff -urN linux-2.6.19.ref/arch/mips/Kconfig linux-2.6.19/arch/mips/Kconfig
--- linux-2.6.19.ref/arch/mips/Kconfig 2006-12-04 21:33:48.000000000 +0100
+++ linux-2.6.19/arch/mips/Kconfig 2006-12-04 21:34:04.000000000 +0100
@@ -283,7 +283,6 @@
select I8259
select MIPS_BOARDS_GEN
select MIPS_BONITO64
- select MIPS_CPU_SCACHE
select MIPS_GT64120
select MIPS_MSC
select SWAP_IO_SPACE
@@ -1434,13 +1433,6 @@
bool
select BOARD_SCACHE
-#
-# Support for a MIPS32 / MIPS64 style S-caches
-#
-config MIPS_CPU_SCACHE
- bool
- select BOARD_SCACHE
-
config R5000_CPU_SCACHE
bool
select BOARD_SCACHE
diff -urN linux-2.6.19.ref/arch/mips/kernel/cpu-probe.c linux-2.6.19/arch/mips/kernel/cpu-probe.c
--- linux-2.6.19.ref/arch/mips/kernel/cpu-probe.c 2006-12-04 21:33:48.000000000 +0100
+++ linux-2.6.19/arch/mips/kernel/cpu-probe.c 2006-12-04 21:34:04.000000000 +0100
@@ -631,6 +631,8 @@
break;
case PRID_IMP_25KF:
c->cputype = CPU_25KF;
+ /* Probe for L2 cache */
+ c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
break;
case PRID_IMP_34K:
c->cputype = CPU_34K;
diff -urN linux-2.6.19.ref/arch/mips/mm/c-r4k.c linux-2.6.19/arch/mips/mm/c-r4k.c
--- linux-2.6.19.ref/arch/mips/mm/c-r4k.c 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19/arch/mips/mm/c-r4k.c 2006-12-04 21:34:04.000000000 +0100
@@ -1038,7 +1038,6 @@
extern int r5k_sc_init(void);
extern int rm7k_sc_init(void);
-extern int mips_sc_init(void);
static void __init setup_scache(void)
{
@@ -1086,29 +1085,17 @@
return;
default:
- if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
- c->isa_level == MIPS_CPU_ISA_M32R2 ||
- c->isa_level == MIPS_CPU_ISA_M64R1 ||
- c->isa_level == MIPS_CPU_ISA_M64R2) {
-#ifdef CONFIG_MIPS_CPU_SCACHE
- if (mips_sc_init ()) {
- scache_size = c->scache.ways * c->scache.sets * c->scache.linesz;
- printk("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n",
- scache_size >> 10,
- way_string[c->scache.ways], c->scache.linesz);
- }
-#else
- if (!(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
- panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
-#endif
- return;
- }
sc_present = 0;
}
if (!sc_present)
return;
+ if ((c->isa_level == MIPS_CPU_ISA_M32R1 ||
+ c->isa_level == MIPS_CPU_ISA_M64R1) &&
+ !(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
+ panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
+
/* compute a couple of other cache variables */
c->scache.waysize = scache_size / c->scache.ways;
diff -urN linux-2.6.19.ref/arch/mips/mm/Makefile linux-2.6.19/arch/mips/mm/Makefile
--- linux-2.6.19.ref/arch/mips/mm/Makefile 2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19/arch/mips/mm/Makefile 2006-12-04 21:34:04.000000000 +0100
@@ -30,7 +30,6 @@
obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o
obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o
obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o
-obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o
#
# Choose one DMA coherency model

View File

@@ -1,16 +1,7 @@
--- linux-2.6.17.orig/drivers/net/b44.h 2006-09-19 19:56:03.000000000 +0200
+++ linux-2.6.17/drivers/net/b44.h 2006-09-19 19:58:01.000000000 +0200
@@ -122,6 +122,7 @@
#define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
#define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
#define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
+#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
#define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
#define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
#define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */
--- linux-2.6.17.orig/drivers/net/b44.c 2006-09-19 19:56:03.000000000 +0200
+++ linux-2.6.17/drivers/net/b44.c 2006-09-19 20:08:22.000000000 +0200
@@ -1435,6 +1435,7 @@
diff -urN linux-2.6.19.ref/drivers/net/b44.c linux-2.6.19/drivers/net/b44.c
--- linux-2.6.19.ref/drivers/net/b44.c 2006-12-04 21:34:14.000000000 +0100
+++ linux-2.6.19/drivers/net/b44.c 2006-12-04 21:34:19.000000000 +0100
@@ -1445,6 +1445,7 @@
{
struct b44 *bp = netdev_priv(dev);
struct sockaddr *addr = p;
@@ -18,20 +9,20 @@
if (netif_running(dev))
return -EBUSY;
@@ -1445,7 +1446,11 @@
@@ -1455,7 +1456,11 @@
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
spin_lock_irq(&bp->lock);
- __b44_set_mac_addr(bp);
+
+
+ val = br32(bp, B44_RXCONFIG);
+ if (!(val & RXCONFIG_CAM_ABSENT))
+ __b44_set_mac_addr(bp);
+
+
spin_unlock_irq(&bp->lock);
return 0;
@@ -1641,7 +1646,7 @@
@@ -1797,7 +1802,7 @@
val = br32(bp, B44_RXCONFIG);
val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI);
@@ -40,3 +31,14 @@
val |= RXCONFIG_PROMISC;
bw32(bp, B44_RXCONFIG, val);
} else {
diff -urN linux-2.6.19.ref/drivers/net/b44.h linux-2.6.19/drivers/net/b44.h
--- linux-2.6.19.ref/drivers/net/b44.h 2006-12-04 21:34:14.000000000 +0100
+++ linux-2.6.19/drivers/net/b44.h 2006-12-04 21:34:19.000000000 +0100
@@ -129,6 +129,7 @@
#define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
#define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
#define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
+#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
#define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
#define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
#define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */