From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] net: Adds Fast Ethernet Controller driver for Armada100
Date: Wed, 24 Aug 2011 11:42:06 -0400 [thread overview]
Message-ID: <201108241142.07480.vapier@gentoo.org> (raw)
In-Reply-To: <1314191240-30938-1-git-send-email-ajay.bhargav@einfochips.com>
On Wednesday, August 24, 2011 09:07:18 Ajay Bhargav wrote:
> + darmdfec->p_rxdesc = (struct rx_desc *) memalign(PKTALIGN,
> + ARMDFEC_RXQ_DESC_ALIGNED_SIZE * RINGSZ + 1);
memalign() returns a void*, so you shouldnt need to cast its return value (you
do this a couple of times)
> + /* Read mac from env if available */
> + eth_getenv_enetaddr("ethaddr", dev->enetaddr);
you shouldnt need to do this. the higher layers will take care of this for
you when you set write_hwaddr
also, it seems like some of my previous feedback wasnt addressed ?
> + while (cmd_sts & BUF_OWNED_BY_DMA) {
> ...
> + };
no semi-colon needed
> +int armada100_fec_initialize()
> +{
> ...
> + darmdfec->regs = (void *) ARMD1_FEC_BASE;
make the reg base a parameter to armada100_fec_initialize()
> +#if defined(CONFIG_PHY_BASE_ADR)
> + miiphy_write(dev->name, PHY_ADR_REQ, PHY_ADR_REQ,
> + (u16) CONFIG_PHY_BASE_ADR);
> +#else
> + /* Search phy address from range 0-31 */
> + phy_adr = ethernet_phy_detect(dev);
> + if (phy_adr < 0) {
> + printf("Error: PHY not detected at address range 0-31\n");
> + return -1;
> + } else {
> + debug("PHY detected at addr %d\n", phy_adr);
> + miiphy_write(dev->name, PHY_ADR_REQ, PHY_ADR_REQ,
> + (u16) phy_adr);
> + }
> +#endif
this should be done in the armdfec_init() func, not the initialize func
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110824/ad840bed/attachment.pgp
next prev parent reply other threads:[~2011-08-24 15:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 13:07 [U-Boot] [PATCH v2 1/3] net: Adds Fast Ethernet Controller driver for Armada100 Ajay Bhargav
2011-08-24 15:42 ` Mike Frysinger [this message]
2011-08-24 16:38 ` Marek Vasut
2011-08-25 5:24 ` Ajay Bhargav
2011-08-25 12:14 ` Marek Vasut
2011-08-25 5:10 ` Ajay Bhargav
2011-08-25 14:13 ` Mike Frysinger
2011-08-24 16:36 ` Marek Vasut
[not found] <569776325.496.1314249408394.JavaMail.root@ahm.einfochips.com>
2011-08-25 5:21 ` Ajay Bhargav
2011-08-25 12:15 ` Marek Vasut
[not found] <583672539.2717.1314270415380.JavaMail.root@ahm.einfochips.com>
2011-08-25 11:07 ` Ajay Bhargav
2011-08-25 12:19 ` Marek Vasut
2011-08-25 12:12 ` Ajay Bhargav
[not found] <1826454834.6634.1314336622428.JavaMail.root@ahm.einfochips.com>
2011-08-26 5:33 ` Ajay Bhargav
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=201108241142.07480.vapier@gentoo.org \
--to=vapier@gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox