From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot
Date: Thu, 01 Sep 2011 08:52:02 +0200 [thread overview]
Message-ID: <4E5F2B92.8040107@monstr.eu> (raw)
In-Reply-To: <201108311524.09706.vapier@gentoo.org>
Mike Frysinger wrote:
> On Tuesday, August 30, 2011 08:05:19 Michal Simek wrote:
>> +static void setup_mac(struct eth_device *dev)
>> +{
>> + /* Set the MAC address */
>> + int val = ((dev->enetaddr[3] << 24) | (dev->enetaddr[2] << 16) |
>> + (dev->enetaddr[1] << 8) | (dev->enetaddr[0]));
>> + aximac_out32(dev->iobase, XAE_UAW0_OFFSET, val);
>> +
>> + val = (dev->enetaddr[5] << 8) | dev->enetaddr[4] ;
>> + val |= aximac_in32(dev->iobase, XAE_UAW1_OFFSET) &
>> + ~XAE_UAW1_UNICASTADDR_MASK;
>> + aximac_out32(dev->iobase, XAE_UAW1_OFFSET, val);
>> +}
>> +
>> +static int axiemac_init(struct eth_device *dev, bd_t * bis)
>> +{
>> + setup_mac(dev);
>
> pretty sure this should be dev->write_hwaddr
I expected it. The point is where dev->write_hwaddr is called.
I mean sequence is:
dev->write_hwaddr
u-boot network command
dev->init
If init reset device include setup mac then this sequence can't work.
But not case for my MAC - I can use it.
>
>> +int xilinx_axiemac_initialize(bd_t *bis, unsigned long base_addr, int
>> dma_addr)
>
> you got base_addr right, but forgot to change dma_addr to unsigned long too ;)
Fixed.
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
next prev parent reply other threads:[~2011-09-01 6:52 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 12:05 [U-Boot] [PATCH v2] net: ll_temac: Add LL TEMAC driver to u-boot Michal Simek
2011-08-30 12:05 ` [U-Boot] [PATCH] net: axi_ethernet: Add " Michal Simek
2011-08-31 12:19 ` Marek Vasut
2011-08-31 14:46 ` Michal Simek
2011-08-31 15:19 ` Marek Vasut
2011-09-01 7:17 ` Michal Simek
2011-09-01 8:18 ` Marek Vasut
2011-09-01 8:55 ` Michal Simek
2011-09-01 10:07 ` Marek Vasut
2011-09-01 11:04 ` Michal Simek
2011-09-01 12:47 ` Wolfgang Denk
2011-08-31 20:13 ` Wolfgang Denk
2011-08-31 19:24 ` Mike Frysinger
2011-09-01 6:52 ` Michal Simek [this message]
2011-08-31 19:26 ` [U-Boot] [PATCH v2] net: ll_temac: Add LL TEMAC " Mike Frysinger
2011-08-31 20:01 ` Marek Vasut
2011-09-01 9:21 ` Michal Simek
2011-08-31 21:52 ` Marek Vasut
2011-09-01 11:11 ` Michal Simek
-- strict thread matches above, loose matches on Subject: below --
2011-02-28 9:40 [U-Boot] [PATCH] net: axi_ethernet: Add " Michal Simek
2011-02-28 17:36 ` Mike Frysinger
2011-02-28 18:50 ` Michal Simek
2011-02-28 19:29 ` Mike Frysinger
2011-03-01 8:00 ` Michal Simek
2011-03-01 8:18 ` Mike Frysinger
2011-03-01 8:34 ` Michal Simek
2011-03-01 8:48 ` Mike Frysinger
2011-03-01 9:29 ` Michal Simek
2011-03-03 21:51 ` Mike Frysinger
2011-03-04 10:09 ` Michal Simek
2011-03-09 7:34 ` Mike Frysinger
2011-03-09 7:38 ` Mike Frysinger
2011-03-01 8:37 ` Michal Simek
2011-03-01 8:58 ` Mike Frysinger
2011-03-01 8:19 ` Michal Simek
2011-03-01 8:28 ` Mike Frysinger
2011-03-01 8:46 ` Michal Simek
2011-03-01 9:10 ` Mike Frysinger
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=4E5F2B92.8040107@monstr.eu \
--to=monstr@monstr.eu \
--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