int i;
u16 *p16 = (u16 *)p;
- for (i = 0 ; i < reg_nr ; ++i)
+ for (i = 0; i < reg_nr; ++i)
p16[i] = jme_phyext_read(jme, i);
}
jme_mdio_write(jme->dev, jme->mii_if.phy_id, MII_CTRL1000, miictl1000);
}
-static inline void
-jme_set_phyparm(struct jme_adapter *jme, u32 val)
-{
- u32 comm0, comm1;
-
- comm0 = jme_phyext_read(jme, JME_PHYEXT_COMM0);
- comm1 = jme_phyext_read(jme, JME_PHYEXT_COMM1);
- comm0 &= ~(0xE000u);
- comm0 |= ((val << 13) & 0xE000u);
- comm1 &= ~(0x0001u);
- comm1 |= ((val >> 3) & 0x0001u);
- jme_phyext_write(jme, JME_PHYEXT_COMM0, comm0);
- jme_phyext_write(jme, JME_PHYEXT_COMM1, comm1);
-}
-
static inline void
jme_refill_phyparm(struct jme_adapter *jme)
{
(jme->chip_sub_rev == 0 ||
jme->chip_sub_rev == 1 ||
jme->chip_sub_rev == 3))) {
- jme_set_phyparm(jme, 0x8);
+ jme_phyext_write(jme, JME_PHYEXT_COMM0, 0x008Au);
+ jme_phyext_write(jme, JME_PHYEXT_COMM1, 0x4109u);
} else if (jme->chip_main_rev == 3 &&
(jme->chip_sub_rev == 1 ||
jme->chip_sub_rev == 2)) {
- jme_set_phyparm(jme, 0x7);
+ jme_phyext_write(jme, JME_PHYEXT_COMM0, 0xE088u);
+// jme_phyext_write(jme, JME_PHYEXT_COMM1, 0x4108u);
} else if (jme->pdev->device == PCI_DEVICE_ID_JMICRON_JMC260 &&
jme->chip_main_rev == 2) {
- if (jme->chip_sub_rev == 0)
- jme_set_phyparm(jme, 0x3);
- else if (jme->chip_sub_rev == 2)
- jme_set_phyparm(jme, 0x2);
+ if (jme->chip_sub_rev == 0) {
+ jme_phyext_write(jme, JME_PHYEXT_COMM0, 0x608Au);
+// jme_phyext_write(jme, JME_PHYEXT_COMM1, 0x4108u);
+ } else if (jme->chip_sub_rev == 2) {
+ jme_phyext_write(jme, JME_PHYEXT_COMM0, 0x408Au);
+// jme_phyext_write(jme, JME_PHYEXT_COMM1, 0x4108u);
+ }
}
}