summaryrefslogtreecommitdiff
path: root/include/soc
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2019-11-28 15:36:10 +0200
committerDong Aisheng <aisheng.dong@nxp.com>2019-12-02 18:04:51 +0800
commitf3ebad1269aad8a04710e84dc1cd5de485e5fec4 (patch)
tree6773e7fcbb19bf513e290e913cf96504d937cda2 /include/soc
parent9dc338323fad18f18653d43e5e0d0a84a2355704 (diff)
net: mscc: ocelot: do not force Felix MACs at lower speeds than gigabit
In the LS1028A, the VSC9959 switch was integrated with an NXP PCS which performs SGMII AN and rate adaptation autonomously. The MAC does not need to know about this, and forcing the MAC speed to something else, when connected to a 10/100 link partner, actually breaks the GMII internal link between the MAC and the PCS. Add a quirk system in the ocelot driver, and a first quirk called "PCS performs rate adaptation", to distinguish the VSC7514 from the VSC9959 regarding this behavior. Signed-off-by: Catalin Horghidan <catalin.horghidan@nxp.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/mscc/ocelot.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index ad0843a0edfd..c64cf12d1569 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -404,6 +404,11 @@ enum ocelot_tag_prefix {
OCELOT_TAG_PREFIX_LONG,
};
+/* Hardware quirks (differences between switch instantiations) */
+enum {
+ OCELOT_PCS_PERFORMS_RATE_ADAPTATION = BIT(0),
+};
+
struct ocelot;
struct ocelot_ops {
@@ -464,6 +469,8 @@ struct ocelot {
struct delayed_work stats_work;
struct workqueue_struct *stats_queue;
+ unsigned long quirks;
+
u8 ptp:1;
struct ptp_clock *ptp_clock;
struct ptp_clock_info ptp_info;