diff options
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index c7243dca90fd..dabbc14db563 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c | |||
@@ -1578,8 +1578,6 @@ static int gpmi_set_geometry(struct gpmi_nand_data *this) | |||
1578 | 1578 | ||
1579 | static int gpmi_pre_bbt_scan(struct gpmi_nand_data *this) | 1579 | static int gpmi_pre_bbt_scan(struct gpmi_nand_data *this) |
1580 | { | 1580 | { |
1581 | int ret; | ||
1582 | |||
1583 | /* Set up swap_block_mark, must be set before the gpmi_set_geometry() */ | 1581 | /* Set up swap_block_mark, must be set before the gpmi_set_geometry() */ |
1584 | if (GPMI_IS_MX23(this)) | 1582 | if (GPMI_IS_MX23(this)) |
1585 | this->swap_block_mark = false; | 1583 | this->swap_block_mark = false; |
@@ -1587,12 +1585,8 @@ static int gpmi_pre_bbt_scan(struct gpmi_nand_data *this) | |||
1587 | this->swap_block_mark = true; | 1585 | this->swap_block_mark = true; |
1588 | 1586 | ||
1589 | /* Set up the medium geometry */ | 1587 | /* Set up the medium geometry */ |
1590 | ret = gpmi_set_geometry(this); | 1588 | return gpmi_set_geometry(this); |
1591 | if (ret) | ||
1592 | return ret; | ||
1593 | 1589 | ||
1594 | /* NAND boot init, depends on the gpmi_set_geometry(). */ | ||
1595 | return nand_boot_init(this); | ||
1596 | } | 1590 | } |
1597 | 1591 | ||
1598 | static void gpmi_nfc_exit(struct gpmi_nand_data *this) | 1592 | static void gpmi_nfc_exit(struct gpmi_nand_data *this) |
@@ -1682,10 +1676,16 @@ static int gpmi_nfc_init(struct gpmi_nand_data *this) | |||
1682 | if (ret) | 1676 | if (ret) |
1683 | goto err_out; | 1677 | goto err_out; |
1684 | 1678 | ||
1679 | chip->options |= NAND_SKIP_BBTSCAN; | ||
1685 | ret = nand_scan_tail(mtd); | 1680 | ret = nand_scan_tail(mtd); |
1686 | if (ret) | 1681 | if (ret) |
1687 | goto err_out; | 1682 | goto err_out; |
1688 | 1683 | ||
1684 | ret = nand_boot_init(this); | ||
1685 | if (ret) | ||
1686 | goto err_out; | ||
1687 | chip->scan_bbt(mtd); | ||
1688 | |||
1689 | ppdata.of_node = this->pdev->dev.of_node; | 1689 | ppdata.of_node = this->pdev->dev.of_node; |
1690 | ret = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); | 1690 | ret = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); |
1691 | if (ret) | 1691 | if (ret) |