kernel: update kernel 4.4 to 4.4.74
[librecmc/librecmc.git] / target / linux / ar71xx / patches-4.4 / 523-MIPS-ath79-OTP-support.patch
index 6778183f78d628f526f56c6a07ca9f5f4f53ee36..d11d418f172f8a351a1b3569ba1a9c5cf70ca604 100644 (file)
@@ -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;
  }
  
 +
 +      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)