Changeset 30943


Ignore:
Timestamp:
2012-03-14T23:59:39+01:00 (6 years ago)
Author:
hauke
Message:

brcm47xx: add support for NAND flash on devices using bcma

This patch add support for the NAND flash on BCM5357 based devices like the WNR3500Lv2.

Thank you Tathagata Das <tathagata@…> for the patch

Location:
trunk/target/linux/brcm47xx
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm47xx/config-3.2

    r30488 r30943  
    2525CONFIG_BCMA_HOST_PCI_POSSIBLE=y 
    2626CONFIG_BCMA_HOST_SOC=y 
     27CONFIG_BCMA_NFLASH=y 
    2728CONFIG_BCMA_POSSIBLE=y 
    2829CONFIG_BCMA_SFLASH=y 
     
    9596CONFIG_MTD_BCM47XX_PFLASH=y 
    9697CONFIG_MTD_BCM47XX_SFLASH=y 
     98CONFIG_MTD_NAND=y 
     99CONFIG_MTD_NAND_BCM47XX=y 
     100CONFIG_MTD_NAND_ECC=y 
     101# CONFIG_MTD_SM_COMMON is not set 
    97102CONFIG_NEED_DMA_MAP_STATE=y 
    98103CONFIG_NEED_PER_CPU_KM=y 
  • trunk/target/linux/brcm47xx/patches-3.2/042-bcma-export-bcma_pcie_read.patch

    r30942 r30943  
    1414--- a/drivers/bcma/bcma_private.h 
    1515+++ b/drivers/bcma/bcma_private.h 
    16 @@ -46,6 +46,8 @@ u32 bcma_pmu_get_clockcpu(struct bcma_dr 
    17  int bcma_sflash_init(struct bcma_drv_cc *cc); 
    18  #endif /* CONFIG_BCMA_SFLASH */ 
     16@@ -51,6 +51,8 @@ int bcma_sflash_init(struct bcma_drv_cc 
     17 int bcma_nflash_init(struct bcma_drv_cc *cc); 
     18 #endif /* CONFIG_BCMA_NFLASH */ 
    1919  
    2020+u32 bcma_pcie_read(struct bcma_drv_pci *pc, u32 address); 
  • trunk/target/linux/brcm47xx/patches-3.2/043-bcma-make-some-functions-__devinit.patch

    r30942 r30943  
    2929 int __init bcma_bus_early_register(struct bcma_bus *bus, 
    3030                                   struct bcma_device *core_cc, 
    31 @@ -55,7 +55,7 @@ extern void __exit bcma_host_pci_exit(vo 
     31@@ -60,7 +60,7 @@ extern void __exit bcma_host_pci_exit(vo 
    3232 #endif /* CONFIG_BCMA_HOST_PCI */ 
    3333  
  • trunk/target/linux/brcm47xx/patches-3.2/044-bcma-add-PCIe-host-controller.patch

    r30942 r30943  
    9797--- a/drivers/bcma/bcma_private.h 
    9898+++ b/drivers/bcma/bcma_private.h 
    99 @@ -55,6 +55,7 @@ extern void __exit bcma_host_pci_exit(vo 
     99@@ -60,6 +60,7 @@ extern void __exit bcma_host_pci_exit(vo 
    100100 #endif /* CONFIG_BCMA_HOST_PCI */ 
    101101  
  • trunk/target/linux/brcm47xx/patches-3.2/114-MIPS-BCM47xx-Setup-and-register-serial-early.patch

    r30942 r30943  
    1616--- a/arch/mips/bcm47xx/setup.c 
    1717+++ b/arch/mips/bcm47xx/setup.c 
    18 @@ -32,6 +32,8 @@ 
     18@@ -33,6 +33,8 @@ 
    1919 #include <linux/ssb/ssb_embedded.h> 
    2020 #include <linux/bcma/bcma_soc.h> 
     
    2525 #include <asm/reboot.h> 
    2626 #include <asm/time.h> 
    27 @@ -279,6 +281,31 @@ static int bcm47xx_get_invariants(struct 
     27@@ -281,6 +283,31 @@ static int bcm47xx_get_invariants(struct 
    2828        return 0; 
    2929 } 
     
    5757 { 
    5858        int err; 
    59 @@ -311,6 +338,10 @@ static void __init bcm47xx_register_ssb( 
     59@@ -313,6 +340,10 @@ static void __init bcm47xx_register_ssb( 
    6060                        memcpy(&mcore->serial_ports[1], &port, sizeof(port)); 
    6161                } 
  • trunk/target/linux/brcm47xx/patches-3.2/196-MIPS-BCM47XX-return-number-of-written-bytes-in-nvram.patch

    r30638 r30943  
    1313--- a/arch/mips/bcm47xx/nvram.c 
    1414+++ b/arch/mips/bcm47xx/nvram.c 
    15 @@ -192,8 +192,7 @@ int nvram_getenv(char *name, char *val, 
     15@@ -243,8 +243,7 @@ int nvram_getenv(char *name, char *val, 
    1616                value = eq + 1; 
    1717                if ((eq - var) == strlen(name) && 
  • trunk/target/linux/brcm47xx/patches-3.2/198-MIPS-BCM47XX-move-and-extend-sprom-parsing.patch

    r30638 r30943  
    2929--- a/arch/mips/bcm47xx/setup.c 
    3030+++ b/arch/mips/bcm47xx/setup.c 
    31 @@ -91,156 +91,7 @@ static void bcm47xx_machine_halt(void) 
     31@@ -93,156 +93,7 @@ static void bcm47xx_machine_halt(void) 
    3232 } 
    3333  
  • trunk/target/linux/brcm47xx/patches-3.2/199-MIPS-BCM47XX-provide-sprom-to-bcma-bus.patch

    r30638 r30943  
    2121- *  Copyright (C) 2010-2011 Hauke Mehrtens <hauke@hauke-m.de> 
    2222+ *  Copyright (C) 2010-2012 Hauke Mehrtens <hauke@hauke-m.de> 
     23  *  Copyright (C) 2011-2012 Tathagata Das <tathagata@alumnux.com> 
    2324  * 
    2425  *  This program is free software; you can redistribute  it and/or modify it 
    25   *  under  the terms of  the GNU General  Public License as published by the 
    26 @@ -91,7 +91,7 @@ static void bcm47xx_machine_halt(void) 
     26@@ -93,7 +93,7 @@ static void bcm47xx_machine_halt(void) 
    2727 } 
    2828  
     
    3333        char prefix[10]; 
    3434  
    35 @@ -108,7 +108,7 @@ static int bcm47xx_get_sprom(struct ssb_ 
     35@@ -110,7 +110,7 @@ static int bcm47xx_get_sprom(struct ssb_ 
    3636 } 
    3737  
     
    4242        char buf[20]; 
    4343  
    44 @@ -163,7 +163,7 @@ static void __init bcm47xx_register_ssb( 
     44@@ -165,7 +165,7 @@ static void __init bcm47xx_register_ssb( 
    4545        char buf[100]; 
    4646        struct ssb_mipscore *mcore; 
     
    5151                printk(KERN_WARNING "bcm47xx: someone else already registered" 
    5252                        " a ssb SPROM callback handler (err %d)\n", err); 
    53 @@ -197,10 +197,41 @@ static void __init bcm47xx_register_ssb( 
     53@@ -199,10 +199,41 @@ static void __init bcm47xx_register_ssb( 
    5454 #endif 
    5555  
  • trunk/target/linux/brcm47xx/patches-3.2/231-bcma_reorder_sprom_fill.patch

    r30876 r30943  
    11--- a/arch/mips/bcm47xx/setup.c 
    22+++ b/arch/mips/bcm47xx/setup.c 
    3 @@ -96,6 +96,7 @@ static int bcm47xx_get_sprom_ssb(struct 
     3@@ -98,6 +98,7 @@ static int bcm47xx_get_sprom_ssb(struct 
    44        char prefix[10]; 
    55  
     
    99                         bus->host_pci->bus->number + 1, 
    1010                         PCI_SLOT(bus->host_pci->devfn)); 
    11 @@ -124,6 +125,7 @@ static int bcm47xx_get_invariants(struct 
     11@@ -126,6 +127,7 @@ static int bcm47xx_get_invariants(struct 
    1212        if (nvram_getenv("boardrev", buf, sizeof(buf)) >= 0) 
    1313                iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0); 
     
    1717  
    1818        if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0) 
    19 @@ -203,12 +205,14 @@ static int bcm47xx_get_sprom_bcma(struct 
     19@@ -205,12 +207,14 @@ static int bcm47xx_get_sprom_bcma(struct 
    2020        struct bcma_device *core; 
    2121  
  • trunk/target/linux/brcm47xx/patches-3.2/400-arch-bcm47xx.patch

    r30873 r30943  
    11--- a/arch/mips/bcm47xx/nvram.c 
    22+++ b/arch/mips/bcm47xx/nvram.c 
    3 @@ -198,3 +198,30 @@ int nvram_getenv(char *name, char *val, 
     3@@ -249,3 +249,30 @@ int nvram_getenv(char *name, char *val, 
    44        return NVRAM_ERR_ENVNOTFOUND; 
    55 } 
     
    3434--- a/arch/mips/bcm47xx/setup.c 
    3535+++ b/arch/mips/bcm47xx/setup.c 
    36 @@ -355,3 +355,20 @@ static int __init bcm47xx_register_flash 
     36@@ -376,3 +376,20 @@ static int __init bcm47xx_register_flash 
    3737        return -1; 
    3838 } 
  • trunk/target/linux/brcm47xx/patches-3.2/820-wgt634u-nvram-fix.patch

    r30638 r30943  
    246246--- a/arch/mips/bcm47xx/nvram.c 
    247247+++ b/arch/mips/bcm47xx/nvram.c 
    248 @@ -23,6 +23,8 @@ 
    249  #include <asm/mach-bcm47xx/bus.h> 
     248@@ -25,6 +25,8 @@ 
     249 #include <linux/mtd/bcm47xx_nand.h> 
    250250  
    251251 static char nvram_buf[NVRAM_SPACE]; 
     
    255255 /* Probe for NVRAM header */ 
    256256 static void early_nvram_init_pflash(void) 
    257 @@ -59,6 +61,25 @@ static void early_nvram_init_pflash(void 
     257@@ -61,6 +63,25 @@ static void early_nvram_init_pflash(void 
    258258                break; 
    259259 #endif 
     
    281281        off = FLASH_MIN; 
    282282        while (off <= lim) { 
    283 @@ -181,6 +202,12 @@ int nvram_getenv(char *name, char *val, 
     283@@ -232,6 +253,12 @@ int nvram_getenv(char *name, char *val, 
    284284        if (!nvram_buf[0]) 
    285285                early_nvram_init(); 
     
    294294        var = &nvram_buf[sizeof(struct nvram_header)]; 
    295295        end = nvram_buf + sizeof(nvram_buf) - 2; 
    296 @@ -209,6 +236,9 @@ char *nvram_get(const char *name) 
     296@@ -260,6 +287,9 @@ char *nvram_get(const char *name) 
    297297        if (!nvram_buf[0]) 
    298298                early_nvram_init(); 
  • trunk/target/linux/brcm47xx/patches-3.2/980-wnr834b_no_cardbus_invariant.patch

    r30873 r30943  
    11--- a/arch/mips/bcm47xx/setup.c 
    22+++ b/arch/mips/bcm47xx/setup.c 
    3 @@ -131,6 +131,10 @@ static int bcm47xx_get_invariants(struct 
     3@@ -133,6 +133,10 @@ static int bcm47xx_get_invariants(struct 
    44        if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0) 
    55                iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10); 
  • trunk/target/linux/brcm47xx/patches-3.2/999-wl_exports.patch

    r29756 r30943  
    11--- a/arch/mips/bcm47xx/nvram.c 
    22+++ b/arch/mips/bcm47xx/nvram.c 
    3 @@ -22,7 +22,8 @@ 
    4  #include <asm/mach-bcm47xx/bcm47xx.h> 
     3@@ -24,7 +24,8 @@ 
    54 #include <asm/mach-bcm47xx/bus.h> 
     5 #include <linux/mtd/bcm47xx_nand.h> 
    66  
    77-static char nvram_buf[NVRAM_SPACE]; 
Note: See TracChangeset for help on using the changeset viewer.