mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
drivers/net/ksz9477.c: Errata 16, reset SGMII always on init
This commit is contained in:
committed by
Alan C. Assis
parent
56870fb0ea
commit
e2b1d186d7
@@ -640,6 +640,14 @@ int ksz9477_init(ksz9477_port_t master_port)
|
|||||||
return ret ? ret : -EINVAL;
|
return ret ? ret : -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Errata 16: SGMII registers are not initialized by hardware reset
|
||||||
|
* To ensure clean environment, reset the switch now.
|
||||||
|
*/
|
||||||
|
|
||||||
|
regval16 = SGMII_CONTROL_SOFT_RESET;
|
||||||
|
ret = ksz9477_sgmii_write_indirect(KSZ9477_SGMII_CONTROL,
|
||||||
|
®val16, 1);
|
||||||
|
|
||||||
/* Check that indirect access to PHY MMD works.
|
/* Check that indirect access to PHY MMD works.
|
||||||
* Write LED mode to single-LED mode and verify access by
|
* Write LED mode to single-LED mode and verify access by
|
||||||
* reading back the value.
|
* reading back the value.
|
||||||
|
|||||||
@@ -100,6 +100,10 @@
|
|||||||
|
|
||||||
/* Register bit definitions */
|
/* Register bit definitions */
|
||||||
|
|
||||||
|
/* KSZ9477_SGMII_CONTROL */
|
||||||
|
|
||||||
|
#define SGMII_CONTROL_SOFT_RESET (1 << 15)
|
||||||
|
|
||||||
/* KSZ9477_ID2, KSZ9477_ID1 */
|
/* KSZ9477_ID2, KSZ9477_ID1 */
|
||||||
|
|
||||||
#define KSZ9477_ID 0x9477
|
#define KSZ9477_ID 0x9477
|
||||||
|
|||||||
Reference in New Issue
Block a user