Skip to contentSkip to conversation

ARM: arch-meson: fix writel arguments order

PATCH In review Neil Armstrong 2 participants 3 messages Dec 12, 2017 – Dec 18, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: arch-meson: fix writel arguments order

From: Hans Verkuil <[email protected]>

Using writel causes a "Synchronous Abort". Invert the arguments.

---
 arch/arm/mach-meson/eth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Thanks Hans for finding this stupid error !

Neil

arch/arm/mach-meson/eth.c +2 -2
index 2debe93..8c6577b 100644
@@ -38,8 +38,8 @@ void meson_gx_eth_init(phy_interface_t mode, unsigned int flags)
 		/* Use GXL RMII Internal PHY */
 		if (IS_ENABLED(CONFIG_MESON_GXL) &&
 		    (flags & MESON_GXL_USE_INTERNAL_RMII_PHY)) {
-			writel(GXBB_ETH_REG_2, 0x10110181);
-			writel(GXBB_ETH_REG_3, 0xe40908ff);
+			writel(0x10110181, GXBB_ETH_REG_2);
+			writel(0xe40908ff, GXBB_ETH_REG_3);
 		}
 
 		break;
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 ARM: arch-meson: fix writel arguments order

Quoted 20 lines · Neil Armstrong

From: Hans Verkuil <[email protected]>

Using writel causes a "Synchronous Abort". Invert the arguments.

---
 arch/arm/mach-meson/eth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Thanks Hans for finding this stupid error !

Neil

arch/arm/mach-meson/eth.c +0 -0
index 2debe93..8c6577b 100644

arch/arm/mach-meson/eth.c void meson_gx_eth_init(phy_interface_t mode, unsigned int flags) · line 45

Quoted 10 lines
arch/arm/mach-meson/eth.c +2 -2
@@ -38,8 +38,8 @@ void meson_gx_eth_init(phy_interface_t mode, unsigned int flags)
 		/* Use GXL RMII Internal PHY */
 		if (IS_ENABLED(CONFIG_MESON_GXL) &&
 		    (flags & MESON_GXL_USE_INTERNAL_RMII_PHY)) {
-			writel(GXBB_ETH_REG_2, 0x10110181);
-			writel(GXBB_ETH_REG_3, 0xe40908ff);
+			writel(0x10110181, GXBB_ETH_REG_2);
+			writel(0xe40908ff, GXBB_ETH_REG_3);
 		}
 
 		break;

Hi Tom,

Can this be merged ?
This error breaks boot on 3 boards.

Thanks,
Neil

#2 lore raw
In reply to Neil Armstrong
Quoted 6 lines · Neil Armstrong

From: Hans Verkuil <[email protected]>

Using writel causes a "Synchronous Abort". Invert the arguments.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20171218/95339b2f/attachment.sig>