[U-Boot] [PATCH 2/3] Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
Prafulla Wadaskar
prafulla at marvell.com
Wed Apr 13 16:18:16 CEST 2011
> -----Original Message-----
> From: Clint Adams [mailto:clint at debian.org]
> Sent: Wednesday, April 13, 2011 12:14 AM
> To: u-boot at lists.denx.de
> Cc: Prafulla Wadaskar; julian.pidancet at citrix.com; Clint Adams
> Subject: [PATCH 2/3] Initialize second PHY on OpenRD-Client and OpenRD-
> Ultimate.
>
> (rework of Julian Pidancet's patch)
> ---
> board/Marvell/openrd_base/openrd_base.c | 24 ++++++++++++++++++++----
> include/configs/openrd_base.h | 14 ++++++++++++--
> 2 files changed, 32 insertions(+), 6 deletions(-)
>
> diff --git a/board/Marvell/openrd_base/openrd_base.c
> b/board/Marvell/openrd_base/openrd_base.c
> index f7c63ac..cb0f0fe 100644
> --- a/board/Marvell/openrd_base/openrd_base.c
> +++ b/board/Marvell/openrd_base/openrd_base.c
> @@ -124,12 +124,11 @@ int board_init(void)
> }
>
> #ifdef CONFIG_RESET_PHY_R
> -/* Configure and enable MV88E1116 PHY */
> -void reset_phy(void)
> +/* Configure and enable MV88E1116/88E1121 PHY */
> +void mv_phy_init(char *name)
> {
> u16 reg;
> u16 devadr;
> - char *name = "egiga0";
>
> if (miiphy_set_current_dev(name))
> return;
> @@ -154,6 +153,23 @@ void reset_phy(void)
> /* reset the phy */
> miiphy_reset(name, devadr);
>
> - printf("88E1116 Initialized on %s\n", name);
> + printf(PHY_NO" Initialized on %s\n", name);
> +}
> +
> +void reset_phy(void)
> +{
> + mv_phy_init("egiga0");
> +
> +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT
> + /* Kirkwood ethernet driver is written with the assumption that
> in case
> + * of multiple PHYs, their addresses are consecutive. But
> unfortunately
> + * in case of OpenRD-Client, PHY addresses are not
> consecutive.*/
> + miiphy_write("egiga1", 0xEE, 0xEE, 24);
> +#endif
> +
> +#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT) ||
> defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE)
The line is too long >80 chars
Regards..
Prafulla . .
More information about the U-Boot
mailing list