Lines Matching full:reg_base
43 void __iomem *reg_base; member
53 void __iomem *reg_base = spifi->reg_base; in gxp_spi_set_mode() local
55 value = readb(reg_base + OFFSET_SPIMCTRL); in gxp_spi_set_mode()
58 writeb(0x55, reg_base + OFFSET_SPICMD); in gxp_spi_set_mode()
59 writeb(0xaa, reg_base + OFFSET_SPICMD); in gxp_spi_set_mode()
64 writeb(value, reg_base + OFFSET_SPIMCTRL); in gxp_spi_set_mode()
71 void __iomem *reg_base = spifi->reg_base; in gxp_spi_read_reg() local
74 value = readl(reg_base + OFFSET_SPIMCFG); in gxp_spi_read_reg()
79 writel(value, reg_base + OFFSET_SPIMCFG); in gxp_spi_read_reg()
81 writel(0, reg_base + OFFSET_SPIADDR); in gxp_spi_read_reg()
83 writeb(op->cmd.opcode, reg_base + OFFSET_SPICMD); in gxp_spi_read_reg()
85 writew(op->data.nbytes, reg_base + OFFSET_SPIDCNT); in gxp_spi_read_reg()
87 value = readb(reg_base + OFFSET_SPIMCTRL); in gxp_spi_read_reg()
91 writeb(value, reg_base + OFFSET_SPIMCTRL); in gxp_spi_read_reg()
93 ret = readb_poll_timeout(reg_base + OFFSET_SPIMCTRL, value, in gxp_spi_read_reg()
109 void __iomem *reg_base = spifi->reg_base; in gxp_spi_write_reg() local
112 value = readl(reg_base + OFFSET_SPIMCFG); in gxp_spi_write_reg()
117 writel(value, reg_base + OFFSET_SPIMCFG); in gxp_spi_write_reg()
119 writel(0, reg_base + OFFSET_SPIADDR); in gxp_spi_write_reg()
121 writeb(op->cmd.opcode, reg_base + OFFSET_SPICMD); in gxp_spi_write_reg()
125 writew(op->data.nbytes, reg_base + OFFSET_SPIDCNT); in gxp_spi_write_reg()
127 value = readb(reg_base + OFFSET_SPIMCTRL); in gxp_spi_write_reg()
131 writeb(value, reg_base + OFFSET_SPIMCTRL); in gxp_spi_write_reg()
133 ret = readb_poll_timeout(reg_base + OFFSET_SPIMCTRL, value, in gxp_spi_write_reg()
158 void __iomem *reg_base = spifi->reg_base; in gxp_spi_write() local
167 value = readl(reg_base + OFFSET_SPIMCFG); in gxp_spi_write()
173 writel(value, reg_base + OFFSET_SPIMCFG); in gxp_spi_write()
175 writel(op->addr.val, reg_base + OFFSET_SPIADDR); in gxp_spi_write()
177 writeb(op->cmd.opcode, reg_base + OFFSET_SPICMD); in gxp_spi_write()
179 writew(write_len, reg_base + OFFSET_SPIDCNT); in gxp_spi_write()
183 value = readb(reg_base + OFFSET_SPIMCTRL); in gxp_spi_write()
187 writeb(value, reg_base + OFFSET_SPIMCTRL); in gxp_spi_write()
189 ret = readb_poll_timeout(reg_base + OFFSET_SPIMCTRL, value, in gxp_spi_write()
270 spifi->reg_base = devm_platform_ioremap_resource(pdev, 0); in gxp_spifi_probe()
271 if (IS_ERR(spifi->reg_base)) in gxp_spifi_probe()
272 return PTR_ERR(spifi->reg_base); in gxp_spifi_probe()