ar71xx: rename fix-ar933x-reset patch
authorGabor Juhos <juhosg@openwrt.org>
Thu, 20 Dec 2012 14:13:16 +0000 (14:13 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Thu, 20 Dec 2012 14:13:16 +0000 (14:13 +0000)
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 34798

target/linux/ar71xx/patches-3.6/213-MIPS-ath79-fix-ar933x-wmac-reset.patch [new file with mode: 0644]
target/linux/ar71xx/patches-3.6/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch
target/linux/ar71xx/patches-3.6/522-MIPS-ath79-add-ath79_wmac_register_simple-helper.patch
target/linux/ar71xx/patches-3.6/523-MIPS-ath79-OTP-support.patch
target/linux/ar71xx/patches-3.6/524-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch
target/linux/ar71xx/patches-3.6/650-MIPS-ath79-fix-ar933x-reset.patch [deleted file]

diff --git a/target/linux/ar71xx/patches-3.6/213-MIPS-ath79-fix-ar933x-wmac-reset.patch b/target/linux/ar71xx/patches-3.6/213-MIPS-ath79-fix-ar933x-wmac-reset.patch
new file mode 100644 (file)
index 0000000..e0821a7
--- /dev/null
@@ -0,0 +1,31 @@
+--- a/arch/mips/ath79/dev-wmac.c
++++ b/arch/mips/ath79/dev-wmac.c
+@@ -62,10 +62,27 @@ static void __init ar913x_wmac_setup(voi
+ static int ar933x_wmac_reset(void)
+ {
++      int retries = 20;
++
+       ath79_device_reset_set(AR933X_RESET_WMAC);
+       ath79_device_reset_clear(AR933X_RESET_WMAC);
+-      return 0;
++      while (1) {
++              u32 bootstrap;
++
++              bootstrap = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
++              if ((bootstrap & AR933X_BOOTSTRAP_EEPBUSY) == 0)
++                      return 0;
++
++              if (retries-- == 0)
++                      break;
++
++              udelay(10000);
++              retries++;
++      }
++
++      pr_err("ar933x: WMAC reset timed out");
++      return -ETIMEDOUT;
+ }
+ static int ar933x_r1_get_wmac_revision(void)
index bab4f701d19a5969a2d49c7894f9460dfffd737d..de0db9a965b6aef2046b7651ed3991b3ec0aa2c8 100644 (file)
@@ -16,7 +16,7 @@
  static struct ath9k_platform_data ath79_wmac_data;
  
  static struct resource ath79_wmac_resources[] = {
-@@ -134,7 +136,7 @@ static void qca955x_wmac_setup(void)
+@@ -151,7 +153,7 @@ static void qca955x_wmac_setup(void)
                ath79_wmac_data.is_clk_25mhz = true;
  }
  
@@ -25,7 +25,7 @@
  {
        if (soc_is_ar913x())
                ar913x_wmac_setup();
-@@ -151,5 +153,10 @@ void __init ath79_register_wmac(u8 *cal_
+@@ -168,5 +170,10 @@ void __init ath79_register_wmac(u8 *cal_
                memcpy(ath79_wmac_data.eeprom_data, cal_data,
                       sizeof(ath79_wmac_data.eeprom_data));
  
index acf2a3fef6a324060e8c19d6d24eb026d5970867..74309b631f3151d3310e5b1601896378ee2eadbd 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/dev-wmac.c
 +++ b/arch/mips/ath79/dev-wmac.c
-@@ -163,3 +163,9 @@ void __init ath79_register_wmac(u8 *cal_
+@@ -180,3 +180,9 @@ void __init ath79_register_wmac(u8 *cal_
  
        platform_device_register(&ath79_wmac_device);
  }
index 5f7fd21008e36c01be9bf98acb7779d35e875e9c..556a95175b8e9be7c5c946f900d5cc3d636cfeb1 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/dev-wmac.c
 +++ b/arch/mips/ath79/dev-wmac.c
-@@ -139,6 +139,137 @@ static void qca955x_wmac_setup(void)
+@@ -156,6 +156,137 @@ static void qca955x_wmac_setup(void)
                ath79_wmac_data.is_clk_25mhz = true;
  }
  
index bada5a8976dd6ecfcba2ec8b9771f7ede0203cc3..8c6fd408fa3bedb167d84c1b202581573a4ca5e1 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/dev-wmac.c
 +++ b/arch/mips/ath79/dev-wmac.c
-@@ -270,6 +270,16 @@ bool __init ar93xx_wmac_read_mac_address
+@@ -287,6 +287,16 @@ bool __init ar93xx_wmac_read_mac_address
        return ret;
  }
  
diff --git a/target/linux/ar71xx/patches-3.6/650-MIPS-ath79-fix-ar933x-reset.patch b/target/linux/ar71xx/patches-3.6/650-MIPS-ath79-fix-ar933x-reset.patch
deleted file mode 100644 (file)
index a81d6ea..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/arch/mips/ath79/dev-wmac.c
-+++ b/arch/mips/ath79/dev-wmac.c
-@@ -67,10 +67,27 @@ static void __init ar913x_wmac_setup(voi
- static int ar933x_wmac_reset(void)
- {
-+      int retries = 20;
-+
-       ath79_device_reset_set(AR933X_RESET_WMAC);
-       ath79_device_reset_clear(AR933X_RESET_WMAC);
--      return 0;
-+      while (1) {
-+              u32 bootstrap;
-+
-+              bootstrap = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
-+              if ((bootstrap & AR933X_BOOTSTRAP_EEPBUSY) == 0)
-+                      return 0;
-+
-+              if (retries-- == 0)
-+                      break;
-+
-+              udelay(10000);
-+              retries++;
-+      }
-+
-+      pr_err("ar933x: WMAC reset timed out");
-+      return -ETIMEDOUT;
- }
- static int ar933x_r1_get_wmac_revision(void)