eth phy: reset page to 0 on kasli-soc for ident

This commit is contained in:
mwojcik 2022-03-10 17:11:41 +08:00
parent 67880b4e0b
commit 1c8e2c318c
1 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,9 @@ pub struct PhyIdentifier {
}
pub fn identify_phy<PA: PhyAccess>(pa: &mut PA, addr: u8) -> Option<PhyIdentifier> {
#[cfg(feature = "target_kasli_soc")]
pa.write_phy(addr, 0x16, 0); //reset page
let id1 = pa.read_phy(addr, 2);
let id2 = pa.read_phy(addr, 3);
if id1 != 0xFFFF || id2 != 0xFFFF {