mtd: bcm963xx-flash: try JEDEC probe if CFI fails

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Dec 3 11:59:01 EST 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=3345cc4f6d779753810c7f13aab6b29417869548
Commit:     3345cc4f6d779753810c7f13aab6b29417869548
Parent:     79346507ad48895f41b438fa562b1965721f36b9
Author:     Guillaume LECERF <glecerf at gmail.com>
AuthorDate: Fri Oct 29 16:17:49 2010 +0200
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Dec 3 16:25:16 2010 +0000

    mtd: bcm963xx-flash: try JEDEC probe if CFI fails
    
    Signed-off-by: Guillaume LECERF <glecerf at gmail.com>
    Acked-by: Florian Fainelli <florian at openwrt.org>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/maps/bcm963xx-flash.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/maps/bcm963xx-flash.c b/drivers/mtd/maps/bcm963xx-flash.c
index d175c12..1f30495 100644
--- a/drivers/mtd/maps/bcm963xx-flash.c
+++ b/drivers/mtd/maps/bcm963xx-flash.c
@@ -196,10 +196,15 @@ static int bcm963xx_probe(struct platform_device *pdev)
 	bcm963xx_mtd_info = do_map_probe("cfi_probe", &bcm963xx_map);
 	if (!bcm963xx_mtd_info) {
 		dev_err(&pdev->dev, "failed to probe using CFI\n");
+		bcm963xx_mtd_info = do_map_probe("jedec_probe", &bcm963xx_map);
+		if (bcm963xx_mtd_info)
+			goto probe_ok;
+		dev_err(&pdev->dev, "failed to probe using JEDEC\n");
 		err = -EIO;
 		goto err_probe;
 	}
 
+probe_ok:
 	bcm963xx_mtd_info->owner = THIS_MODULE;
 
 	/* This is mutually exclusive */



More information about the linux-mtd-cvs mailing list