diff options
author | John Crispin <john@phrozen.org> | 2016-12-25 20:11:34 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-08-05 08:46:36 +0200 |
commit | 74d00a8c3849c1340efd713eb94b786e304c201f (patch) | |
tree | de481743de61c34da96ab5f9dba3af3edcfb8260 /target/linux/generic/backport-4.9/075-v4.10-0003-net-phy-broadcom-add-bcm54xx_auxctl_read.patch | |
parent | de350550ef648d9728351b986b0516fa29465c45 (diff) | |
download | mtk-20170518-74d00a8c3849c1340efd713eb94b786e304c201f.zip mtk-20170518-74d00a8c3849c1340efd713eb94b786e304c201f.tar.gz mtk-20170518-74d00a8c3849c1340efd713eb94b786e304c201f.tar.bz2 |
kernel: split patches folder up into backport, pending and hack folders
* properly format/comment all patches
* merge debloat patches
* merge Kconfig patches
* merge swconfig patches
* merge hotplug patches
* drop 200-fix_localversion.patch - upstream
* drop 222-arm_zimage_none.patch - unused
* drop 252-mv_cesa_depends.patch - no longer required
* drop 410-mtd-move-forward-declaration-of-struct-mtd_info.patch - unused
* drop 661-fq_codel_keep_dropped_stats.patch - outdated
* drop 702-phy_add_aneg_done_function.patch - upstream
* drop 840-rtc7301.patch - unused
* drop 841-rtc_pt7c4338.patch - upstream
* drop 921-use_preinit_as_init.patch - unused
* drop spio-gpio-old and gpio-mmc - unused
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/generic/backport-4.9/075-v4.10-0003-net-phy-broadcom-add-bcm54xx_auxctl_read.patch')
-rw-r--r-- | target/linux/generic/backport-4.9/075-v4.10-0003-net-phy-broadcom-add-bcm54xx_auxctl_read.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/generic/backport-4.9/075-v4.10-0003-net-phy-broadcom-add-bcm54xx_auxctl_read.patch b/target/linux/generic/backport-4.9/075-v4.10-0003-net-phy-broadcom-add-bcm54xx_auxctl_read.patch new file mode 100644 index 0000000..c9b3b59 --- /dev/null +++ b/target/linux/generic/backport-4.9/075-v4.10-0003-net-phy-broadcom-add-bcm54xx_auxctl_read.patch @@ -0,0 +1,41 @@ +From: Jon Mason <jon.mason@broadcom.com> +Date: Fri, 4 Nov 2016 01:10:56 -0400 +Subject: [PATCH] net: phy: broadcom: add bcm54xx_auxctl_read + +Add a helper function to read the AUXCTL register for the BCM54xx. This +mirrors the bcm54xx_auxctl_write function already present in the code. + +Signed-off-by: Jon Mason <jon.mason@broadcom.com> +Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + +--- a/drivers/net/phy/broadcom.c ++++ b/drivers/net/phy/broadcom.c +@@ -30,6 +30,16 @@ MODULE_DESCRIPTION("Broadcom PHY driver" + MODULE_AUTHOR("Maciej W. Rozycki"); + MODULE_LICENSE("GPL"); + ++static int bcm54xx_auxctl_read(struct phy_device *phydev, u16 regnum) ++{ ++ /* The register must be written to both the Shadow Register Select and ++ * the Shadow Read Register Selector ++ */ ++ phy_write(phydev, MII_BCM54XX_AUX_CTL, regnum | ++ regnum << MII_BCM54XX_AUXCTL_SHDWSEL_READ_SHIFT); ++ return phy_read(phydev, MII_BCM54XX_AUX_CTL); ++} ++ + static int bcm54xx_auxctl_write(struct phy_device *phydev, u16 regnum, u16 val) + { + return phy_write(phydev, MII_BCM54XX_AUX_CTL, regnum | val); +--- a/include/linux/brcmphy.h ++++ b/include/linux/brcmphy.h +@@ -110,6 +110,7 @@ + #define MII_BCM54XX_AUXCTL_MISC_FORCE_AMDIX 0x0200 + #define MII_BCM54XX_AUXCTL_MISC_RDSEL_MISC 0x7000 + #define MII_BCM54XX_AUXCTL_SHDWSEL_MISC 0x0007 ++#define MII_BCM54XX_AUXCTL_SHDWSEL_READ_SHIFT 12 + + #define MII_BCM54XX_AUXCTL_SHDWSEL_MASK 0x0007 + |