From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3 v3] Add bb_miiphy_init call before any ethernet bring-up code.
Date: Mon, 05 Oct 2009 13:18:46 -0700 [thread overview]
Message-ID: <4ACA54A6.7050609@gmail.com> (raw)
In-Reply-To: <b73e93990910051304w35935372s558e25b7af22d835@mail.gmail.com>
Luigi Mantellini wrote:
> The lib_[arch]/board.c code calls the bb_miiphy_init that will do just 2 things:
>
> 1) Relocate the bb_mii_buses[i].* hooks (.init, .mdio_active, .delay, ...)
> 2) Call the board bb_mii_buses[i].init (board specific code).
>
> The board specifc code will be contained into the hook .init filed
> into the bb_mii_buses vector.
>
> Do you have a better solution?
>
>
In each case, you put the bb_miiphy_init() right before
eth_initialize(). One of the first things eth_initialize() does is call
board_eth_init(). Moving the call to each board's specific code would
therefore not make any difference code-wise, but IMHO is architecturally
cleaner. If #ifdef's are necessary (in this case they are), I believe
it's better to have them in the more specific code (board) than generic
(arch).
regards,
Ben
next prev parent reply other threads:[~2009-10-05 20:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-23 13:10 [U-Boot] [PATCH 0/3 v3] New MIIPHYBB implementation with multi-bus support Luigi 'Comio' Mantellini
2009-09-23 13:10 ` [U-Boot] [PATCH 1/3 v3] Bit-banged MII driver " Luigi 'Comio' Mantellini
2009-09-23 13:10 ` [U-Boot] [PATCH 2/3 v3] Add bb_miiphy_init call before any ethernet bring-up code Luigi 'Comio' Mantellini
2009-09-23 13:10 ` [U-Boot] [PATCH 3/3 v3] Update all board to support new bbmiiphy driver (with multibus support) Luigi 'Comio' Mantellini
2009-10-05 6:34 ` Ben Warren
2009-10-05 6:30 ` [U-Boot] [PATCH 2/3 v3] Add bb_miiphy_init call before any ethernet bring-up code Ben Warren
2009-10-05 20:04 ` Luigi Mantellini
2009-10-05 20:18 ` Ben Warren [this message]
2009-10-05 20:35 ` Luigi Mantellini
2009-09-24 12:52 ` [U-Boot] [PATCH 1/3 v3] Bit-banged MII driver with multi-bus support Luigi 'Comio' Mantellini
2009-09-24 13:35 ` Jerry Van Baren
2009-10-05 6:27 ` Ben Warren
2009-10-05 19:55 ` Luigi Mantellini
2009-10-05 20:04 ` Ben Warren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ACA54A6.7050609@gmail.com \
--to=biggerbadderben@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox