summaryrefslogtreecommitdiff
path: root/include/tsec.h
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2016-01-11 22:41:24 -0800
committerJoe Hershberger <joe.hershberger@ni.com>2016-01-28 12:23:15 -0600
commit9a1d6af55ecd73938d49076422e87da9f87fc68f (patch)
tree5c7dd333cc44aee28b6faf672f4b61a99f4d7461 /include/tsec.h
parent69a00875e3db178cfcb19ea8ab97c8927a11e593 (diff)
net: tsec: Add driver model ethernet support
This adds driver model support to Freescale TSEC ethernet driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include/tsec.h')
-rw-r--r--include/tsec.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/tsec.h b/include/tsec.h
index e8b03d64f52..88ce964fd91 100644
--- a/include/tsec.h
+++ b/include/tsec.h
@@ -18,6 +18,8 @@
#include <config.h>
#include <phy.h>
+#ifndef CONFIG_DM_ETH
+
#ifdef CONFIG_LS102XA
#define TSEC_SIZE 0x40000
#define TSEC_MDIO_OFFSET 0x40000
@@ -64,6 +66,8 @@
x.mii_devname = DEFAULT_MII_NAME;\
}
+#endif /* CONFIG_DM_ETH */
+
#define MAC_ADDR_LEN 6
/* #define TSEC_TIMEOUT 1000000 */
@@ -402,7 +406,11 @@ struct tsec_private {
u32 flags;
uint rx_idx; /* index of the current RX buffer */
uint tx_idx; /* index of the current TX buffer */
+#ifndef CONFIG_DM_ETH
struct eth_device *dev;
+#else
+ struct udevice *dev;
+#endif
};
struct tsec_info_struct {
@@ -415,7 +423,9 @@ struct tsec_info_struct {
u32 flags;
};
+#ifndef CONFIG_DM_ETH
int tsec_standard_init(bd_t *bis);
int tsec_eth_init(bd_t *bis, struct tsec_info_struct *tsec_info, int num);
+#endif
#endif /* __TSEC_H */