mtd: prepare place for BCMA NAND flash driver(s)
Subsystems (2)
PATCH 1/1 mtd: prepare place for BCMA NAND flash driver(s)
BCMA bus can contain NAND flash memory, it's registered in system as platform device. This adds required hooks and place for controler specific drivers.
At this point it doesn't work yet, so it's marked as BROKEN.
--- drivers/mtd/nand/Kconfig | 8 ++ drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/bcm47xxnflash/Makefile | 3 + drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h | 20 +++++ drivers/mtd/nand/bcm47xxnflash/main.c | 106 ++++++++++++++++++++++++ 5 files changed, 138 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/nand/bcm47xxnflash/Makefile create mode 100644 drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h create mode 100644 drivers/mtd/nand/bcm47xxnflash/main.c
drivers/mtd/nand/Kconfig +8 -0
@@ -489,6 +489,14 @@ config MTD_NAND_GPMI_NAND block, such as SD card. So pay attention to it when you enable the GPMI. +config MTD_NAND_BCM47XXNFLASH + tristate "Support for NAND flash on BCMA bus" + depends on BCMA_NFLASH && BROKEN + help + BCMA bus can have various flash memories attached, they are + registered by bcma as platform devices. This enables driver for + NAND flash memories. + config MTD_NAND_PLATFORM tristate "Support for generic platform NAND driver" depends on HAS_IOMEM
drivers/mtd/nand/Makefile +1 -0
@@ -51,5 +51,6 @@ obj-$(CONFIG_MTD_NAND_MPC5121_NFC) += mpc5121_nfc.o obj-$(CONFIG_MTD_NAND_RICOH) += r852.o obj-$(CONFIG_MTD_NAND_JZ4740) += jz4740_nand.o obj-$(CONFIG_MTD_NAND_GPMI_NAND) += gpmi-nand/ +obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH) += bcm47xxnflash/ nand-objs := nand_base.o nand_bbt.o
drivers/mtd/nand/bcm47xxnflash/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +bcm47xxnflash-y += main.o + +obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH) += bcm47xxnflash.o
drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h new file +20 -0
@@ -0,0 +1,20 @@ +#ifndef __BCM47XXNFLASH_H +#define __BCM47XXNFLASH_H + +#include <linux/mtd/mtd.h> +#include <linux/mtd/nand.h> + +struct bcm47xxnflash { +struct bcma_drv_cc *cc; + +struct nand_chip nand_chip; +struct mtd_info mtd; + +unsigned curr_command; +int curr_page_addr; +int curr_column; +}; + +int bcm47xxnflash_nand_bcm4706_init (struct bcm47xxnflash *bcm47xxnflash); + +#endif /* BCM47XXNFLASH */
drivers/mtd/nand/bcm47xxnflash/main.c new file +106 -0
106 lines not on this page · raw message
Signature · 1 line
1.7.7
Quoted 6 lines · Rafał Miłecki
BCMA bus can contain NAND flash memory, it's registered in system as platform device. This adds required hooks and place for controler specific drivers.
At this point it doesn't work yet, so it's marked as BROKEN.Signed-off-by Rafał Miłecki <[email protected]>
Why should it be merged upstream as BROKEN and without controller-specific drivers?
Signature · 2 lines
Best Regards, Artem Bityutskiy
2012/9/11 Artem Bityutskiy <[email protected]>:
Quoted 10 lines · Rafał Miłecki
Quoted 6 lines
BCMA bus can contain NAND flash memory, it's registered in system as platform device. This adds required hooks and place for controler specific drivers.
At this point it doesn't work yet, so it's marked as BROKEN.Signed-off-by Rafał Miłecki <[email protected]>Why should it be merged upstream as BROKEN and without controller-specific drivers?
I'll resend this in a patchset proving some basic functionality.
Signature · 1 line
Rafał
2012/9/11 Artem Bityutskiy <[email protected]>:
Quoted 10 lines · Rafał Miłecki
Quoted 6 lines
BCMA bus can contain NAND flash memory, it's registered in system as platform device. This adds required hooks and place for controler specific drivers.
At this point it doesn't work yet, so it's marked as BROKEN.Signed-off-by Rafał Miłecki <[email protected]>Why should it be merged upstream as BROKEN and without controller-specific drivers?
Regarding question about BROKEN: because they will start building after meeting changes coming from net tree during merge window. Right now that driver doesn't compile :(
Signature · 1 line
Rafał
Quoted 7 lines · Rafał Miłecki
2012/9/11 Artem Bityutskiy <[email protected]>:
Quoted 6 lines · Rafał Miłecki
Quoted 5 lines
BCMA bus can contain NAND flash memory, it's registered in system as platform device. This adds required hooks and place for controler specific drivers.
At this point it doesn't work yet, so it's marked as BROKEN.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Rafał Miłecki <[email protected]>Why should it be merged upstream as BROKEN and without controller-specific drivers?
Regarding question about BROKEN: because they will start building after meeting changes coming from net tree during merge window. Right now that driver doesn't compile :(
Usually it is solved by pulling the tree we depend on, but we need a permanent branch for this, which will not be re-based.
Signature · 2 lines
Best Regards, Artem Bityutskiy