diff options
Diffstat (limited to 'drivers/mtd/nand/omap2.c')
-rw-r--r-- | drivers/mtd/nand/omap2.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 8e820ddf4e08..81b80af55872 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c | |||
@@ -1023,9 +1023,9 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip) | |||
1023 | int status, state = this->state; | 1023 | int status, state = this->state; |
1024 | 1024 | ||
1025 | if (state == FL_ERASING) | 1025 | if (state == FL_ERASING) |
1026 | timeo += (HZ * 400) / 1000; | 1026 | timeo += msecs_to_jiffies(400); |
1027 | else | 1027 | else |
1028 | timeo += (HZ * 20) / 1000; | 1028 | timeo += msecs_to_jiffies(20); |
1029 | 1029 | ||
1030 | writeb(NAND_CMD_STATUS & 0xFF, info->reg.gpmc_nand_command); | 1030 | writeb(NAND_CMD_STATUS & 0xFF, info->reg.gpmc_nand_command); |
1031 | while (time_before(jiffies, timeo)) { | 1031 | while (time_before(jiffies, timeo)) { |
@@ -1701,8 +1701,9 @@ static int omap3_init_bch(struct mtd_info *mtd, int ecc_opt) | |||
1701 | elm_node = of_find_node_by_phandle(be32_to_cpup(parp)); | 1701 | elm_node = of_find_node_by_phandle(be32_to_cpup(parp)); |
1702 | pdev = of_find_device_by_node(elm_node); | 1702 | pdev = of_find_device_by_node(elm_node); |
1703 | info->elm_dev = &pdev->dev; | 1703 | info->elm_dev = &pdev->dev; |
1704 | elm_config(info->elm_dev, bch_type); | 1704 | |
1705 | info->is_elm_used = true; | 1705 | if (elm_config(info->elm_dev, bch_type) == 0) |
1706 | info->is_elm_used = true; | ||
1706 | } | 1707 | } |
1707 | 1708 | ||
1708 | if (info->is_elm_used && (mtd->writesize <= 4096)) { | 1709 | if (info->is_elm_used && (mtd->writesize <= 4096)) { |