Lines Matching refs:rdev

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