[U-Boot-Users] Peripheral initialization hooks
Tolunay Orkun
listmember at orkun.us
Wed Feb 15 00:28:11 CET 2006
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
More information about the U-Boot
mailing list