Lines Matching refs:membase
41 void __iomem *membase; member
51 return readl_poll_timeout(priv->membase + MDIO_CMD_REG, busy, in ipq4019_mdio_wait_busy()
66 data = readl(priv->membase + MDIO_MODE_REG); in ipq4019_mdio_read_c45()
70 writel(data, priv->membase + MDIO_MODE_REG); in ipq4019_mdio_read_c45()
73 writel((mii_id << 8) | mmd, priv->membase + MDIO_ADDR_REG); in ipq4019_mdio_read_c45()
76 writel(reg, priv->membase + MDIO_DATA_WRITE_REG); in ipq4019_mdio_read_c45()
81 writel(cmd, priv->membase + MDIO_CMD_REG); in ipq4019_mdio_read_c45()
89 writel(cmd, priv->membase + MDIO_CMD_REG); in ipq4019_mdio_read_c45()
95 return readl(priv->membase + MDIO_DATA_READ_REG); in ipq4019_mdio_read_c45()
107 data = readl(priv->membase + MDIO_MODE_REG); in ipq4019_mdio_read_c22()
111 writel(data, priv->membase + MDIO_MODE_REG); in ipq4019_mdio_read_c22()
114 writel((mii_id << 8) | regnum, priv->membase + MDIO_ADDR_REG); in ipq4019_mdio_read_c22()
119 writel(cmd, priv->membase + MDIO_CMD_REG); in ipq4019_mdio_read_c22()
126 return readl(priv->membase + MDIO_DATA_READ_REG); in ipq4019_mdio_read_c22()
139 data = readl(priv->membase + MDIO_MODE_REG); in ipq4019_mdio_write_c45()
143 writel(data, priv->membase + MDIO_MODE_REG); in ipq4019_mdio_write_c45()
146 writel((mii_id << 8) | mmd, priv->membase + MDIO_ADDR_REG); in ipq4019_mdio_write_c45()
149 writel(reg, priv->membase + MDIO_DATA_WRITE_REG); in ipq4019_mdio_write_c45()
153 writel(cmd, priv->membase + MDIO_CMD_REG); in ipq4019_mdio_write_c45()
159 writel(value, priv->membase + MDIO_DATA_WRITE_REG); in ipq4019_mdio_write_c45()
162 writel(cmd, priv->membase + MDIO_CMD_REG); in ipq4019_mdio_write_c45()
182 data = readl(priv->membase + MDIO_MODE_REG); in ipq4019_mdio_write_c22()
186 writel(data, priv->membase + MDIO_MODE_REG); in ipq4019_mdio_write_c22()
189 writel((mii_id << 8) | regnum, priv->membase + MDIO_ADDR_REG); in ipq4019_mdio_write_c22()
192 writel(value, priv->membase + MDIO_DATA_WRITE_REG); in ipq4019_mdio_write_c22()
197 writel(cmd, priv->membase + MDIO_CMD_REG); in ipq4019_mdio_write_c22()
247 priv->membase = devm_platform_ioremap_resource(pdev, 0); in ipq4019_mdio_probe()
248 if (IS_ERR(priv->membase)) in ipq4019_mdio_probe()
249 return PTR_ERR(priv->membase); in ipq4019_mdio_probe()