mips: ath79: ar933x: Fix probe error for kernel driver ag71xx
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 mips: ath79: ar933x: Fix probe error for kernel driver ag71xx
We need reset the Ethernet Switch analog part before operation, or the build-in Ethernet PHY don't work, openwrt kernel driver ag71xx occur the following error:
[ 1.854519] libphy: ag71xx_mdio: probed [ 2.646539] ag71xx-mdio.1: unknown phy id 'ffff:ffff' [ 3.235778] ag71xx ag71xx.0: no PHY found with phy_mask=00000010
---
arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 1 + arch/mips/mach-ath79/reset.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
arch/mips/mach-ath79/include/mach/ar71xx_regs.h +1 -0
@@ -660,6 +660,7 @@#define AR933X_RESET_GE1_MDIO BIT(23)#define AR933X_RESET_GE0_MDIO BIT(22) +#define AR933X_RESET_ETH_SWITCH_ANALOG BIT(14)#define AR933X_RESET_GE1_MAC BIT(13)#define AR933X_RESET_WMAC BIT(11)#define AR933X_RESET_GE0_MAC BIT(9)
arch/mips/mach-ath79/reset.c +1 -1
@@ -81,7 +81,7 @@ static int eth_init_ar933x(void) MAP_NOCACHE);const u32 mask =AR933X_RESET_GE0_MAC |AR933X_RESET_GE0_MDIO |AR933X_RESET_GE1_MAC |AR933X_RESET_GE1_MDIO | -AR933X_RESET_ETH_SWITCH ; +AR933X_RESET_ETH_SWITCH |AR933X_RESET_ETH_SWITCH_ANALOG ;/* Clear MDIO slave EN bit. */ clrbits_be32 (rregs +AR933X_RESET_REG_BOOTSTRAP ,BIT (17 ));
Signature · 1 line
1.9.1
PATCH 2/2 mips: ath79: ar933x: Fix probe error for kernel driver ag71xx
Quoted 9 lines · Wills Wang
We need reset the Ethernet Switch analog part before operation, or the build-in Ethernet PHY don't work, openwrt kernel driver ag71xx occur the following error:
[ 1.854519] libphy: ag71xx_mdio: probed [ 2.646539] ag71xx-mdio.1: unknown phy id 'ffff:ffff' [ 3.235778] ag71xx ag71xx.0: no PHY found with phy_mask=00000010Signed-off-by Wills Wang <[email protected]>
The kernel should be independent of bootloader, so you should cook similar patch for Linux.
Quoted 32 lines
---
arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 1 + arch/mips/mach-ath79/reset.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)arch/mips/mach-ath79/include/mach/ar71xx_regs.h +1
-0@@ -660,6 +660,7 @@#define AR933X_RESET_GE1_MDIO BIT(23)#define AR933X_RESET_GE0_MDIO BIT(22) +#define AR933X_RESET_ETH_SWITCH_ANALOG BIT(14)#define AR933X_RESET_GE1_MAC BIT(13)#define AR933X_RESET_WMAC BIT(11)#define AR933X_RESET_GE0_MAC BIT(9)arch/mips/mach-ath79/reset.c +1
-1@@ -81,7 +81,7 @@ static int eth_init_ar933x(void) MAP_NOCACHE);const u32 mask =AR933X_RESET_GE0_MAC |AR933X_RESET_GE0_MDIO |AR933X_RESET_GE1_MAC |AR933X_RESET_GE1_MDIO | -AR933X_RESET_ETH_SWITCH ; +AR933X_RESET_ETH_SWITCH |AR933X_RESET_ETH_SWITCH_ANALOG ;/* Clear MDIO slave EN bit. */ clrbits_be32 (rregs +AR933X_RESET_REG_BOOTSTRAP ,BIT (17 ));
Signature · 2 lines
Best regards, Marek Vasut
PATCH 2/2 mips: ath79: ar933x: Fix probe error for kernel driver ag71xx
In reply to Wills Wang2016-05-21 13:58 GMT+02:00 Wills Wang <[email protected]>:
Quoted 10 lines
We need reset the Ethernet Switch analog part before operation, or the build-in Ethernet PHY don't work, openwrt kernel driver ag71xx occur the following error:
[ 1.854519] libphy: ag71xx_mdio: probed [ 2.646539] ag71xx-mdio.1: unknown phy id 'ffff:ffff' [ 3.235778] ag71xx ag71xx.0: no PHY found with phy_mask=00000010Signed-off-by Wills Wang <[email protected]>---
could you please change the commit subject and message? Your intention is to make Marek's ag71xx ethernet driver working for AR933x, isn't it?
If a kernel driver is dependent on the initialization of the bootloader, then that should be fixed in the kernel driver. The philosophy of U-Boot is to not initialize hardware at all when it's not needed by U-Boot itself. Thus if one boots a board without using network in the bootloader or if one doesn't compile in network support, the ethernet hardware parts are never initialized. But the kernel and it's drivers should still work.
Signature · 1 line
- Daniel
PATCH 2/2 mips: ath79: ar933x: Fix probe error for kernel driver ag71xx
Quoted 9 lines · Daniel Schwierzeck
2016-05-21 13:58 GMT+02:00 Wills Wang <[email protected]>:
Quoted 8 lines
We need reset the Ethernet Switch analog part before operation, or the build-in Ethernet PHY don't work, openwrt kernel driver ag71xx occur the following error:
[ 1.854519] libphy: ag71xx_mdio: probed [ 2.646539] ag71xx-mdio.1: unknown phy id 'ffff:ffff' [ 3.235778] ag71xx ag71xx.0: no PHY found with phy_mask=00000010
Quoted 5 lines
Quoted 2 lines
Signed-off-by Wills Wang <[email protected]>---
could you please change the commit subject and message? Your intention is to make Marek's ag71xx ethernet driver working for AR933x, isn't it?
Ok
Quoted 8 lines
If a kernel driver is dependent on the initialization of the bootloader, then that should be fixed in the kernel driver. The philosophy of U-Boot is to not initialize hardware at all when it's not needed by U-Boot itself. Thus if one boots a board without using network in the bootloader or if one doesn't compile in network support, the ethernet hardware parts are never initialized. But the kernel and it's drivers should still work.
Signature · 2 lines
Best Regards Wills