serdes_regs 246 drivers/net/ethernet/ti/netcp.h int netcp_xgbe_serdes_init(void __iomem *serdes_regs, void __iomem *xgbe_regs); serdes_regs 127 drivers/net/ethernet/ti/netcp_xgbepcsr.c static void netcp_xgbe_serdes_cmu_init(void __iomem *serdes_regs) serdes_regs 133 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + cfg_phyb_1p25g_156p25mhz_cmu0[i].ofs, serdes_regs 140 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + cfg_phyb_10p3125g_156p25mhz_cmu1[i].ofs, serdes_regs 148 drivers/net/ethernet/ti/netcp_xgbepcsr.c void __iomem *serdes_regs, int lane) serdes_regs 154 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + serdes_regs 162 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + (0x200 * lane) + 0x0380, serdes_regs 166 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + (0x200 * lane) + 0x03c0, serdes_regs 170 drivers/net/ethernet/ti/netcp_xgbepcsr.c static void netcp_xgbe_serdes_com_enable(void __iomem *serdes_regs) serdes_regs 175 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + cfg_phyb_10p3125g_comlane[i].ofs, serdes_regs 182 drivers/net/ethernet/ti/netcp_xgbepcsr.c void __iomem *serdes_regs, int lane) serdes_regs 185 drivers/net/ethernet/ti/netcp_xgbepcsr.c writel(0xe0e9e038, serdes_regs + 0x1fe0 + (4 * lane)); serdes_regs 188 drivers/net/ethernet/ti/netcp_xgbepcsr.c static void netcp_xgbe_serdes_phyb_rst_clr(void __iomem *serdes_regs) serdes_regs 190 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + 0x0a00, 0x0000001f, 0x000000ff); serdes_regs 193 drivers/net/ethernet/ti/netcp_xgbepcsr.c static void netcp_xgbe_serdes_pll_disable(void __iomem *serdes_regs) serdes_regs 195 drivers/net/ethernet/ti/netcp_xgbepcsr.c writel(0x88000000, serdes_regs + 0x1ff4); serdes_regs 198 drivers/net/ethernet/ti/netcp_xgbepcsr.c static void netcp_xgbe_serdes_pll_enable(void __iomem *serdes_regs) serdes_regs 200 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_phyb_rst_clr(serdes_regs); serdes_regs 201 drivers/net/ethernet/ti/netcp_xgbepcsr.c writel(0xee000000, serdes_regs + 0x1ff4); serdes_regs 235 drivers/net/ethernet/ti/netcp_xgbepcsr.c static u32 netcp_xgbe_serdes_read_tbus_val(void __iomem *serdes_regs) serdes_regs 239 drivers/net/ethernet/ti/netcp_xgbepcsr.c if (PHY_A(serdes_regs)) { serdes_regs 240 drivers/net/ethernet/ti/netcp_xgbepcsr.c tmp = (readl(serdes_regs + 0x0ec) >> 24) & 0x0ff; serdes_regs 241 drivers/net/ethernet/ti/netcp_xgbepcsr.c tmp |= ((readl(serdes_regs + 0x0fc) >> 16) & 0x00f00); serdes_regs 243 drivers/net/ethernet/ti/netcp_xgbepcsr.c tmp = (readl(serdes_regs + 0x0f8) >> 16) & 0x0fff; serdes_regs 249 drivers/net/ethernet/ti/netcp_xgbepcsr.c static void netcp_xgbe_serdes_write_tbus_addr(void __iomem *serdes_regs, serdes_regs 252 drivers/net/ethernet/ti/netcp_xgbepcsr.c if (PHY_A(serdes_regs)) { serdes_regs 253 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + 0x0008, ((select << 5) + ofs) << 24, serdes_regs 270 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + 0x00fc, ((select << 8) + ofs) << 16, ~0xf800ffff); serdes_regs 273 drivers/net/ethernet/ti/netcp_xgbepcsr.c static u32 netcp_xgbe_serdes_read_select_tbus(void __iomem *serdes_regs, serdes_regs 277 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_write_tbus_addr(serdes_regs, select, ofs); serdes_regs 279 drivers/net/ethernet/ti/netcp_xgbepcsr.c return netcp_xgbe_serdes_read_tbus_val(serdes_regs); serdes_regs 282 drivers/net/ethernet/ti/netcp_xgbepcsr.c static void netcp_xgbe_serdes_reset_cdr(void __iomem *serdes_regs, serdes_regs 289 drivers/net/ethernet/ti/netcp_xgbepcsr.c serdes_regs, lane + 1, 5); serdes_regs 298 drivers/net/ethernet/ti/netcp_xgbepcsr.c tbus = netcp_xgbe_serdes_read_select_tbus(serdes_regs, lane + serdes_regs 307 drivers/net/ethernet/ti/netcp_xgbepcsr.c static int netcp_xgbe_check_link_status(void __iomem *serdes_regs, serdes_regs 318 drivers/net/ethernet/ti/netcp_xgbepcsr.c loss = readl(serdes_regs + 0x1fc0 + 0x20 + (i * 0x04)) & 0x1; serdes_regs 326 drivers/net/ethernet/ti/netcp_xgbepcsr.c sig_detect_reg = serdes_regs + (i * 0x200) + 0x200 + 0x04; serdes_regs 343 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_reset_cdr(serdes_regs, serdes_regs 364 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_reset_cdr(serdes_regs, serdes_regs 391 drivers/net/ethernet/ti/netcp_xgbepcsr.c static int netcp_xgbe_serdes_check_lane(void __iomem *serdes_regs, serdes_regs 402 drivers/net/ethernet/ti/netcp_xgbepcsr.c link_up = netcp_xgbe_check_link_status(serdes_regs, sw_regs, 2, serdes_regs 429 drivers/net/ethernet/ti/netcp_xgbepcsr.c static void netcp_xgbe_serdes_setup_cm_c1_c2(void __iomem *serdes_regs, serdes_regs 435 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + cfg_cm_c1_c2[i].ofs + (0x200 * lane), serdes_regs 441 drivers/net/ethernet/ti/netcp_xgbepcsr.c static void netcp_xgbe_reset_serdes(void __iomem *serdes_regs) serdes_regs 445 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + PCSR_CPU_CTRL_OFFSET, POR_EN, POR_EN); serdes_regs 449 drivers/net/ethernet/ti/netcp_xgbepcsr.c reg_rmw(serdes_regs + PCSR_CPU_CTRL_OFFSET, 0, POR_EN); serdes_regs 453 drivers/net/ethernet/ti/netcp_xgbepcsr.c static int netcp_xgbe_serdes_config(void __iomem *serdes_regs, serdes_regs 458 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_pll_disable(serdes_regs); serdes_regs 459 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_cmu_init(serdes_regs); serdes_regs 462 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_lane_config(serdes_regs, i); serdes_regs 464 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_com_enable(serdes_regs); serdes_regs 467 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_setup_cm_c1_c2(serdes_regs, i, 0, 0, 5); serdes_regs 469 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_pll_enable(serdes_regs); serdes_regs 471 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_lane_enable(serdes_regs, i); serdes_regs 479 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_serdes_check_lane(serdes_regs, sw_regs); serdes_regs 483 drivers/net/ethernet/ti/netcp_xgbepcsr.c int netcp_xgbe_serdes_init(void __iomem *serdes_regs, void __iomem *xgbe_regs) serdes_regs 488 drivers/net/ethernet/ti/netcp_xgbepcsr.c val = readl(serdes_regs + 0xa00); serdes_regs 491 drivers/net/ethernet/ti/netcp_xgbepcsr.c netcp_xgbe_reset_serdes(serdes_regs); serdes_regs 493 drivers/net/ethernet/ti/netcp_xgbepcsr.c return netcp_xgbe_serdes_config(serdes_regs, xgbe_regs);