mtd: bcm47xxnflash: enable BCM4706 driver
authorRafał Miłecki <zajec5@gmail.com>
Mon, 12 Nov 2012 12:03:25 +0000 (13:03 +0100)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 22 Nov 2012 07:32:49 +0000 (09:32 +0200)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/nand/bcm47xxnflash/Makefile
drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h
drivers/mtd/nand/bcm47xxnflash/main.c

index 4f688f9655ad6e41ff2579532afeb4084b35f166..f05b119e134b9fbc2739ae9986adac5bbededce7 100644 (file)
@@ -1,4 +1,4 @@
 bcm47xxnflash-y                                += main.o
-bcm47xxnflash-                         += ops_bcm4706.o
+bcm47xxnflash-y                                += ops_bcm4706.o
 
 obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH)   += bcm47xxnflash.o
index 264aec448fc4ce45ccf820bd704ef6f24563cc51..0bdb2ce4da7510f7630d3ec382c79092e83258b9 100644 (file)
@@ -17,4 +17,6 @@ struct bcm47xxnflash {
        u8 id_data[8];
 };
 
+int bcm47xxnflash_ops_bcm4706_init(struct bcm47xxnflash *b47n);
+
 #endif /* BCM47XXNFLASH */
index fc9139de4dfa75c44b6818cce2de652f1c916273..2b8b05bec3ddf3b530653f4a006caecba443dc40 100644 (file)
@@ -40,8 +40,8 @@ static int bcm47xxnflash_probe(struct platform_device *pdev)
        b47n->mtd.priv = &b47n->nand_chip; /* Required */
        b47n->cc = container_of(nflash, struct bcma_drv_cc, nflash);
 
-       if (0) {
-               /* TODO: init device */
+       if (b47n->cc->core->bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
+               err = bcm47xxnflash_ops_bcm4706_init(b47n);
        } else {
                pr_err("Device not supported\n");
                err = -ENOTSUPP;