Changeset 5134


Ignore:
Timestamp:
2006-10-16T00:36:16+02:00 (11 years ago)
Author:
nbd
Message:

add io resource patch from #800, merge flash map stuff from linux 2.4 to support the wl-hdd without breaking the netgear wgt634u

Location:
trunk/target/linux/brcm-2.6/patches
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm-2.6/patches/001-bcm947xx.patch

    r5133 r5134  
    1133011330+       .name   = "Ext PCI I/O resources", 
    1133111331+       .start  = 0x100, 
    11332 +       .end    = 0x1FF, 
     11332+       .end    = 0x7FF, 
    1133311333+       .flags  = IORESOURCE_IO, 
    1133411334+}; 
  • trunk/target/linux/brcm-2.6/patches/002-flash-map.patch

    r4634 r5134  
    22--- linux.old/drivers/mtd/maps/bcm47xx-flash.c  1970-01-01 01:00:00.000000000 +0100 
    33+++ linux.dev/drivers/mtd/maps/bcm47xx-flash.c  2006-06-23 19:54:06.000000000 +0200 
    4 @@ -0,0 +1,452 @@ 
     4@@ -0,0 +1,490 @@ 
    55+/* 
    66+ *  Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> 
     
    5757+#include <asm/io.h> 
    5858+ 
     59+#include <typedefs.h> 
     60+#include <osl.h> 
     61+#include <bcmnvram.h> 
     62+#include <bcmutils.h> 
     63+#include <sbconfig.h> 
     64+#include <sbchipc.h> 
     65+#include <sbutils.h> 
    5966+#include <trxhdr.h> 
    6067+ 
    6168+#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) 
    6269+#define NVRAM_SPACE 0x8000 
    63 +#define WINDOW_ADDR 0x1c000000 
    64 +#define WINDOW_SIZE 0x800000 
     70+#define WINDOW_ADDR 0x1fc00000 
     71+#define WINDOW_SIZE 0x400000 
    6572+#define BUSWIDTH 2 
    6673+ 
     74+extern sb_t *sbh; 
    6775+static struct mtd_info *bcm947xx_mtd; 
    6876+ 
     
    395403+int __init init_bcm947xx_map(void) 
    396404+{ 
     405+       uint coreidx; 
     406+       chipcregs_t *cc; 
     407+       uint32 fltype; 
     408+       uint window_addr = 0, window_size = 0; 
    397409+       size_t size; 
    398410+       int ret = 0; 
     
    402414+#endif 
    403415+ 
    404 +       bcm947xx_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE); 
     416+       coreidx = sb_coreidx(sbh); 
     417+ 
     418+       /* Check strapping option if chipcommon exists */ 
     419+       if ((cc = sb_setcore(sbh, SB_CC, 0))) { 
     420+               fltype = readl(&cc->capabilities) & CAP_FLASH_MASK; 
     421+               if (fltype == PFLASH) { 
     422+                       bcm947xx_map.map_priv_2 = 1; 
     423+                       window_addr = 0x1c000000; 
     424+                       bcm947xx_map.size = window_size = 32 * 1024 * 1024; 
     425+                       if ((readl(&cc->flash_config) & CC_CFG_DS) == 0) 
     426+                               bcm947xx_map.bankwidth = 1; 
     427+               } 
     428+       } else { 
     429+               fltype = PFLASH; 
     430+               bcm947xx_map.map_priv_2 = 0; 
     431+               window_addr = WINDOW_ADDR; 
     432+               window_size = WINDOW_SIZE; 
     433+       } 
     434+ 
     435+       sb_setcoreidx(sbh, coreidx); 
     436+ 
     437+       if (fltype != PFLASH) { 
     438+               printk(KERN_ERR "pflash: found no supported devices\n"); 
     439+               ret = -ENODEV; 
     440+               goto fail; 
     441+       } 
     442+       bcm947xx_map.virt = ioremap(window_addr, window_size); 
    405443+ 
    406444+       if (!bcm947xx_map.virt) { 
     
    455493+module_init(init_bcm947xx_map); 
    456494+module_exit(cleanup_bcm947xx_map); 
    457 diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig 
    458 --- linux.old/drivers/mtd/maps/Kconfig  2006-06-23 19:13:51.000000000 +0200 
    459 +++ linux.dev/drivers/mtd/maps/Kconfig  2006-06-23 18:47:58.000000000 +0200 
    460 @@ -299,6 +299,12 @@ 
    461           Mapping for the Flaga digital module. If you don't have one, ignore 
    462           this setting. 
    463   
    464 +config MTD_BCM47XX 
    465 +       tristate "BCM47xx flash device" 
    466 +       depends on MIPS && MTD_CFI && BCM947XX 
    467 +       help 
    468 +         Support for the flash chips on the BCM947xx board. 
    469 +          
    470  config MTD_BEECH 
    471         tristate "CFI Flash device mapped on IBM 405LP Beech" 
    472         depends on MTD_CFI && BEECH 
    473 diff -urN linux.old/drivers/mtd/maps/Makefile linux.dev/drivers/mtd/maps/Makefile 
    474 --- linux.old/drivers/mtd/maps/Makefile 2006-06-23 19:13:51.000000000 +0200 
    475 +++ linux.dev/drivers/mtd/maps/Makefile 2006-06-23 18:47:58.000000000 +0200 
    476 @@ -30,6 +30,7 @@ 
    477  obj-$(CONFIG_MTD_PCMCIA)       += pcmciamtd.o 
    478  obj-$(CONFIG_MTD_RPXLITE)      += rpxlite.o 
    479  obj-$(CONFIG_MTD_TQM8XXL)      += tqm8xxl.o 
    480 +obj-$(CONFIG_MTD_BCM47XX)      += bcm47xx-flash.o 
    481  obj-$(CONFIG_MTD_SA1100)       += sa1100-flash.o 
    482  obj-$(CONFIG_MTD_IPAQ)         += ipaq-flash.o 
    483  obj-$(CONFIG_MTD_SBC_GXX)      += sbc_gxx.o 
Note: See TracChangeset for help on using the changeset viewer.