ar71xx: rename fix-ar933x-reset patch
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 20 Dec 2012 14:13:16 +0000 (14:13 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 20 Dec 2012 14:13:16 +0000 (14:13 +0000)
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34798 3c298f89-4303-0410-b956-a3cf2f4a3e73

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 bab4f70..de0db9a 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 acf2a3f..74309b6 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 5f7fd21..556a951 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 bada5a8..8c6fd40 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)