struct fsmc_eccplace *ecc_place;
unsigned int bank;
+ struct device *dev;
struct clk *clk;
struct fsmc_nand_timings *dev_timings;
cond_resched();
} while (!time_after_eq(jiffies, deadline));
+ if (time_after_eq(jiffies, deadline)) {
+ dev_err(host->dev, "calculate ecc timed out\n");
+ return -ETIMEDOUT;
+ }
+
ecc_tmp = readl(®s->bank_regs[bank].ecc1);
ecc[0] = (uint8_t) (ecc_tmp >> 0);
ecc[1] = (uint8_t) (ecc_tmp >> 8);
host->select_chip = pdata->select_bank;
host->partitions = pdata->partitions;
host->nr_partitions = pdata->nr_partitions;
+ host->dev = &pdev->dev;
host->dev_timings = pdata->nand_timings;
regs = host->regs_va;