X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Fpatches-4.4%2F523-MIPS-ath79-OTP-support.patch;h=d11d418f172f8a351a1b3569ba1a9c5cf70ca604;hb=f80963d4d18d67c3190d40b7eadaa0e427ccbf7b;hp=6778183f78d628f526f56c6a07ca9f5f4f53ee36;hpb=837285b83221963739cda81911d8004f30f9afb0;p=librecmc%2Flibrecmc.git diff --git a/target/linux/ar71xx/patches-4.4/523-MIPS-ath79-OTP-support.patch b/target/linux/ar71xx/patches-4.4/523-MIPS-ath79-OTP-support.patch index 6778183f78..d11d418f17 100644 --- a/target/linux/ar71xx/patches-4.4/523-MIPS-ath79-OTP-support.patch +++ b/target/linux/ar71xx/patches-4.4/523-MIPS-ath79-OTP-support.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/dev-wmac.c +++ b/arch/mips/ath79/dev-wmac.c -@@ -167,6 +167,149 @@ static void qca955x_wmac_setup(void) +@@ -166,6 +166,149 @@ static void qca955x_wmac_setup(void) ath79_wmac_data.is_clk_25mhz = true; } @@ -111,8 +111,8 @@ + + BUG_ON(!soc_is_ar933x() && !soc_is_ar934x()); + base = ioremap_nocache(AR93XX_WMAC_BASE, AR93XX_WMAC_SIZE); -+ while (addr > sizeof(hdr)) { -+ if (!ar93xx_wmac_otp_read(base, addr, hdr, sizeof(hdr))) ++ while (addr > sizeof(hdr_u32)) { ++ if (!ar93xx_wmac_otp_read(base, addr, hdr, sizeof(hdr_u32))) + break; + + if (hdr_u32 == 0 || hdr_u32 == ~0)