diff options
author | Brian Norris <computersforpeace@gmail.com> | 2013-08-10 04:03:33 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2013-10-27 19:26:59 -0400 |
commit | 252026ab9382b5204b7ccd152863a49ae7408656 (patch) | |
tree | ca00d920a1647bb2c70133dfcab0bcd35fc53716 | |
parent | 2ee41fa0bad874e9fef3743979d297f97b7eda49 (diff) |
mtd: nand: lpc32xx_slc: don't call nand_default_bbt directly
This driver is doing some strange logic here. If it doesn't have
flash-based BBT enabled, it allows nand_scan_tail() to scan the BBT. But
if it is using flash-based BBT, it tells nand_scan_tail() to skip
scanning, then it immediately calls the default BBT scanning function
itself.
As I read it, this logic is equivalent to the default nand_scan_tail()
behavior without interfering with NAND_SKIP_BBTSCAN or calling
nand_default_bbt() directly at all.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r-- | drivers/mtd/nand/lpc32xx_slc.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c index add75709d415..6d5f8c515436 100644 --- a/drivers/mtd/nand/lpc32xx_slc.c +++ b/drivers/mtd/nand/lpc32xx_slc.c | |||
@@ -893,7 +893,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) | |||
893 | 893 | ||
894 | /* Avoid extra scan if using BBT, setup BBT support */ | 894 | /* Avoid extra scan if using BBT, setup BBT support */ |
895 | if (host->ncfg->use_bbt) { | 895 | if (host->ncfg->use_bbt) { |
896 | chip->options |= NAND_SKIP_BBTSCAN; | ||
897 | chip->bbt_options |= NAND_BBT_USE_FLASH; | 896 | chip->bbt_options |= NAND_BBT_USE_FLASH; |
898 | 897 | ||
899 | /* | 898 | /* |
@@ -915,13 +914,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) | |||
915 | goto err_exit3; | 914 | goto err_exit3; |
916 | } | 915 | } |
917 | 916 | ||
918 | /* Standard layout in FLASH for bad block tables */ | ||
919 | if (host->ncfg->use_bbt) { | ||
920 | if (nand_default_bbt(mtd) < 0) | ||
921 | dev_err(&pdev->dev, | ||
922 | "Error initializing default bad block tables\n"); | ||
923 | } | ||
924 | |||
925 | mtd->name = "nxp_lpc3220_slc"; | 917 | mtd->name = "nxp_lpc3220_slc"; |
926 | ppdata.of_node = pdev->dev.of_node; | 918 | ppdata.of_node = pdev->dev.of_node; |
927 | res = mtd_device_parse_register(mtd, NULL, &ppdata, host->ncfg->parts, | 919 | res = mtd_device_parse_register(mtd, NULL, &ppdata, host->ncfg->parts, |