diff options
Diffstat (limited to 'drivers/rapidio/switches/tsi568.c')
-rw-r--r-- | drivers/rapidio/switches/tsi568.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/rapidio/switches/tsi568.c b/drivers/rapidio/switches/tsi568.c index b9a389b9f812..3994c00aa01f 100644 --- a/drivers/rapidio/switches/tsi568.c +++ b/drivers/rapidio/switches/tsi568.c | |||
@@ -113,22 +113,17 @@ tsi568_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount, | |||
113 | static int | 113 | static int |
114 | tsi568_em_init(struct rio_dev *rdev) | 114 | tsi568_em_init(struct rio_dev *rdev) |
115 | { | 115 | { |
116 | struct rio_mport *mport = rdev->net->hport; | ||
117 | u16 destid = rdev->rswitch->destid; | ||
118 | u8 hopcount = rdev->rswitch->hopcount; | ||
119 | u32 regval; | 116 | u32 regval; |
120 | int portnum; | 117 | int portnum; |
121 | 118 | ||
122 | pr_debug("TSI568 %s [%d:%d]\n", __func__, destid, hopcount); | 119 | pr_debug("TSI568 %s [%d:%d]\n", __func__, rdev->destid, rdev->hopcount); |
123 | 120 | ||
124 | /* Make sure that Port-Writes are disabled (for all ports) */ | 121 | /* Make sure that Port-Writes are disabled (for all ports) */ |
125 | for (portnum = 0; | 122 | for (portnum = 0; |
126 | portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) { | 123 | portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) { |
127 | rio_mport_read_config_32(mport, destid, hopcount, | 124 | rio_read_config_32(rdev, TSI568_SP_MODE(portnum), ®val); |
128 | TSI568_SP_MODE(portnum), ®val); | 125 | rio_write_config_32(rdev, TSI568_SP_MODE(portnum), |
129 | rio_mport_write_config_32(mport, destid, hopcount, | 126 | regval | TSI568_SP_MODE_PW_DIS); |
130 | TSI568_SP_MODE(portnum), | ||
131 | regval | TSI568_SP_MODE_PW_DIS); | ||
132 | } | 127 | } |
133 | 128 | ||
134 | return 0; | 129 | return 0; |