From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/3 v4] New MIIPHYBB implementation with multi-bus support
Date: Sat, 10 Oct 2009 00:00:57 -0700 [thread overview]
Message-ID: <4AD03129.8030900@gmail.com> (raw)
In-Reply-To: <1254836704-24209-1-git-send-email-luigi.mantellini@idf-hit.com>
Hi Luigi,
Sorry, I'm going to have to ask you to re-submit again :( There are a
few things that need to be addressed
Luigi 'Comio' Mantellini wrote:
> This patch rewrites the miiphybb ( Bit-banged MII bus driver ) in order to
> support an arbitrary number of mii buses. This feature is useful when your
> board uses different mii buses for different phys and all (or a part) of these
> buses are implemented via bit-banging mode.
>
> The driver requires that the following macros should be defined into the board
> configuration file:
>
> CONFIG_BITBANGMII - Enable the miiphybb driver
> CONFIG_BITBANGMII_MULTI - Enable the multi bus support
>
> If the CONFIG_BITBANGMII_MULTI is not defined, the board's config file needs
> to define at least the following macros:
>
> MII_INIT - Generic code to enable the MII bus (optional)
> MDIO_DECLARE - Declaration needed to access to the MDIO pin (optional)
> MDIO_ACTIVE - Activate the MDIO pin as out pin
> MDIO_TRISTATE - Activate the MDIO pin as input/tristate pin
> MDIO_READ - Read the MDIO pin
> MDIO(v) - Write v on the MDIO pin
> MDC_DECLARE - Declaration needed to access to the MDC pin (optional)
> MDC(v) - Write v on the MDC pin
>
> The previous macros make the driver compatible with the previous version
> (that didn't support the multi-bus).
>
> When the CONFIG_BITBANGMII_MULTI is also defined, the board code needs to fill
> the bb_miiphy_buses[] array with a record for each required bus and declare
> the bb_miiphy_buses_num variable with the number of mii buses.
> The record (struct bb_miiphy_bus) has the following fields/callbacks (see
> miiphy.h for details):
>
> char name[] - The symbolic name that must be equal to the MII bus
> registered name
> int (*init)() - Initialization function called at startup time (just
> before the Ethernet initialization)
> int (*mdio_active)() - Activate the MDIO pin as output
> int (*mdio_tristate)() - Activate the MDIO pin as input/tristate pin
> int (*set_mdio)() - Write the MDIO pin
> int (*get_mdio)() - Read the MDIO pin
> int (*set_mdc)() - Write the MDC pin
> int (*delay)() - Delay function
> void *priv - Private data used by board specific code
>
> The board code will look like:
>
> struct bb_miiphy_bus bb_miiphy_buses[] = {
> { .name = "miibus#1", .init = b1_init, .mdio_active = b1_mdio_active, ... },
> { .name = "miibus#2", .init = b2_init, .mdio_active = b2_mdio_active, ... },
> ...
> };
> int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) /
> sizeof(bb_miiphy_buses[0]);
>
>
Can you please copy this stuff into a README file (doc/README.bitbangMII
maybe)? I'm afraid all this wonderful changelog information will be in
a place that people won't look.
If it wasn't for other problems with this patch set, I'd do it myself.
> Patch Changelog:
>
> v1 -- First (broken) release
> v2 -- Fix some typos and disable callbacks pointers relacation (if
> CONFIG_RELOC_FIXUP_WORKS is not defined)
> v3 -- Do not relocate NULL pointers
> v4 -- Code Cleanup.
>
> Luigi 'Comio' Mantellini (3):
> New Bit-banged MII driver (MIIPHYBB) implementation with multi-bus
> support.
> Add bb_miiphy_init call before any ethernet bring-up code.
> Update all board to support new bbmiiphy driver (with multibus
> support)
>
> drivers/net/phy/miiphybb.c | 346 +++++++++++++++++++++++++++++-------------
> include/configs/ISPAN.h | 4 +
> include/configs/MPC8260ADS.h | 3 +
> include/configs/MPC8266ADS.h | 4 +
> include/configs/MPC8560ADS.h | 4 +
> include/configs/Rattler.h | 4 +
> include/configs/SBC8540.h | 4 +
> include/configs/TQM8272.h | 3 +
> include/configs/VoVPN-GW.h | 4 +
> include/configs/ZPC1900.h | 4 +
> include/configs/ep8248.h | 4 +
> include/configs/ep82xxm.h | 4 +
> include/configs/gw8260.h | 4 +
> include/configs/hymod.h | 12 ++
> include/configs/muas3001.h | 4 +
> include/configs/ppmc8260.h | 4 +
> include/configs/sacsng.h | 4 +
> include/configs/sbc8260.h | 4 +
> include/configs/sbc8560.h | 4 +
> include/miiphy.h | 25 +++-
> lib_arm/board.c | 7 +
> lib_avr32/board.c | 7 +
> lib_blackfin/board.c | 7 +
> lib_i386/board.c | 9 +-
> lib_m68k/board.c | 7 +
> lib_mips/board.c | 7 +
> lib_ppc/board.c | 7 +
> lib_sh/board.c | 7 +
> lib_sparc/board.c | 7 +
> 29 files changed, 408 insertions(+), 106 deletions(-)
>
> _______
Here are the real problems:
bwarren at bwarren-bldsrv$ CROSS_COMPILE=ppc_6xx- ./MAKEALL ppc
...
Configuring for ep8248 board...
board.c:87:20: error: miihpy.h: No such file or directory
board.c:87:20: error: miihpy.h: No such file or directory
board.c: In function 'board_init_r':
board.c:950: warning: implicit declaration of function 'bb_miiphy_init'
make[1]: *** [board.o] Error 1
make: *** [lib_ppc/libppc.a] Error 2
And all sorts of other PPC boards fail too. Looks like a typo.
regards,
Ben
prev parent reply other threads:[~2009-10-10 7:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 13:45 [U-Boot] [PATCH 0/3 v4] New MIIPHYBB implementation with multi-bus support Luigi 'Comio' Mantellini
2009-10-06 13:45 ` [U-Boot] [PATCH 1/3 v4] New Bit-banged MII driver (MIIPHYBB) " Luigi 'Comio' Mantellini
2009-10-06 13:45 ` [U-Boot] [PATCH 2/3] Add bb_miiphy_init call before any ethernet bring-up code Luigi 'Comio' Mantellini
2009-10-06 13:45 ` [U-Boot] [PATCH 3/3] Update all board to support new bbmiiphy driver (with multibus support) Luigi 'Comio' Mantellini
2009-10-10 7:02 ` Ben Warren
2009-10-10 7:00 ` Ben Warren [this message]
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=4AD03129.8030900@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 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.