From: Gabor Juhos Date: Thu, 20 Dec 2012 14:13:16 +0000 (+0000) Subject: ar71xx: rename fix-ar933x-reset patch X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e108cb91c092144cab7db0396023926a0aa7473c;p=openwrt%2Fstaging%2Faparcar.git ar71xx: rename fix-ar933x-reset patch Signed-off-by: Gabor Juhos SVN-Revision: 34798 --- 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 index 0000000000..e0821a7776 --- /dev/null +++ b/target/linux/ar71xx/patches-3.6/213-MIPS-ath79-fix-ar933x-wmac-reset.patch @@ -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) diff --git a/target/linux/ar71xx/patches-3.6/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch b/target/linux/ar71xx/patches-3.6/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch index bab4f701d1..de0db9a965 100644 --- a/target/linux/ar71xx/patches-3.6/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch +++ b/target/linux/ar71xx/patches-3.6/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch @@ -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)); diff --git a/target/linux/ar71xx/patches-3.6/522-MIPS-ath79-add-ath79_wmac_register_simple-helper.patch b/target/linux/ar71xx/patches-3.6/522-MIPS-ath79-add-ath79_wmac_register_simple-helper.patch index acf2a3fef6..74309b631f 100644 --- a/target/linux/ar71xx/patches-3.6/522-MIPS-ath79-add-ath79_wmac_register_simple-helper.patch +++ b/target/linux/ar71xx/patches-3.6/522-MIPS-ath79-add-ath79_wmac_register_simple-helper.patch @@ -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); } diff --git a/target/linux/ar71xx/patches-3.6/523-MIPS-ath79-OTP-support.patch b/target/linux/ar71xx/patches-3.6/523-MIPS-ath79-OTP-support.patch index 5f7fd21008..556a95175b 100644 --- a/target/linux/ar71xx/patches-3.6/523-MIPS-ath79-OTP-support.patch +++ b/target/linux/ar71xx/patches-3.6/523-MIPS-ath79-OTP-support.patch @@ -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; } diff --git a/target/linux/ar71xx/patches-3.6/524-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch b/target/linux/ar71xx/patches-3.6/524-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch index bada5a8976..8c6fd408fa 100644 --- a/target/linux/ar71xx/patches-3.6/524-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch +++ b/target/linux/ar71xx/patches-3.6/524-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch @@ -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 index a81d6ea6e0..0000000000 --- a/target/linux/ar71xx/patches-3.6/650-MIPS-ath79-fix-ar933x-reset.patch +++ /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)