diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2017-01-31 21:00:51 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2017-01-31 22:04:08 +0100 |
commit | 7583de2e8fdc2fdcfb16dfd431590a4b4611bf52 (patch) | |
tree | 9e9906afb0a4531a2c0de72356d0b7c3cedd029a /target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch | |
parent | 4d10030c3ce822bc4e95aa134a5c61a7c34bc13f (diff) | |
download | upstream-7583de2e8fdc2fdcfb16dfd431590a4b4611bf52.tar.gz upstream-7583de2e8fdc2fdcfb16dfd431590a4b4611bf52.tar.bz2 upstream-7583de2e8fdc2fdcfb16dfd431590a4b4611bf52.zip |
kernel: rename bgmac patches to squeeze them
This is a pure rename without any changes. It makes maintaining bgmac
simpler and will hopefully make adding new kernel a bit easier.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch')
-rw-r--r-- | target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch b/target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch deleted file mode 100644 index 0c007569fb..0000000000 --- a/target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 387b75f8b31437792e8334390fdf5cf060d1e3da Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> -Date: Tue, 2 Feb 2016 07:47:14 +0100 -Subject: [PATCH] bgmac: add helper checking for BCM4707 / BCM53018 chip id -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Chipsets with BCM4707 / BCM53018 ID require special handling at a few -places in the code. It's likely there will be more IDs to check in the -future. To simplify it add this trivial helper. - -Signed-off-by: Rafał Miłecki <zajec5@gmail.com> -Signed-off-by: David S. Miller <davem@davemloft.net> ---- - drivers/net/ethernet/broadcom/bgmac.c | 30 ++++++++++++++++-------------- - 1 file changed, 16 insertions(+), 14 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -26,6 +26,17 @@ static const struct bcma_device_id bgmac - }; - MODULE_DEVICE_TABLE(bcma, bgmac_bcma_tbl); - -+static inline bool bgmac_is_bcm4707_family(struct bgmac *bgmac) -+{ -+ switch (bgmac->core->bus->chipinfo.id) { -+ case BCMA_CHIP_ID_BCM4707: -+ case BCMA_CHIP_ID_BCM53018: -+ return true; -+ default: -+ return false; -+ } -+} -+ - static bool bgmac_wait_value(struct bcma_device *core, u16 reg, u32 mask, - u32 value, int timeout) - { -@@ -990,11 +1001,9 @@ static void bgmac_mac_speed(struct bgmac - static void bgmac_miiconfig(struct bgmac *bgmac) - { - struct bcma_device *core = bgmac->core; -- struct bcma_chipinfo *ci = &core->bus->chipinfo; - u8 imode; - -- if (ci->id == BCMA_CHIP_ID_BCM4707 || -- ci->id == BCMA_CHIP_ID_BCM53018) { -+ if (bgmac_is_bcm4707_family(bgmac)) { - bcma_awrite32(core, BCMA_IOCTL, - bcma_aread32(core, BCMA_IOCTL) | 0x40 | - BGMAC_BCMA_IOCTL_SW_CLKEN); -@@ -1058,9 +1067,7 @@ static void bgmac_chip_reset(struct bgma - } - - /* Request Misc PLL for corerev > 2 */ -- if (core->id.rev > 2 && -- ci->id != BCMA_CHIP_ID_BCM4707 && -- ci->id != BCMA_CHIP_ID_BCM53018) { -+ if (core->id.rev > 2 && !bgmac_is_bcm4707_family(bgmac)) { - bgmac_set(bgmac, BCMA_CLKCTLST, - BGMAC_BCMA_CLKCTLST_MISC_PLL_REQ); - bgmac_wait_value(bgmac->core, BCMA_CLKCTLST, -@@ -1196,8 +1203,7 @@ static void bgmac_enable(struct bgmac *b - break; - } - -- if (ci->id != BCMA_CHIP_ID_BCM4707 && -- ci->id != BCMA_CHIP_ID_BCM53018) { -+ if (!bgmac_is_bcm4707_family(bgmac)) { - rxq_ctl = bgmac_read(bgmac, BGMAC_RXQ_CTL); - rxq_ctl &= ~BGMAC_RXQ_CTL_MDP_MASK; - bp_clk = bcma_pmu_get_bus_clock(&bgmac->core->bus->drv_cc) / -@@ -1475,14 +1481,12 @@ static int bgmac_fixed_phy_register(stru - - static int bgmac_mii_register(struct bgmac *bgmac) - { -- struct bcma_chipinfo *ci = &bgmac->core->bus->chipinfo; - struct mii_bus *mii_bus; - struct phy_device *phy_dev; - char bus_id[MII_BUS_ID_SIZE + 3]; - int i, err = 0; - -- if (ci->id == BCMA_CHIP_ID_BCM4707 || -- ci->id == BCMA_CHIP_ID_BCM53018) -+ if (bgmac_is_bcm4707_family(bgmac)) - return bgmac_fixed_phy_register(bgmac); - - mii_bus = mdiobus_alloc(); -@@ -1553,7 +1557,6 @@ static void bgmac_mii_unregister(struct - /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */ - static int bgmac_probe(struct bcma_device *core) - { -- struct bcma_chipinfo *ci = &core->bus->chipinfo; - struct net_device *net_dev; - struct bgmac *bgmac; - struct ssb_sprom *sprom = &core->bus->sprom; -@@ -1634,8 +1637,7 @@ static int bgmac_probe(struct bcma_devic - bgmac_chip_reset(bgmac); - - /* For Northstar, we have to take all GMAC core out of reset */ -- if (ci->id == BCMA_CHIP_ID_BCM4707 || -- ci->id == BCMA_CHIP_ID_BCM53018) { -+ if (bgmac_is_bcm4707_family(bgmac)) { - struct bcma_device *ns_core; - int ns_gmac; - |