[OpenWrt-Devel] [PATCH 1/2] ar71xx: rework patch for qca953x/956x

Pan, Miaoqing miaoqing at qti.qualcomm.com
Fri Jul 3 01:44:21 EDT 2015


Thanks,  go ahead with the updated version.  My  patch base on git://git.openwrt.org/openwrt.git. 

For WMAC IRQ number fix, WMAC(47) and GMAC(46) share the IP2 IRQ,  so from the fist look, there is no effect without this fix.  But it will cause IRQ storm.  

Miaoqing

-----Original Message-----
From: Matthias Schiffer [mailto:mschiffer at universe-factory.net] 
Sent: Friday, July 03, 2015 5:10 AM
To: Pan, Miaoqing
Cc: openwrt-devel at lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH 1/2] ar71xx: rework patch for qca953x/956x

On 07/02/2015 08:49 AM, miaoqing at qti.qualcomm.com wrote:
> From: Miaoqing Pan <miaoqing at codeaurora.org>
> 
> Patch cherry-picked from the following location:
> https://www.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?h
> =release/coconut_ioe4531_2.0&id=5c357bf6c763e4140dddcc9a3bc5f005525a9c
> 0e
> 
> Changelist,
>     - add more register defines
>     - add EHCI support
>     - fix GPIO pin count to 18
>     - fix chained irq disabled
>     - fix GMAC0/GMAC1 initial
>     - fix WMAC irq number to 47
>     - merge the changes of dev-eth.c from the patch to file.
> 
> Signed-off-by: Miaoqing Pan <miaoqing at codeaurora.org>
> ---
>  .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c   |  18 +-
>  ...07-MIPS-ath79-add-support-for-QCA953x-SoC.patch | 352 
> +++++++++++++++++----  ...35-MIPS-ath79-add-support-for-QCA956x-SoC.patch | 183 ++++-------
>  .../736-MIPS-ath79-fix-chained-irq-disable.patch   |  21 +-
>  4 files changed, 387 insertions(+), 187 deletions(-)

Hi,
which OpenWrt tree did you base your patch on? I had some trouble getting it to apply to the current OpenWrt trunk to test it... I've attached a fixed up version that applies cleanly.

I've noticed that this patch breaks the ethernet ports on the TP-LINK TL-WR841N v9 (which is based on the QCA9533 ver 1 rev 1). I've fixed it up using the following snippet, the Compex WPJ531 will probably need the same fix (it uses pretty much the same initialization code).

--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
@@ -109,12 +109,18 @@ static void __init tl_ap143_setup(void)
        ath79_register_mdio(0, 0x0);

        /* LAN */
+       ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
+       ath79_eth1_data.duplex = DUPLEX_FULL;
+       ath79_switch_data.phy_poll_mask |= BIT(4);
        ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
        ath79_register_eth(1);

        /* WAN */
        ath79_switch_data.phy4_mii_en = 1;
        ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+       ath79_eth0_data.duplex = DUPLEX_FULL;
+       ath79_eth0_data.speed = SPEED_100;
+       ath79_eth0_data.phy_mask = BIT(4);
        ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
        ath79_register_eth(0);


Do you want to pick up this change and submit it together with an updated version of your patchset, or should I submit it myself?

By the way, does the WMAC IRQ number fix have a noticable effect? WLAN was working fine on the TL-WR841N v9 both before and after your patch, so I'm wondering if it would be worth to backport it to my older
Barrier-Breaker- and Chaos-Calmer-based branches.

Apart from that, thanks for your patch!

Matthias
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list