* [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH]
@ 2010-01-19 20:50 Michael Durrant
2010-01-20 18:33 ` [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] -- resent in git format Michael Durrant
0 siblings, 1 reply; 6+ messages in thread
From: Michael Durrant @ 2010-01-19 20:50 UTC (permalink / raw)
To: u-boot
Signed-off-by: David Wu <davidwu@arcturusnetworks.com>
Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
This patch set created against u-boot-2009.11 release
lib_m68k_board.patch
- eth_init() requires eth_current which is initialized in
eth_initialize()
so eth_initialize (bd) should be called first then eth_init(bd)
--
Michael Durrant
mdurrant at arcturusnetworks.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lib_m68k_board.patch
Type: application/octet-stream
Size: 574 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100119/cb53aa97/attachment.obj
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] -- resent in git format
2010-01-19 20:50 [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] Michael Durrant
@ 2010-01-20 18:33 ` Michael Durrant
2010-01-20 22:08 ` Ben Warren
0 siblings, 1 reply; 6+ messages in thread
From: Michael Durrant @ 2010-01-20 18:33 UTC (permalink / raw)
To: u-boot
lib_m68k_board.patch
- eth_init() requires eth_current which is initialized in
eth_initialize()
so eth_initialize (bd) should be called first then eth_init(bd)
Signed-off-by: David Wu <davidwu@arcturusnetworks.com>
Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
---
lib_m68k/board.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib_m68k/board.c b/lib_m68k/board.c
index 732023d..c17394b 100644
--- a/lib_m68k/board.c
+++ b/lib_m68k/board.c
@@ -639,13 +639,13 @@ void board_init_r (gd_t *id, ulong dest_
#endif
#if defined(CONFIG_CMD_NET)
WATCHDOG_RESET();
-#if defined(FEC_ENET)
- eth_init(bd);
-#endif
#if defined(CONFIG_NET_MULTI)
puts ("Net: ");
eth_initialize (bd);
#endif
+#if defined(FEC_ENET)
+ eth_init(bd);
+#endif
#endif
#ifdef CONFIG_POST
-- 1.4.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] -- resent in git format
2010-01-20 18:33 ` [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] -- resent in git format Michael Durrant
@ 2010-01-20 22:08 ` Ben Warren
2010-01-20 23:54 ` Michael Durrant
0 siblings, 1 reply; 6+ messages in thread
From: Ben Warren @ 2010-01-20 22:08 UTC (permalink / raw)
To: u-boot
Hi Michael,
Michael Durrant wrote:
> lib_m68k_board.patch
> - eth_init() requires eth_current which is initialized in
> eth_initialize()
> so eth_initialize (bd) should be called first then eth_init(bd)
>
>
Actually, eth_init() shouldn't be called in board.c at all.
regards,
Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] -- resent in git format
2010-01-20 22:08 ` Ben Warren
@ 2010-01-20 23:54 ` Michael Durrant
2010-01-21 0:20 ` Ben Warren
0 siblings, 1 reply; 6+ messages in thread
From: Michael Durrant @ 2010-01-20 23:54 UTC (permalink / raw)
To: u-boot
Ben Warren wrote:
> Hi Michael,
>
> Michael Durrant wrote:
>> lib_m68k_board.patch
>> - eth_init() requires eth_current which is initialized in
>> eth_initialize()
>> so eth_initialize (bd) should be called first then eth_init(bd)
>>
>>
> Actually, eth_init() shouldn't be called in board.c at all.
Ok. I am open to suggestions here.
Here is our rational for the change. We moved the eth_init()
previously before eth_initialize (bd) to after as the eth_initialize
over writes the current pointer. Our usage case is to ensure
the Ethernet MAC address is retrieved from the eeprom and
is used to initialized into the FEC registers in the MCF5282
before executing the customers application code.
Since MAC initialization normally only happens when u-boot
makes use of the Ethernet for network services such as ping
or tftp we saw using eth_init() in board.c as an easy way to
ensure the FEC registers are set up.
Regards,
Michael Durrant
> regards,
> Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] -- resent in git format
2010-01-20 23:54 ` Michael Durrant
@ 2010-01-21 0:20 ` Ben Warren
2010-01-21 16:12 ` Michael Durrant
0 siblings, 1 reply; 6+ messages in thread
From: Ben Warren @ 2010-01-21 0:20 UTC (permalink / raw)
To: u-boot
Michael Durrant wrote:
> Ben Warren wrote:
>
>> Hi Michael,
>>
>> Michael Durrant wrote:
>>
>>> lib_m68k_board.patch
>>> - eth_init() requires eth_current which is initialized in
>>> eth_initialize()
>>> so eth_initialize (bd) should be called first then eth_init(bd)
>>>
>>>
>>>
>> Actually, eth_init() shouldn't be called in board.c at all.
>>
>
> Ok. I am open to suggestions here.
>
> Here is our rational for the change. We moved the eth_init()
> previously before eth_initialize (bd) to after as the eth_initialize
> over writes the current pointer. Our usage case is to ensure
> the Ethernet MAC address is retrieved from the eeprom and
> is used to initialized into the FEC registers in the MCF5282
> before executing the customers application code.
>
> Since MAC initialization normally only happens when u-boot
> makes use of the Ethernet for network services such as ping
> or tftp we saw using eth_init() in board.c as an easy way to
> ensure the FEC registers are set up.
>
>
U-boot policy is that unused hardware is also un-initialized. In your
instance, if you're not going to use the network controller in U-boot,
you don't get to program its MAC address. You'll find this has been
discussed ad nauseum on this mailing list.
Your options are to either use the FEC or read the EEPROM in the
customer application.
> Regards,
> Michael Durrant
>
>
regards,
Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] -- resent in git format
2010-01-21 0:20 ` Ben Warren
@ 2010-01-21 16:12 ` Michael Durrant
0 siblings, 0 replies; 6+ messages in thread
From: Michael Durrant @ 2010-01-21 16:12 UTC (permalink / raw)
To: u-boot
Ben Warren wrote:
> Michael Durrant wrote:
>> Ben Warren wrote:
>>
>>> Hi Michael,
>>>
>>> Michael Durrant wrote:
>>>
>>>> lib_m68k_board.patch
>>>> - eth_init() requires eth_current which is initialized in
>>>> eth_initialize()
>>>> so eth_initialize (bd) should be called first then eth_init(bd)
>>>>
>>>>
>>> Actually, eth_init() shouldn't be called in board.c at all.
>>>
>>
>> Ok. I am open to suggestions here.
>>
>> Here is our rational for the change. We moved the eth_init()
>> previously before eth_initialize (bd) to after as the eth_initialize
>> over writes the current pointer. Our usage case is to ensure
>> the Ethernet MAC address is retrieved from the eeprom and
>> is used to initialized into the FEC registers in the MCF5282
>> before executing the customers application code.
>> Since MAC initialization normally only happens when u-boot
>> makes use of the Ethernet for network services such as ping
>> or tftp we saw using eth_init() in board.c as an easy way to
>> ensure the FEC registers are set up.
>>
>>
> U-boot policy is that unused hardware is also un-initialized. In your
> instance, if you're not going to use the network controller in U-boot,
> you don't get to program its MAC address. You'll find this has been
> discussed ad nauseum on this mailing list.
>
> Your options are to either use the FEC or read the EEPROM in the
> customer application.
Thanks for the feedback. I agree with supporting the existing
policy. That said ... both Microblaze and Coldfire/M68K call
eth_init() in board.c already.
Regards,
Michael Durrant
>> Regards,
>> Michael Durrant
>>
>>
> regards,
> Ben
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-21 16:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 20:50 [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] Michael Durrant
2010-01-20 18:33 ` [U-Boot] ColdFire/M68K board.c initialization / order matters [PATCH] -- resent in git format Michael Durrant
2010-01-20 22:08 ` Ben Warren
2010-01-20 23:54 ` Michael Durrant
2010-01-21 0:20 ` Ben Warren
2010-01-21 16:12 ` Michael Durrant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox