summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/sja1105/sja1105_static_config.h
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-05-24 16:14:17 +0300
committerDavid S. Miller <davem@davemloft.net>2021-05-24 13:59:03 -0700
commitc50376783f23ffd2dd8833c2069e52ba08e82917 (patch)
tree0128b89985c807a0ca949b9d8840dbed17158c7f /drivers/net/dsa/sja1105/sja1105_static_config.h
parentdf2a81a35ebb507d8d614d993d3b55425d73ffee (diff)
net: dsa: sja1105: skip CGU configuration if it's unnecessary
There are two distinct code paths which enter sja1105_clocking.c, one through sja1105_clocking_setup() and the other through sja1105_clocking_setup_port(): sja1105_static_config_reload sja1105_setup | | | +------------------+ | | v v sja1105_clocking_setup sja1105_adjust_port_config | | v | sja1105_clocking_setup_port <------------------+ As opposed to SJA1105, the SJA1110 does not need any configuration of the Clock Generation Unit in order for xMII ports to work. Just RGMII internal delays need to be configured, and that is done inside sja1105_clocking_setup_port for the RGMII ports. So this patch introduces the concept of a "reserved address", which the CGU configuration functions from sja1105_clocking.c must check before proceeding to do anything. The SJA1110 will have reserved addresses for the CGU PLLs for MII/RMII/RGMII. Additionally, make sja1105_clocking_setup() a function pointer so it can be overridden by the SJA1110. Even though nothing port-related needs to be done in the CGU, there are some operations such as disabling the watchdog clock which are unique to the SJA1110. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_static_config.h')
-rw-r--r--drivers/net/dsa/sja1105/sja1105_static_config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_static_config.h b/drivers/net/dsa/sja1105/sja1105_static_config.h
index 779eb6840f05..9bc783a2bbea 100644
--- a/drivers/net/dsa/sja1105/sja1105_static_config.h
+++ b/drivers/net/dsa/sja1105/sja1105_static_config.h
@@ -129,6 +129,8 @@ enum sja1105_blk_idx {
#define SJA1105R_PART_NO 0x9A86
#define SJA1105S_PART_NO 0x9A87
+#define SJA1105_RSV_ADDR 0xffffffffffffffffull
+
struct sja1105_schedule_entry {
u64 winstindex;
u64 winend;