Skip to content

Commit

Permalink
Merge tag 'mtd/fixes-for-5.0-rc3' of git://git.infradead.org/linux-mtd
Browse files Browse the repository at this point in the history
Pull mtd fixes from Boris Brezillon:
 "Raw NAND changes:

   - jz4740: fix a compilation warning

   - fsmc: fix a regression introduced by ->select_chip() deprecation

   - denali: fix a regression introduced by NAND_KEEP_TIMINGS addition"

* tag 'mtd/fixes-for-5.0-rc3' of git://git.infradead.org/linux-mtd:
  mtd: rawnand: denali: get ->setup_data_interface() working again
  mtd: nand: jz4740: fix '__iomem *' vs. '* __iomem'
  mtd: rawnand: fsmc: Keep bank enable bit set
  • Loading branch information
torvalds committed Jan 18, 2019
2 parents 6e4673b + d311e0c commit 3cdf680
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/raw/denali.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ int denali_init(struct denali_nand_info *denali)
}

/* clk rate info is needed for setup_data_interface */
if (denali->clk_rate && denali->clk_x_rate)
if (!denali->clk_rate || !denali->clk_x_rate)
chip->options |= NAND_KEEP_TIMINGS;

chip->legacy.dummy_controller.ops = &denali_controller_ops;
Expand Down
21 changes: 0 additions & 21 deletions drivers/mtd/nand/raw/fsmc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,23 +593,6 @@ static void fsmc_write_buf_dma(struct fsmc_nand_data *host, const u8 *buf,
dma_xfer(host, (void *)buf, len, DMA_TO_DEVICE);
}

/* fsmc_select_chip - assert or deassert nCE */
static void fsmc_ce_ctrl(struct fsmc_nand_data *host, bool assert)
{
u32 pc = readl(host->regs_va + FSMC_PC);

if (!assert)
writel_relaxed(pc & ~FSMC_ENABLE, host->regs_va + FSMC_PC);
else
writel_relaxed(pc | FSMC_ENABLE, host->regs_va + FSMC_PC);

/*
* nCE line changes must be applied before returning from this
* function.
*/
mb();
}

/*
* fsmc_exec_op - hook called by the core to execute NAND operations
*
Expand All @@ -627,8 +610,6 @@ static int fsmc_exec_op(struct nand_chip *chip, const struct nand_operation *op,

pr_debug("Executing operation [%d instructions]:\n", op->ninstrs);

fsmc_ce_ctrl(host, true);

for (op_id = 0; op_id < op->ninstrs; op_id++) {
instr = &op->instrs[op_id];

Expand Down Expand Up @@ -686,8 +667,6 @@ static int fsmc_exec_op(struct nand_chip *chip, const struct nand_operation *op,
}
}

fsmc_ce_ctrl(host, false);

return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/nand/raw/jz4740_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static int jz_nand_correct_ecc_rs(struct nand_chip *chip, uint8_t *dat,
}

static int jz_nand_ioremap_resource(struct platform_device *pdev,
const char *name, struct resource **res, void *__iomem *base)
const char *name, struct resource **res, void __iomem **base)
{
int ret;

Expand Down

0 comments on commit 3cdf680

Please sign in to comment.