From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/7] Add mdio command for new PHY infrastructure
Date: Wed, 30 Mar 2011 13:55:58 +0200 [thread overview]
Message-ID: <m2hbakn7ox.fsf@ohwell.denx.de> (raw)
In-Reply-To: <1301427010-7429-6-git-send-email-afleming@freescale.com> (Andy Fleming's message of "Tue, 29 Mar 2011 14:30:08 -0500")
Hi Andy,
> The new mdio command doesn't have all of the features of the mii
> command, but it provides the necessary read/write primitives, and allows
> users to interact with 10G PHYs, and other PHYs which use Clause 45 of
> 802.3. This means that the mdio command requires a "Device Address"
> argument, though for clause 22 PHYs, the argument can be "-".
>
> Signed-off-by: Andy Fleming <afleming@freescale.com>
> ---
> common/Makefile | 3 +
> common/cmd_mdio.c | 293 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 296 insertions(+), 0 deletions(-)
> create mode 100644 common/cmd_mdio.c
[...]
> +static int extract_range(char *input, int *plo, int *phi)
> +{
> + char * end;
> + *plo = simple_strtol(input, &end, 0);
> + if (end == input)
> + return -1;
> +
> + if (*end == '-') {
What about the case of input="12-"? Shouldn't there be an "&& *(end+1)"?
> + end++;
> + *phi = simple_strtol(end, NULL, 0);
> + } else if (*end == '\0') {
> + *phi = *plo;
> + } else
> + return -1;
> +
> + return 0;
> +}
Other than that, looks good, so once my above concern is addressed
Acked-by: Detlev Zundel <dzu@denx.de>
Thanks!
Detlev
--
Choosing which tool to use is a problem for most users. Therefore
when one tool came along that did everything Perl (Ugly) it took over.
-- Rob Pike
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
next prev parent reply other threads:[~2011-03-30 11:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 19:30 [U-Boot] [RFC 0/7] Universal PHY Infrastructure Andy Fleming
2011-03-29 19:30 ` [U-Boot] [PATCH 1/7] tsec: use IO accessories to access the register Andy Fleming
2011-03-29 19:30 ` [U-Boot] [PATCH 2/7] tsec: arrange the code to avoid useless function declaration Andy Fleming
2011-03-29 19:30 ` [U-Boot] [PATCH 3/7] Remove instances of phy_read/write Andy Fleming
2011-03-29 19:30 ` [U-Boot] [PATCH 4/7] Create PHY Lib for U-Boot Andy Fleming
2011-03-29 19:30 ` [U-Boot] [PATCH 5/7] Add mdio command for new PHY infrastructure Andy Fleming
2011-03-29 19:30 ` [U-Boot] [PATCH 6/7] phylib: Add a bunch of PHY drivers from tsec Andy Fleming
2011-03-29 19:30 ` [U-Boot] [PATCH 7/7] tsec: Convert tsec to use PHY Lib Andy Fleming
2011-03-30 12:32 ` Detlev Zundel
2011-03-30 12:26 ` [U-Boot] [PATCH 6/7] phylib: Add a bunch of PHY drivers from tsec Detlev Zundel
2011-03-31 1:13 ` Andy Fleming
2011-03-30 11:55 ` Detlev Zundel [this message]
2011-03-30 23:05 ` [U-Boot] [PATCH 5/7] Add mdio command for new PHY infrastructure Andy Fleming
2011-03-30 23:18 ` Mike Frysinger
2011-03-30 11:47 ` [U-Boot] [PATCH 4/7] Create PHY Lib for U-Boot Detlev Zundel
2011-03-30 11:11 ` [U-Boot] [PATCH 3/7] Remove instances of phy_read/write Detlev Zundel
2011-03-30 11:07 ` [U-Boot] [PATCH 2/7] tsec: arrange the code to avoid useless function declaration Detlev Zundel
2011-03-31 8:13 ` Kumar Gala
2011-03-31 14:01 ` Fleming Andy-AFLEMING
2011-03-31 8:12 ` [U-Boot] [PATCH 1/7] tsec: use IO accessories to access the register Kumar Gala
2011-03-30 12:06 ` [U-Boot] [RFC 0/7] Universal PHY Infrastructure Detlev Zundel
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=m2hbakn7ox.fsf@ohwell.denx.de \
--to=dzu@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