Hi Tathagata, My device uses serial flash and not nand flash. From the Broadcom SDK I got the following code to detect a device using nflash. When using this code in drivers/bcma/driver_mips.c instead of the detection you had in it before bcma do not want to initialize nflash for my device and it still works with serial flash. Does this code also work for you?
Hauke --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c @@ -182,6 +182,21 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore) { struct bcma_bus *bus = mcore->core->bus; + if (bus->drv_cc.core->id.rev == 38 && + (bus->drv_cc.status & (1 << 4)) != 0) { +#ifdef CONFIG_BCMA_NFLASH + pr_info("found nand flash.\n"); + bus->drv_cc.flash_type = BCMA_NFLASH; + if (!bcma_nflash_init(&bus->drv_cc)) { + pr_err("problem initializing nand flash"); + return; + } +#else + pr_info("NAND flash not supported.\n"); +#endif + return; + } + switch (bus->drv_cc.capabilities & BCMA_CC_CAP_FLASHT) { case BCMA_CC_FLASHT_STSER: case BCMA_CC_FLASHT_ATSER: On 01/12/2012 12:41 PM, Tathagata Das wrote: > Hi Hauke, > I guess some NAND flash specific code are not under NAND flash tag. > > Regards, > Tatha > > On 01/12/2012 04:51 PM, Hauke Mehrtens wrote: >> On 01/12/2012 04:13 AM, tathagata wrote: >>> Hi Hauke, >>> I will modify it and send updated patch. >>> Which hardware are you using ? >>> >>> Regards, >>> Tathagata >> Hi Tathagata, >> >> I am using a Netgear WNDR3400 with an BCM4716 with Serial flash. In the >> evening I will look where exactly it fails. >> >> Hauke >> >>> On 12.01.2012 03:41, Hauke Mehrtens wrote: >>>> On 01/10/2012 01:00 PM, Tathagata Das wrote: >>>>> Hi, >>>>> Attached is the updated kernel patch to support brcm47xx BCMA NAND >>>>> flash. This patch uses driver/mtd/nand/nand_base.c. I have used latest >>>>> trunk source code to create this patch. >>>>> >>>>> Regards, >>>>> Tathagata<tathag...@alumnux.com> >>>> Hi Tathagata, >>>> >>>> your patch causes my system to not boot any more. These are the last >>>> lines I see: >>>> [ 0.000000] bcma: IRQ reconfiguration done >>>> [ 0.000000] bcma: core 0x0800, irq : 2(S)* 3 4 5 6 D I >>>> [ 0.000000] bcma: core 0x082c, irq : 2(S)* 3 4 5 6 D I >>>> [ 0.000000] BUS Capability: 184801c9 >>>> >>>> Some additional points I have: >>>> * The KConfig option MTD_NAND_BCM47XX should select BCMA_NFLASH. >>>> * brcm47xx does not build without MTD_NAND_BCM47XX set. >>>> * In some places your patch is wrongly formated, it should use tabs >>>> instead of spaces. >>>> >>>> Could you please post the patch inlined into the mail next time it >>>> makes >>>> reviewing a loot easier. >>>> >>>> Hauke >> _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel