Lines Matching full:csr
41 static u16 xpcs_mmio_addr_page(ptrdiff_t csr) in xpcs_mmio_addr_page() argument
43 return FIELD_GET(0x1fff00, csr); in xpcs_mmio_addr_page()
46 static ptrdiff_t xpcs_mmio_addr_offset(ptrdiff_t csr) in xpcs_mmio_addr_offset() argument
48 return FIELD_GET(0xff, csr); in xpcs_mmio_addr_offset()
54 ptrdiff_t csr, ofs; in xpcs_mmio_read_reg_indirect() local
58 csr = xpcs_mmio_addr_format(dev, reg); in xpcs_mmio_read_reg_indirect()
59 page = xpcs_mmio_addr_page(csr); in xpcs_mmio_read_reg_indirect()
60 ofs = xpcs_mmio_addr_offset(csr); in xpcs_mmio_read_reg_indirect()
85 ptrdiff_t csr, ofs; in xpcs_mmio_write_reg_indirect() local
89 csr = xpcs_mmio_addr_format(dev, reg); in xpcs_mmio_write_reg_indirect()
90 page = xpcs_mmio_addr_page(csr); in xpcs_mmio_write_reg_indirect()
91 ofs = xpcs_mmio_addr_offset(csr); in xpcs_mmio_write_reg_indirect()
116 ptrdiff_t csr; in xpcs_mmio_read_reg_direct() local
119 csr = xpcs_mmio_addr_format(dev, reg); in xpcs_mmio_read_reg_direct()
127 ret = readl(pxpcs->reg_base + (csr << 2)); in xpcs_mmio_read_reg_direct()
130 ret = readw(pxpcs->reg_base + (csr << 1)); in xpcs_mmio_read_reg_direct()
142 ptrdiff_t csr; in xpcs_mmio_write_reg_direct() local
145 csr = xpcs_mmio_addr_format(dev, reg); in xpcs_mmio_write_reg_direct()
153 writel(val, pxpcs->reg_base + (csr << 2)); in xpcs_mmio_write_reg_direct()
156 writew(val, pxpcs->reg_base + (csr << 1)); in xpcs_mmio_write_reg_direct()
283 pxpcs->cclk = devm_clk_get(dev, "csr"); in xpcs_plat_init_clk()
286 "Failed to get CSR clock\n"); in xpcs_plat_init_clk()