net: tsec: export tsec_info
PATCH 4/5 net: tsec: export tsec_info
We'll need the exported tsec_info to fix up the phy addresses and tsecs' flags based on the hardware reset configuration words. Thus we'll use the tsec_info very early and just once at boot time, so network code won't notice it.
--- drivers/net/tsec.c | 2 +- include/tsec.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/tsec.c +1 -1
@@ -72,7 +72,7 @@ static int tsec_mcast_addr (struct eth_device *dev, u8 mcast_mac, u8 set);/* Default initializations for TSEC controllers. */ -static struct tsec_info_struct tsec_info[] = { +struct tsec_info_struct tsec_info[] = {#ifdef CONFIG_TSEC1 STD_TSEC_INFO(1), /* TSEC1 */#endif
include/tsec.h +2 -0
@@ -630,6 +630,8 @@ struct tsec_info_struct {u32 flags; }; +extern struct tsec_info_struct tsec_info[]; +int tsec_initialize (bd_t * bis,struct tsec_info_struct *tsec_info);int tsec_standard_init (bd_t *bis);int tsec_eth_init (bd_t *bis,struct tsec_info_struct *tsec_info,int num);
Signature · 1 line
1.5.6.3
PATCH 4/5 net: tsec: export tsec_info
Quoted 6 lines · Anton Vorontsov
We'll need the exported
tsec_infoto fix up the phy addresses and tsecs' flags based on the hardware reset configuration words. Thus we'll use thetsec_infovery early and just once at boot time, so network code won't notice it.Signed-off-by Anton Vorontsov <[email protected]>
Hm. The other boards that needed to change this structure just passed in a different structure. Modifying the default structure is not really the intended purpose of that structure. Instead, just use the macros to create your own structure, and then modify that.
Andy
PATCH 4/5 net: tsec: export tsec_info
Quoted 7 lines · Andy Fleming
Quoted 5 lines · Anton Vorontsov
We'll need the exported
tsec_infoto fix up the phy addresses and tsecs' flags based on the hardware reset configuration words. Thus we'll use thetsec_infovery early and just once at boot time, so network code won't notice it.
Quoted 7 lines
Quoted 1 line
Signed-off-by Anton Vorontsov <[email protected]>Hm. The other boards that needed to change this structure just passed in a different structure. Modifying the default structure is not really the intended purpose of that structure. Instead, just use the macros to create your own structure, and then modify that.
Ah, I see... I should implement board_eth_init(). (didn't know that it disables cpu_eth_init()).
Thanks for the hint.
Signature · 3 lines
Anton Vorontsov email: cbouatmailru at gmail.com irc://irc.freenode.net/bd2