Lines Matching refs:io_base
174 void __iomem *io_base; member
229 ctrlreg1 = readl(dev->io_base + SMI_CR1); in spear_smi_read_sr()
231 writel(ctrlreg1 & ~(SW_MODE | WB_MODE), dev->io_base + SMI_CR1); in spear_smi_read_sr()
235 dev->io_base + SMI_CR2); in spear_smi_read_sr()
248 writel(ctrlreg1, dev->io_base + SMI_CR1); in spear_smi_read_sr()
249 writel(0, dev->io_base + SMI_CR2); in spear_smi_read_sr()
301 status = readl(dev->io_base + SMI_SR); in spear_smi_int_handler()
307 writel(0, dev->io_base + SMI_SR); in spear_smi_int_handler()
343 writel(0, dev->io_base + SMI_SR); in spear_smi_hw_init()
345 writel(val, dev->io_base + SMI_CR1); in spear_smi_hw_init()
387 ctrlreg1 = readl(dev->io_base + SMI_CR1); in spear_smi_write_enable()
389 writel(ctrlreg1 & ~SW_MODE, dev->io_base + SMI_CR1); in spear_smi_write_enable()
392 writel((bank << BANK_SHIFT) | WE | TFIE, dev->io_base + SMI_CR2); in spear_smi_write_enable()
398 writel(ctrlreg1, dev->io_base + SMI_CR1); in spear_smi_write_enable()
399 writel(0, dev->io_base + SMI_CR2); in spear_smi_write_enable()
460 ctrlreg1 = readl(dev->io_base + SMI_CR1); in spear_smi_erase_sector()
461 writel((ctrlreg1 | SW_MODE) & ~WB_MODE, dev->io_base + SMI_CR1); in spear_smi_erase_sector()
464 writel(command, dev->io_base + SMI_TR); in spear_smi_erase_sector()
467 dev->io_base + SMI_CR2); in spear_smi_erase_sector()
479 writel(ctrlreg1, dev->io_base + SMI_CR1); in spear_smi_erase_sector()
480 writel(0, dev->io_base + SMI_CR2); in spear_smi_erase_sector()
576 ctrlreg1 = val = readl(dev->io_base + SMI_CR1); in spear_mtd_read()
581 writel(val, dev->io_base + SMI_CR1); in spear_mtd_read()
586 writel(ctrlreg1, dev->io_base + SMI_CR1); in spear_mtd_read()
634 ctrlreg1 = readl(dev->io_base + SMI_CR1); in spear_smi_cpy_toio()
635 writel((ctrlreg1 | WB_MODE) & ~SW_MODE, dev->io_base + SMI_CR1); in spear_smi_cpy_toio()
655 writel(ctrlreg1, dev->io_base + SMI_CR1); in spear_smi_cpy_toio()
758 val = readl(dev->io_base + SMI_CR1); in spear_smi_probe_flash()
759 writel(val | SW_MODE, dev->io_base + SMI_CR1); in spear_smi_probe_flash()
762 writel(OPCODE_RDID, dev->io_base + SMI_TR); in spear_smi_probe_flash()
766 writel(val, dev->io_base + SMI_CR2); in spear_smi_probe_flash()
777 val = readl(dev->io_base + SMI_RR); in spear_smi_probe_flash()
783 val = readl(dev->io_base + SMI_CR1); in spear_smi_probe_flash()
784 writel(val & ~SW_MODE, dev->io_base + SMI_CR1); in spear_smi_probe_flash()
980 dev->io_base = devm_ioremap_resource(&pdev->dev, smi_base); in spear_smi_probe()
981 if (IS_ERR(dev->io_base)) { in spear_smi_probe()
982 ret = PTR_ERR(dev->io_base); in spear_smi_probe()