summaryrefslogtreecommitdiff
path: root/include/tsec.h
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-09-29 18:04:36 +0300
committerRamon Fried <rfried.dev@gmail.com>2021-11-23 10:57:55 +0300
commit9dcb810b88cbf1d0f1961e0607644b3d3db9b135 (patch)
treec1755eed934e0fa6d8fcaa9599293942d959c456 /include/tsec.h
parent4a4e52f05f4e198ea1791e5a13468d5a7f1714b3 (diff)
downloadu-boot-9dcb810b88cbf1d0f1961e0607644b3d3db9b135.tar.xz
net: tsec: add support for promiscuous mode
The Freescale TSEC can be a DSA master, and the ports of the attached DSA switch can have different MAC addresses compared to the TSEC. Nonetheless, the TSEC must receive the packets on behalf of those switch ports. Therefore, implement the promiscuous mode method to allow DSA to set this. Note that the init_registers() function called from eth_ops :: start overwrites this setting. There is no reason why the RCTRL register should be zero-initialized, so just stop clearing it so that the setting we applied in eth_ops :: set_promisc sticks. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'include/tsec.h')
-rw-r--r--include/tsec.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/tsec.h b/include/tsec.h
index c301c28d3d..72f34851ad 100644
--- a/include/tsec.h
+++ b/include/tsec.h
@@ -122,6 +122,8 @@
#define ECNTRL_REDUCED_MII_MODE 0x00000004
#define ECNTRL_SGMII_MODE 0x00000002
+#define RCTRL_PROM 0x00000008
+
#ifndef CONFIG_SYS_TBIPA_VALUE
# define CONFIG_SYS_TBIPA_VALUE 0x1f
#endif