From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] 4xx: cleanup ethernet phy initialization on PMC440 boards
Date: Thu, 20 Mar 2014 12:23:20 +0100 [thread overview]
Message-ID: <532ACFA8.90009@denx.de> (raw)
In-Reply-To: <1395261039-19640-1-git-send-email-matthias.fuchs@esd.eu>
Hi Matthias,
On 19.03.2014 21:30, Matthias Fuchs wrote:
> This patch moves phy initialization for VSC8601 ethernet
> phys that are used on early board revisions into a separate
> setup function.
Thanks for working on this. Some additional comments though.
> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
> ---
> board/esd/pmc440/pmc440.c | 45 ++++++++++++++++++++++-----------------------
> 1 files changed, 22 insertions(+), 23 deletions(-)
>
> diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c
> index 7aee8e4..3165486 100644
> --- a/board/esd/pmc440/pmc440.c
> +++ b/board/esd/pmc440/pmc440.c
> @@ -643,6 +643,23 @@ int is_pci_host(struct pci_controller *hose)
> #endif /* defined(CONFIG_PCI) */
>
> #ifdef CONFIG_RESET_PHY_R
> +int pmc440_setup_vsc8601(char *devname, int phy_addr,
> + unsigned short behavior, unsigned short method)
static int pmc440_...
> +{
> + /* adjust LED behavior */
> + if (miiphy_write(devname, phy_addr, 0x1f, 0x0001) != 0) {
> + printf("Phy%d: register write access failed\n", phy_addr);
> + return -1;
> + }
> +
> + miiphy_write(devname, phy_addr, 0x11, 0x0010);
> + miiphy_write(devname, phy_addr, 0x11, behavior);
> + miiphy_write(devname, phy_addr, 0x10, method);
> + miiphy_write(devname, phy_addr, 0x1f, 0x0000);
> +
> + return 0;
> +}
Look much nicer with less indentation. :)
> int pmc440_setup_ksz9031(char *devname, int phy_addr)
And now I notice that this should also be:
static int pmc440_...
A new patch-set would be best to handle this. Or a new patch with both
changes squashed together would be fine as well. Whatever you prefer.
Thanks,
Stefan
prev parent reply other threads:[~2014-03-20 11:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 20:30 [U-Boot] [PATCH] 4xx: cleanup ethernet phy initialization on PMC440 boards Matthias Fuchs
2014-03-20 11:23 ` Stefan Roese [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=532ACFA8.90009@denx.de \
--to=sr@denx.de \
--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