Lines Matching defs:rdev

156 tsi57x_em_init(struct rio_dev *rdev)
161 pr_debug("TSI578 %s [%d:%d]\n", __func__, rdev->destid, rdev->hopcount);
164 portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) {
166 rio_read_config_32(rdev,
168 rio_write_config_32(rdev,
173 rio_read_config_32(rdev,
174 RIO_DEV_PORT_N_ERR_STS_CSR(rdev, portnum),
176 rio_write_config_32(rdev,
177 RIO_DEV_PORT_N_ERR_STS_CSR(rdev, portnum),
180 rio_read_config_32(rdev,
182 rio_write_config_32(rdev,
187 rio_read_config_32(rdev,
189 rio_write_config_32(rdev,
194 rio_read_config_32(rdev,
195 RIO_DEV_PORT_N_CTL_CSR(rdev, portnum),
202 rio_write_config_32(rdev,
203 rdev->phys_efptr + RIO_PORT_LINKTO_CTL_CSR, 0x9a << 8);
209 tsi57x_em_handler(struct rio_dev *rdev, u8 portnum)
211 struct rio_mport *mport = rdev->net->hport;
217 rio_read_config_32(rdev,
218 RIO_DEV_PORT_N_ERR_STS_CSR(rdev, portnum),
225 rio_read_config_32(rdev,
226 RIO_DEV_PORT_N_CTL_CSR(rdev, portnum),
229 rio_write_config_32(rdev,
230 RIO_DEV_PORT_N_CTL_CSR(rdev, portnum),
233 rio_write_config_32(rdev,
234 RIO_DEV_PORT_N_CTL_CSR(rdev, portnum),
241 rio_read_config_32(rdev,
242 RIO_DEV_PORT_N_MNT_RSP_CSR(rdev, portnum),
250 rio_write_config_32(rdev,
255 rio_read_config_32(rdev,
256 RIO_DEV_PORT_N_MNT_RSP_CSR(rdev,
269 rio_read_config_32(rdev, TSI578_SP_INT_STATUS(portnum), &intstat);
271 rdev->destid, rdev->hopcount, portnum, intstat);
274 rio_read_config_32(rdev,
277 route_port = rdev->rswitch->route_table[regval];
279 rio_name(rdev), portnum, regval);
280 tsi57x_route_add_entry(mport, rdev->destid, rdev->hopcount,
284 rio_write_config_32(rdev, TSI578_SP_INT_STATUS(portnum),
301 static int tsi57x_probe(struct rio_dev *rdev, const struct rio_device_id *id)
303 pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev));
305 spin_lock(&rdev->rswitch->lock);
307 if (rdev->rswitch->ops) {
308 spin_unlock(&rdev->rswitch->lock);
311 rdev->rswitch->ops = &tsi57x_switch_ops;
313 if (rdev->do_enum) {
315 rio_write_config_32(rdev, RIO_STD_RTE_DEFAULT_PORT,
319 spin_unlock(&rdev->rswitch->lock);
323 static void tsi57x_remove(struct rio_dev *rdev)
325 pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev));
326 spin_lock(&rdev->rswitch->lock);
327 if (rdev->rswitch->ops != &tsi57x_switch_ops) {
328 spin_unlock(&rdev->rswitch->lock);
331 rdev->rswitch->ops = NULL;
332 spin_unlock(&rdev->rswitch->lock);