Lines Matching refs:cd
515 struct dsa_chip_data *cd, in dsa_of_setup_routing_table() argument
542 if (!cd->rtable) { in dsa_of_setup_routing_table()
543 cd->rtable = kmalloc_array(pd->nr_chips, sizeof(s8), in dsa_of_setup_routing_table()
545 if (!cd->rtable) in dsa_of_setup_routing_table()
549 memset(cd->rtable, -1, pd->nr_chips * sizeof(s8)); in dsa_of_setup_routing_table()
552 cd->rtable[link_sw_addr] = port_index; in dsa_of_setup_routing_table()
580 struct dsa_chip_data *cd; in dsa_of_probe() local
623 cd = &pd->chip[chip_index]; in dsa_of_probe()
625 cd->of_node = child; in dsa_of_probe()
626 cd->host_dev = &mdio_bus->dev; in dsa_of_probe()
632 cd->sw_addr = be32_to_cpup(sw_addr); in dsa_of_probe()
633 if (cd->sw_addr > PHY_MAX_ADDR) in dsa_of_probe()
637 cd->eeprom_len = eeprom_len; in dsa_of_probe()
650 cd->port_dn[port_index] = port; in dsa_of_probe()
652 cd->port_names[port_index] = kstrdup(port_name, in dsa_of_probe()
654 if (!cd->port_names[port_index]) { in dsa_of_probe()
663 ret = dsa_of_setup_routing_table(pd, cd, in dsa_of_probe()