Skip to content

Commit

Permalink
mtd: lpc32xx_mlc: Adjust to pl08x DMA interface changes
Browse files Browse the repository at this point in the history
This patch adjusts the LPC32xx MLC NAND driver to the new pl08x DMA interface,
fixing the compile error resulting from changed pl08x structures.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-By: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Roland Stigge authored and David Woodhouse committed Jul 13, 2012
1 parent 314a156 commit 79f9df7
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/mtd/nand/lpc32xx_mlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,25 +576,14 @@ static void lpc32xx_ecc_enable(struct mtd_info *mtd, int mode)
/* Always enabled! */
}

static bool lpc32xx_dma_filter(struct dma_chan *chan, void *param)
{
struct pl08x_dma_chan *ch =
container_of(chan, struct pl08x_dma_chan, chan);

/* In LPC32xx's PL080 DMA wiring, the MLC NAND DMA signal is #12 */
if (ch->cd->min_signal == 12)
return true;
return false;
}

static int lpc32xx_dma_setup(struct lpc32xx_nand_host *host)
{
struct mtd_info *mtd = &host->mtd;
dma_cap_mask_t mask;

dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
host->dma_chan = dma_request_channel(mask, lpc32xx_dma_filter, NULL);
host->dma_chan = dma_request_channel(mask, pl08x_filter_id, "nand-mlc");
if (!host->dma_chan) {
dev_err(mtd->dev.parent, "Failed to request DMA channel\n");
return -EBUSY;
Expand Down

0 comments on commit 79f9df7

Please sign in to comment.