Skip to contentSkip to conversation

net: tsec: export tsec_info

PATCH Superseded Anton Vorontsov 2 participants 3 messages Sep 30, 2008 Network drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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
index 8ab6d07..1bca1b4 100644
@@ -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
index f7e5857..191bf1b 100644
@@ -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
#1 lore raw

PATCH 4/5 net: tsec: export tsec_info

Quoted 6 lines · Anton Vorontsov

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.

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

#2 lore raw

PATCH 4/5 net: tsec: export tsec_info

Quoted 7 lines · Andy Fleming
Quoted 5 lines · Anton Vorontsov

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.

Quoted 7 lines
Quoted 1 line

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