projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '2020-06-15-misc-bugfixes'
[oweals/u-boot.git]
/
include
/
tsec.h
diff --git
a/include/tsec.h
b/include/tsec.h
index e8b03d64f521456c1a5a06366e89819c2e70d994..b17fa957df5b4bc3e2f8bbfddf83bcd98501538d 100644
(file)
--- a/
include/tsec.h
+++ b/
include/tsec.h
@@
-1,3
+1,4
@@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* tsec.h
*
/*
* tsec.h
*
@@
-7,8
+8,6
@@
* (C) Copyright 2003, Motorola, Inc.
* maintained by Xianghua Xiao (x.xiao@motorola.com)
* author Andy Fleming
* (C) Copyright 2003, Motorola, Inc.
* maintained by Xianghua Xiao (x.xiao@motorola.com)
* author Andy Fleming
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __TSEC_H
*/
#ifndef __TSEC_H
@@
-18,7
+17,11
@@
#include <config.h>
#include <phy.h>
#include <config.h>
#include <phy.h>
-#ifdef CONFIG_LS102XA
+#define TSEC_MDIO_REGS_OFFSET 0x520
+
+#ifndef CONFIG_DM_ETH
+
+#ifdef CONFIG_ARCH_LS1021A
#define TSEC_SIZE 0x40000
#define TSEC_MDIO_OFFSET 0x40000
#else
#define TSEC_SIZE 0x40000
#define TSEC_MDIO_OFFSET 0x40000
#else
@@
-26,7
+29,7
@@
#define TSEC_MDIO_OFFSET 0x01000
#endif
#define TSEC_MDIO_OFFSET 0x01000
#endif
-#define CONFIG_SYS_MDIO_BASE_ADDR (MDIO_BASE_ADDR +
0x520
)
+#define CONFIG_SYS_MDIO_BASE_ADDR (MDIO_BASE_ADDR +
TSEC_MDIO_REGS_OFFSET
)
#define TSEC_GET_REGS(num, offset) \
(struct tsec __iomem *)\
#define TSEC_GET_REGS(num, offset) \
(struct tsec __iomem *)\
@@
-64,6
+67,8
@@
x.mii_devname = DEFAULT_MII_NAME;\
}
x.mii_devname = DEFAULT_MII_NAME;\
}
+#endif /* CONFIG_DM_ETH */
+
#define MAC_ADDR_LEN 6
/* #define TSEC_TIMEOUT 1000000 */
#define MAC_ADDR_LEN 6
/* #define TSEC_TIMEOUT 1000000 */
@@
-398,11
+403,16
@@
struct tsec_private {
phy_interface_t interface;
struct mii_dev *bus;
uint phyaddr;
phy_interface_t interface;
struct mii_dev *bus;
uint phyaddr;
+ uint tbiaddr;
char mii_devname[16];
u32 flags;
uint rx_idx; /* index of the current RX buffer */
uint tx_idx; /* index of the current TX buffer */
char mii_devname[16];
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;
struct eth_device *dev;
+#else
+ struct udevice *dev;
+#endif
};
struct tsec_info_struct {
};
struct tsec_info_struct {
@@
-415,7
+425,9
@@
struct tsec_info_struct {
u32 flags;
};
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);
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 */
#endif /* __TSEC_H */