diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-11-20 15:19:15 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-11-20 15:19:15 +0000 |
commit | fa4d51cf7d1129816c0cf9ebbbc104d7c9de7ad9 (patch) | |
tree | b6c2fcc04cd99bb4de5258a980f2a15703a0026b /target/linux/generic/files/drivers | |
parent | ce4ea24f812a231b471f2b6a1bb5d7d7eface36f (diff) | |
download | upstream-fa4d51cf7d1129816c0cf9ebbbc104d7c9de7ad9.tar.gz upstream-fa4d51cf7d1129816c0cf9ebbbc104d7c9de7ad9.tar.bz2 upstream-fa4d51cf7d1129816c0cf9ebbbc104d7c9de7ad9.zip |
ar8216: Use generic hw_init from ar8236 for ar8216 too
We should make sure that also for ar8216 hw gets initialized.
For ar8216 hw_init is a dummy currently. The hw_init used for ar8236
should be generic enough to be usable with ar8216 too.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43334 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index d871cf3413..1d58f3a5d7 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -814,6 +814,12 @@ ar8216_setup_port(struct ar8xxx_priv *priv, int port, u32 members) static int ar8216_hw_init(struct ar8xxx_priv *priv) { + if (priv->initialized) + return 0; + + ar8xxx_phy_init(priv); + + priv->initialized = true; return 0; } @@ -907,18 +913,6 @@ ar8236_setup_port(struct ar8xxx_priv *priv, int port, u32 members) (members << AR8236_PORT_VLAN2_MEMBER_S)); } -static int -ar8236_hw_init(struct ar8xxx_priv *priv) -{ - if (priv->initialized) - return 0; - - ar8xxx_phy_init(priv); - - priv->initialized = true; - return 0; -} - static void ar8236_init_globals(struct ar8xxx_priv *priv) { @@ -934,7 +928,7 @@ ar8236_init_globals(struct ar8xxx_priv *priv) static const struct ar8xxx_chip ar8236_chip = { .caps = AR8XXX_CAP_MIB_COUNTERS, - .hw_init = ar8236_hw_init, + .hw_init = ar8216_hw_init, .init_globals = ar8236_init_globals, .init_port = ar8216_init_port, .setup_port = ar8236_setup_port, |