Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / rapidio / switches / tsi57x.c
index d34df72..2003fb6 100644 (file)
@@ -166,7 +166,8 @@ tsi57x_em_init(struct rio_dev *rdev)
 
        pr_debug("TSI578 %s [%d:%d]\n", __func__, destid, hopcount);
 
-       for (portnum = 0; portnum < 16; portnum++) {
+       for (portnum = 0;
+            portnum < RIO_GET_TOTAL_PORTS(rdev->swpinfo); portnum++) {
                /* Make sure that Port-Writes are enabled (for all ports) */
                rio_mport_read_config_32(mport, destid, hopcount,
                                TSI578_SP_MODE(portnum), &regval);
@@ -205,6 +206,10 @@ tsi57x_em_init(struct rio_dev *rdev)
                        portnum++;
        }
 
+       /* set TVAL = ~50us */
+       rio_mport_write_config_32(mport, destid, hopcount,
+               rdev->phys_efptr + RIO_PORT_LINKTO_CTL_CSR, 0x9a << 8);
+
        return 0;
 }