From 1c8e2c318cab8476bd7aeb81b5aca4a35e833517 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Thu, 10 Mar 2022 17:11:41 +0800 Subject: [PATCH] eth phy: reset page to 0 on kasli-soc for ident --- libboard_zynq/src/eth/phy/id.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libboard_zynq/src/eth/phy/id.rs b/libboard_zynq/src/eth/phy/id.rs index 03e830b..06ad30f 100644 --- a/libboard_zynq/src/eth/phy/id.rs +++ b/libboard_zynq/src/eth/phy/id.rs @@ -11,6 +11,9 @@ pub struct PhyIdentifier { } pub fn identify_phy(pa: &mut PA, addr: u8) -> Option { + #[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 {