* [U-Boot-Users] Peripheral initialization hooks
@ 2006-02-13 20:24 Steve Strublic
2006-02-14 0:25 ` Shawn Jin
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Steve Strublic @ 2006-02-13 20:24 UTC (permalink / raw)
To: u-boot
Hello all,
I have a PPC852T platform running U-Boot. My platform has the ability
to enable or disable the Ethernet PHY directly, and at boot the PHY is
disabled. It must be enabled, through a register in an FPGA that is
accessed through a separate chip select.
Is it acceptable to modify board_init_r() to include a call to an
enable/disable function that would only apply if my board were defined?
Or are there any hooks for board-specific initializations?
Also, given that this is related to Ethernet, I think it's best that I
enable the PHY immediately before querying the config for 'ethaddr' in
board_init_r(). Agree/disagree?
TIA,
Steve
------
Steve Strublic
Network Solutions Group
Hypercom Corporation
Phoenix, AZ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060213/d9c7a92c/attachment.htm
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Peripheral initialization hooks
2006-02-13 20:24 [U-Boot-Users] Peripheral initialization hooks Steve Strublic
@ 2006-02-14 0:25 ` Shawn Jin
2006-02-14 23:28 ` Tolunay Orkun
2006-02-17 0:07 ` Wolfgang Denk
2 siblings, 0 replies; 6+ messages in thread
From: Shawn Jin @ 2006-02-14 0:25 UTC (permalink / raw)
To: u-boot
> Is it acceptable to modify board_init_r() to include a call to an
> enable/disable function that would only apply if my board were defined? Or
> are there any hooks for board-specific initializations?
The hooks are already there. I would recommend board_early_init_f() or
board_early_init_r() which can be turned on/off by the board
configuration header file.
Regards,
-Shawn.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Peripheral initialization hooks
2006-02-13 20:24 [U-Boot-Users] Peripheral initialization hooks Steve Strublic
2006-02-14 0:25 ` Shawn Jin
@ 2006-02-14 23:28 ` Tolunay Orkun
2006-02-17 0:07 ` Wolfgang Denk
2 siblings, 0 replies; 6+ messages in thread
From: Tolunay Orkun @ 2006-02-14 23:28 UTC (permalink / raw)
To: u-boot
Steve,
Steve Strublic wrote:
> I have a PPC852T platform running U-Boot. My platform has the ability
> to enable or disable the Ethernet PHY directly, and at boot the PHY is
> disabled. It must be enabled, through a register in an FPGA that is
> accessed through a separate chip select.
>
>
>
> Is it acceptable to modify board_init_r() to include a call to an
> enable/disable function that would only apply if my board were defined?
> Or are there any hooks for board-specific initializations?
>
>
>
> Also, given that this is related to Ethernet, I think it?s best that I
> enable the PHY immediately before querying the config for ?ethaddr? in
> board_init_r(). Agree/disagree?
I personally would stay away modifying common code if there is a way to
do it. You surely will make it modifications conditional for your board
but still it is a distribution of your board programming logic into
other files that are not obvious immediately.
What if you enable CONFIG_BOARD_EARLY_INIT_F in your board config file
and create a board_early_init_f() that enables all your PHYs and leave
it enabled?
Unless there is a serious issues with that, I would choose to keep all
your PHYs enabled. This assumes that you have initialized your FPGA CS
in your board initialization.
I use early init to initialize PLL to generate correct frquency for my
external serial console clock and a number of other clocks.
Tolunay
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Peripheral initialization hooks
2006-02-13 20:24 [U-Boot-Users] Peripheral initialization hooks Steve Strublic
2006-02-14 0:25 ` Shawn Jin
2006-02-14 23:28 ` Tolunay Orkun
@ 2006-02-17 0:07 ` Wolfgang Denk
2 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2006-02-17 0:07 UTC (permalink / raw)
To: u-boot
In message <482F3C06ECF00C44AEC226520C6FCB1A51ECB9@EXCHANGEVS.HYPERCOM.COM> you wrote:
>
> Is it acceptable to modify board_init_r() to include a call to an
> enable/disable function that would only apply if my board were defined?
No, it is not, as there are already too many such hooks available.
> Or are there any hooks for board-specific initializations?
Yes, there are.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Prepare for tomorrow -- get ready.
-- Edith Keeler, "The City On the Edge of Forever",
stardate unknown
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Peripheral initialization hooks
@ 2006-02-17 16:24 Steve Strublic
0 siblings, 0 replies; 6+ messages in thread
From: Steve Strublic @ 2006-02-17 16:24 UTC (permalink / raw)
To: u-boot
I have resolved the issue to my satisfaction by using the hooks.
Thanks,
Steve
-----Original Message-----
From: wd@denx.de [mailto:wd at denx.de]
Sent: Thursday, February 16, 2006 5:08 PM
To: Steve Strublic
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Peripheral initialization hooks
In message
<482F3C06ECF00C44AEC226520C6FCB1A51ECB9@EXCHANGEVS.HYPERCOM.COM> you
wrote:
>
> Is it acceptable to modify board_init_r() to include a call to an
> enable/disable function that would only apply if my board were
defined?
No, it is not, as there are already too many such hooks available.
> Or are there any hooks for board-specific initializations?
Yes, there are.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Prepare for tomorrow -- get ready.
-- Edith Keeler, "The City On the Edge of Forever",
stardate unknown
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] Peripheral initialization hooks
@ 2006-02-14 17:12 Steve Strublic
0 siblings, 0 replies; 6+ messages in thread
From: Steve Strublic @ 2006-02-14 17:12 UTC (permalink / raw)
To: u-boot
Thanks Shawn,
I think board_early_init_f() is a little too early to mess with the
Ethernet PHY. However, I saw the hook for reset_phy() later on in
board_reset_r(), which is perfect. So I hooked that for my board, and
voila!
Steve
-----Original Message-----
From: Shawn Jin [mailto:shawnxjin at gmail.com]
Sent: Monday, February 13, 2006 5:26 PM
To: Steve Strublic
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Peripheral initialization hooks
> Is it acceptable to modify board_init_r() to include a call to an
> enable/disable function that would only apply if my board were
defined? Or
> are there any hooks for board-specific initializations?
The hooks are already there. I would recommend board_early_init_f() or
board_early_init_r() which can be turned on/off by the board
configuration header file.
Regards,
-Shawn.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-02-17 16:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13 20:24 [U-Boot-Users] Peripheral initialization hooks Steve Strublic
2006-02-14 0:25 ` Shawn Jin
2006-02-14 23:28 ` Tolunay Orkun
2006-02-17 0:07 ` Wolfgang Denk
2006-02-14 17:12 Steve Strublic
2006-02-17 16:24 Steve Strublic
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.