summaryrefslogtreecommitdiff
path: root/drivers/net/mscc_eswitch/mscc_mac_table.h
diff options
context:
space:
mode:
authorHoratiu Vultur <horatiu.vultur@microchip.com>2019-01-31 17:30:36 +0300
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2019-02-01 16:13:36 +0300
commit45f2748c50c676db2374c7d0a526b70db5ed86f7 (patch)
treefd311907db2c40e3db16f8a667bc9825989c8f90 /drivers/net/mscc_eswitch/mscc_mac_table.h
parent36d04f52ff3e832862a25bf474f0224e995b6ca1 (diff)
downloadu-boot-45f2748c50c676db2374c7d0a526b70db5ed86f7.tar.xz
net: mscc: Move mac_table_add function into different file.
Move the function mac_table_add into a different file, so it can be reused. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Diffstat (limited to 'drivers/net/mscc_eswitch/mscc_mac_table.h')
-rw-r--r--drivers/net/mscc_eswitch/mscc_mac_table.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/mscc_eswitch/mscc_mac_table.h b/drivers/net/mscc_eswitch/mscc_mac_table.h
new file mode 100644
index 0000000000..17fed2e792
--- /dev/null
+++ b/drivers/net/mscc_eswitch/mscc_mac_table.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
+/*
+ * Copyright (c) 2018 Microsemi Corporation
+ */
+
+#include <common.h>
+
+#define ETH_LEN 6
+#define MAC_VID 1
+
+enum mscc_regs_ana_table {
+ MSCC_ANA_TABLES_MACHDATA,
+ MSCC_ANA_TABLES_MACLDATA,
+ MSCC_ANA_TABLES_MACACCESS,
+};
+
+int mscc_mac_table_add(void __iomem *regs,
+ const unsigned long *mscc_mac_table_offset,
+ const unsigned char mac[ETH_LEN], int pgid);