[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200918105753.3473725-5-olteanv@gmail.com>
Date: Fri, 18 Sep 2020 13:57:46 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: davem@...emloft.net, netdev@...r.kernel.org
Cc: yangbo.lu@....com, xiaoliang.yang_1@....com,
UNGLinuxDriver@...rochip.com, claudiu.manoil@....com,
alexandre.belloni@...tlin.com, andrew@...n.ch,
vivien.didelot@...il.com, f.fainelli@...il.com, kuba@...nel.org
Subject: [PATCH net-next 04/11] net: dsa: ocelot: document why reset procedure is different for felix/seville
From: Vladimir Oltean <vladimir.oltean@....com>
The overall idea (issue soft reset, enable memories, initialize
memories, enable core) is the same, so it would make sense that an
attempt is made to unify the procedures.
It is not immediately obvious that the fields are not part of the same
register targets, though. So add a comment.
Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
---
drivers/net/dsa/ocelot/felix_vsc9959.c | 3 +++
drivers/net/dsa/ocelot/seville_vsc9953.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index 397d24c9f7c2..6f6e4ef299c3 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -737,6 +737,9 @@ static int vsc9959_sys_ram_init_status(struct ocelot *ocelot)
return ocelot_read(ocelot, SYS_RAM_INIT);
}
+/* CORE_ENA is in SYS:SYSTEM:RESET_CFG
+ * RAM_INIT is in SYS:RAM_CTRL:RAM_INIT
+ */
static int vsc9959_reset(struct ocelot *ocelot)
{
int val, err;
diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c
index a1f25f5e0efc..dfc9a1b2a504 100644
--- a/drivers/net/dsa/ocelot/seville_vsc9953.c
+++ b/drivers/net/dsa/ocelot/seville_vsc9953.c
@@ -820,6 +820,10 @@ static int vsc9953_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
return err;
}
+/* CORE_ENA is in SYS:SYSTEM:RESET_CFG
+ * MEM_INIT is in SYS:SYSTEM:RESET_CFG
+ * MEM_ENA is in SYS:SYSTEM:RESET_CFG
+ */
static int vsc9953_reset(struct ocelot *ocelot)
{
int val, err;
--
2.25.1
Powered by blists - more mailing lists