aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-12-01 16:14:32 +0000
committerJohn Crispin <blogic@openwrt.org>2014-12-01 16:14:32 +0000
commit5a3c2d9aa70ff08963dc866ccde9c4f765b6c12a (patch)
tree29d8a8f8131665155f8086cc5f1cea7e86bff383 /target
parenta425f991ec1f812a7a27817c8a6de7f532fac6e0 (diff)
downloadmaster-187ad058-5a3c2d9aa70ff08963dc866ccde9c4f765b6c12a.tar.gz
master-187ad058-5a3c2d9aa70ff08963dc866ccde9c4f765b6c12a.tar.bz2
master-187ad058-5a3c2d9aa70ff08963dc866ccde9c4f765b6c12a.zip
ar8216: factor out info whether switch should be configured at probe stage to ar8xxx_chip
Factor out info whether switch should be configured at probe stage to ar8xxx_chip. Remove related chip_is_... checks. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43466 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index a4e2260e45..028b98fc40 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -70,6 +70,7 @@ struct ar8xxx_mib_desc {
struct ar8xxx_chip {
unsigned long caps;
+ bool config_at_probe;
int (*hw_init)(struct ar8xxx_priv *priv);
void (*cleanup)(struct ar8xxx_priv *priv);
@@ -1821,6 +1822,7 @@ ar8327_setup_port(struct ar8xxx_priv *priv, int port, u32 members)
static const struct ar8xxx_chip ar8327_chip = {
.caps = AR8XXX_CAP_GIGE | AR8XXX_CAP_MIB_COUNTERS,
+ .config_at_probe = true,
.hw_init = ar8327_hw_init,
.cleanup = ar8327_cleanup,
.init_globals = ar8327_init_globals,
@@ -2797,7 +2799,7 @@ ar8xxx_phy_config_init(struct phy_device *phydev)
if (WARN_ON(!priv))
return -ENODEV;
- if (chip_is_ar8327(priv) || chip_is_ar8337(priv))
+ if (priv->chip->config_at_probe)
return ar8xxx_phy_check_aneg(phydev);
priv->phy = phydev;
@@ -2973,7 +2975,7 @@ found:
phydev->advertising = ADVERTISED_100baseT_Full;
}
- if (chip_is_ar8327(priv) || chip_is_ar8337(priv)) {
+ if (priv->chip->config_at_probe) {
priv->phy = phydev;
ret = ar8xxx_start(priv);