Lines Matching refs:rdev

160 tsi57x_em_init(struct rio_dev *rdev)  in tsi57x_em_init()  argument
165 pr_debug("TSI578 %s [%d:%d]\n", __func__, rdev->destid, rdev->hopcount); in tsi57x_em_init()
168 portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) { in tsi57x_em_init()
170 rio_read_config_32(rdev, in tsi57x_em_init()
172 rio_write_config_32(rdev, in tsi57x_em_init()
177 rio_read_config_32(rdev, in tsi57x_em_init()
178 rdev->phys_efptr + in tsi57x_em_init()
181 rio_write_config_32(rdev, in tsi57x_em_init()
182 rdev->phys_efptr + in tsi57x_em_init()
186 rio_read_config_32(rdev, in tsi57x_em_init()
188 rio_write_config_32(rdev, in tsi57x_em_init()
193 rio_read_config_32(rdev, in tsi57x_em_init()
195 rio_write_config_32(rdev, in tsi57x_em_init()
200 rio_read_config_32(rdev, in tsi57x_em_init()
201 rdev->phys_efptr + RIO_PORT_N_CTL_CSR(portnum), in tsi57x_em_init()
208 rio_write_config_32(rdev, in tsi57x_em_init()
209 rdev->phys_efptr + RIO_PORT_LINKTO_CTL_CSR, 0x9a << 8); in tsi57x_em_init()
215 tsi57x_em_handler(struct rio_dev *rdev, u8 portnum) in tsi57x_em_handler() argument
217 struct rio_mport *mport = rdev->net->hport; in tsi57x_em_handler()
223 rio_read_config_32(rdev, in tsi57x_em_handler()
224 rdev->phys_efptr + RIO_PORT_N_ERR_STS_CSR(portnum), in tsi57x_em_handler()
231 rio_read_config_32(rdev, in tsi57x_em_handler()
232 rdev->phys_efptr + RIO_PORT_N_CTL_CSR(portnum), in tsi57x_em_handler()
235 rio_write_config_32(rdev, in tsi57x_em_handler()
236 rdev->phys_efptr + RIO_PORT_N_CTL_CSR(portnum), in tsi57x_em_handler()
239 rio_write_config_32(rdev, in tsi57x_em_handler()
240 rdev->phys_efptr + RIO_PORT_N_CTL_CSR(portnum), in tsi57x_em_handler()
247 rio_read_config_32(rdev, in tsi57x_em_handler()
248 rdev->phys_efptr + RIO_PORT_N_MNT_RSP_CSR(portnum), in tsi57x_em_handler()
256 rio_write_config_32(rdev, in tsi57x_em_handler()
261 rio_read_config_32(rdev, in tsi57x_em_handler()
262 rdev->phys_efptr + in tsi57x_em_handler()
275 rio_read_config_32(rdev, TSI578_SP_INT_STATUS(portnum), &intstat); in tsi57x_em_handler()
277 rdev->destid, rdev->hopcount, portnum, intstat); in tsi57x_em_handler()
280 rio_read_config_32(rdev, in tsi57x_em_handler()
283 route_port = rdev->rswitch->route_table[regval]; in tsi57x_em_handler()
285 rio_name(rdev), portnum, regval); in tsi57x_em_handler()
286 tsi57x_route_add_entry(mport, rdev->destid, rdev->hopcount, in tsi57x_em_handler()
290 rio_write_config_32(rdev, TSI578_SP_INT_STATUS(portnum), in tsi57x_em_handler()
307 static int tsi57x_probe(struct rio_dev *rdev, const struct rio_device_id *id) in tsi57x_probe() argument
309 pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev)); in tsi57x_probe()
311 spin_lock(&rdev->rswitch->lock); in tsi57x_probe()
313 if (rdev->rswitch->ops) { in tsi57x_probe()
314 spin_unlock(&rdev->rswitch->lock); in tsi57x_probe()
317 rdev->rswitch->ops = &tsi57x_switch_ops; in tsi57x_probe()
319 if (rdev->do_enum) { in tsi57x_probe()
321 rio_write_config_32(rdev, RIO_STD_RTE_DEFAULT_PORT, in tsi57x_probe()
325 spin_unlock(&rdev->rswitch->lock); in tsi57x_probe()
329 static void tsi57x_remove(struct rio_dev *rdev) in tsi57x_remove() argument
331 pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev)); in tsi57x_remove()
332 spin_lock(&rdev->rswitch->lock); in tsi57x_remove()
333 if (rdev->rswitch->ops != &tsi57x_switch_ops) { in tsi57x_remove()
334 spin_unlock(&rdev->rswitch->lock); in tsi57x_remove()
337 rdev->rswitch->ops = NULL; in tsi57x_remove()
338 spin_unlock(&rdev->rswitch->lock); in tsi57x_remove()