for mdio-device probing we still need to read chip id but ar8xxx_chip
can be determined using drvdata. We can't distinguish the buggy
standalone ar8216 and the builtin ar8216 in ar724x/ar933x using chip
id.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
};
static int
-ar8xxx_id_chip(struct ar8xxx_priv *priv)
+ar8xxx_read_id(struct ar8xxx_priv *priv)
{
u32 val;
u16 id;
priv->chip_ver = (id & AR8216_CTRL_VERSION) >> AR8216_CTRL_VERSION_S;
priv->chip_rev = (id & AR8216_CTRL_REVISION);
+ return 0;
+}
+
+static int
+ar8xxx_id_chip(struct ar8xxx_priv *priv)
+{
+ int ret;
+
+ ret = ar8xxx_read_id(priv);
+ if(ret)
+ return ret;
switch (priv->chip_ver) {
case AR8XXX_VER_AR8216: