Lines Matching refs:io_base
205 void __iomem *io_base; member
227 writel(SLCCTRL_SW_RESET, SLC_CTRL(host->io_base)); in lpc32xx_nand_setup()
231 writel(0, SLC_CFG(host->io_base)); in lpc32xx_nand_setup()
232 writel(0, SLC_IEN(host->io_base)); in lpc32xx_nand_setup()
234 SLC_ICR(host->io_base)); in lpc32xx_nand_setup()
250 writel(tmp, SLC_TAC(host->io_base)); in lpc32xx_nand_setup()
264 tmp = readl(SLC_CFG(host->io_base)); in lpc32xx_nand_cmd_ctrl()
269 writel(tmp, SLC_CFG(host->io_base)); in lpc32xx_nand_cmd_ctrl()
273 writel(cmd, SLC_CMD(host->io_base)); in lpc32xx_nand_cmd_ctrl()
275 writel(cmd, SLC_ADDR(host->io_base)); in lpc32xx_nand_cmd_ctrl()
288 if ((readl(SLC_STAT(host->io_base)) & SLCSTAT_NAND_READY) != 0) in lpc32xx_nand_device_ready()
342 return (uint8_t)readl(SLC_DATA(host->io_base)); in lpc32xx_nand_read_byte()
355 *buf++ = (uint8_t)readl(SLC_DATA(host->io_base)); in lpc32xx_nand_read_buf()
368 writel((uint32_t)*buf++, SLC_DATA(host->io_base)); in lpc32xx_nand_write_buf()
509 writel(readl(SLC_CFG(host->io_base)) | in lpc32xx_xfer()
511 SLCCFG_DMA_BURST, SLC_CFG(host->io_base)); in lpc32xx_xfer()
513 writel((readl(SLC_CFG(host->io_base)) | in lpc32xx_xfer()
516 SLC_CFG(host->io_base)); in lpc32xx_xfer()
520 writel(SLCCTRL_ECC_CLEAR, SLC_CTRL(host->io_base)); in lpc32xx_xfer()
523 writel(mtd->writesize, SLC_TC(host->io_base)); in lpc32xx_xfer()
526 writel(readl(SLC_CTRL(host->io_base)) | SLCCTRL_DMA_START, in lpc32xx_xfer()
527 SLC_CTRL(host->io_base)); in lpc32xx_xfer()
555 if (readl(SLC_STAT(host->io_base)) & SLCSTAT_DMA_FIFO) { in lpc32xx_xfer()
558 while ((readl(SLC_STAT(host->io_base)) & SLCSTAT_DMA_FIFO) && in lpc32xx_xfer()
571 readl(SLC_ECC(host->io_base)); in lpc32xx_xfer()
576 if (readl(SLC_STAT(host->io_base)) & SLCSTAT_DMA_FIFO || in lpc32xx_xfer()
577 readl(SLC_TC(host->io_base))) { in lpc32xx_xfer()
584 writel(readl(SLC_CTRL(host->io_base)) & ~SLCCTRL_DMA_START, in lpc32xx_xfer()
585 SLC_CTRL(host->io_base)); in lpc32xx_xfer()
586 writel(readl(SLC_CFG(host->io_base)) & in lpc32xx_xfer()
588 SLCCFG_DMA_BURST), SLC_CFG(host->io_base)); in lpc32xx_xfer()
777 host->io_base = devm_ioremap_resource(&pdev->dev, rc); in lpc32xx_nand_probe()
778 if (IS_ERR(host->io_base)) in lpc32xx_nand_probe()
779 return PTR_ERR(host->io_base); in lpc32xx_nand_probe()
816 chip->IO_ADDR_R = SLC_DATA(host->io_base); in lpc32xx_nand_probe()
817 chip->IO_ADDR_W = SLC_DATA(host->io_base); in lpc32xx_nand_probe()
938 tmp = readl(SLC_CTRL(host->io_base)); in lpc32xx_nand_remove()
940 writel(tmp, SLC_CTRL(host->io_base)); in lpc32xx_nand_remove()
971 tmp = readl(SLC_CTRL(host->io_base)); in lpc32xx_nand_suspend()
973 writel(tmp, SLC_CTRL(host->io_base)); in lpc32xx_nand_suspend()