From: Simon Guinot <simon.guinot@sequanux.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/4] LaCie/common: Fix cloudbox ethernet leds
Date: Mon, 1 Jul 2013 01:01:40 +0200 [thread overview]
Message-ID: <20130630230140.GD10726@kw.sim.vm.gnt> (raw)
In-Reply-To: <1372587149-8220-4-git-send-email-fredo@starox.org>
On Sun, Jun 30, 2013 at 12:12:28PM +0200, Fr?d?ric Leroy wrote:
> The cloudbox device have a different ethernet phy setup than other ns2
> devices. We get initialization value from the GPL LaCie source
>
> Signed-off-by: Fr?d?ric Leroy <fredo@starox.org>
> ---
> board/LaCie/common/common.c | 13 ++++++++++---
> include/configs/lacie_kw.h | 5 +++++
> 2 files changed, 15 insertions(+), 3 deletions(-)
Acked-by: Simon Guinot <simon.guinot@sequanux.org>
>
> diff --git a/board/LaCie/common/common.c b/board/LaCie/common/common.c
> index a62bf9f..85480e7 100644
> --- a/board/LaCie/common/common.c
> +++ b/board/LaCie/common/common.c
> @@ -21,6 +21,12 @@
> #define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
> #define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
>
> +#if !defined(MII_MARVELL_LED_REG)
> +# define MII_MARVELL_LED_REG 16
> +# define MII_MARVELL_LED_MASK 0xf0
> +# define MII_MARVELL_LED_VALUE 0x0f
> +#endif
> +
> void mv_phy_88e1116_init(const char *name, u16 phyaddr)
> {
> u16 reg;
> @@ -53,9 +59,10 @@ void mv_phy_88e1318_init(const char *name, u16 phyaddr)
> * Set control mode 4 for LED[0].
> */
> miiphy_write(name, phyaddr, MII_MARVELL_PHY_PAGE, 3);
> - miiphy_read(name, phyaddr, 16, ®);
> - reg |= 0xf;
> - miiphy_write(name, phyaddr, 16, reg);
> + miiphy_read(name, phyaddr, MII_MARVELL_LED_REG, ®);
> + reg &= MII_MARVELL_LED_MASK;
> + reg |= MII_MARVELL_LED_VALUE;
> + miiphy_write(name, phyaddr, MII_MARVELL_LED_REG, reg);
>
> /*
> * Enable RGMII delay on Tx and Rx for CPU port
> diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h
> index fe27bbe..02e0882 100644
> --- a/include/configs/lacie_kw.h
> +++ b/include/configs/lacie_kw.h
> @@ -138,6 +138,11 @@
> #ifdef CONFIG_CMD_NET
> #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
> #define CONFIG_NETCONSOLE
> +#if defined(CONFIG_CLOUDBOX)
> +# define MII_MARVELL_LED_REG 17
> +# define MII_MARVELL_LED_MASK 0xffc0
> +# define MII_MARVELL_LED_VALUE 0x15
> +#endif
> #endif
>
> /*
> --
> 1.8.1.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130701/37aef6c6/attachment.pgp>
next prev parent reply other threads:[~2013-06-30 23:01 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 16:49 [U-Boot] [PATCH 0/2] add support for LaCie CloudBox Frederic Leroy
2013-06-25 16:49 ` [U-Boot] [PATCH 1/2] arm: " Frederic Leroy
2013-06-25 18:24 ` Wolfgang Denk
2013-06-30 10:12 ` [U-Boot] [PATCH v2 0/4] " Frédéric Leroy
2013-06-30 10:12 ` [U-Boot] [PATCH v2 1/4] lacie_kw: sort #ifdef lists by CONFIG_ identifiers Frédéric Leroy
2013-06-30 22:15 ` Simon Guinot
2013-06-30 10:12 ` [U-Boot] [PATCH v2 2/4] arm: add support for LaCie CloudBox Frédéric Leroy
2013-06-30 10:12 ` [U-Boot] [PATCH v2 3/4] LaCie/common: Fix cloudbox ethernet leds Frédéric Leroy
2013-06-30 23:01 ` Simon Guinot [this message]
2013-07-01 9:51 ` [U-Boot] compiled failed when turned off gcc optimazition TigerLiu at viatech.com.cn
2013-07-01 10:03 ` Wolfgang Denk
2013-07-01 10:08 ` TigerLiu at viatech.com.cn
2013-07-01 11:37 ` Wolfgang Denk
2013-07-01 18:03 ` Mike Dunn
2013-07-01 19:51 ` Wolfgang Denk
2013-07-02 19:40 ` Mike Dunn
2013-07-02 22:38 ` Graeme Russ
2013-07-05 10:31 ` TigerLiu at viatech.com.cn
2013-07-05 14:00 ` [U-Boot] compiled failed when turned off gcc optimazitionAT Albert ARIBAUD
2013-06-30 10:12 ` [U-Boot] [PATCH v2 4/4] arm: add machine ID for CloudBox Frédéric Leroy
2013-06-30 22:53 ` Simon Guinot
2013-07-01 9:30 ` Frédéric Leroy
2013-07-01 10:01 ` Simon Guinot
2013-06-25 20:50 ` [U-Boot] [PATCH 1/2] arm: add support for LaCie CloudBox Simon Guinot
2013-06-25 21:09 ` Simon Guinot
2013-06-25 16:49 ` [U-Boot] [PATCH 2/2] LaCie/common: Fix cloudbox ethernet leds Frederic Leroy
2013-06-25 18:27 ` Wolfgang Denk
2013-06-25 21:08 ` Simon Guinot
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=20130630230140.GD10726@kw.sim.vm.gnt \
--to=simon.guinot@sequanux.org \
--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.