From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 2/3] net: fec: do not access reserved register for i.MX6UL
Date: Mon, 31 Aug 2015 19:14:06 +0200 [thread overview]
Message-ID: <55E48B5E.8090005@denx.de> (raw)
In-Reply-To: <55D9EA1C.40806@denx.de>
Hi Peng,
On 23/08/2015 17:43, Stefano Babic wrote:
> On 12/08/2015 11:40, Peng Fan wrote:
>> The MIB RAM and FIFO receive start register does not exist on
>> i.MX6UL. Accessing these register will cause enet not work well.
>>
>> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
>> Signed-off-by: Fugang Duan <B38611@freescale.com>
>> Cc: Joe Hershberger <joe.hershberger@ni.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> ---
>>
>> Changes v2:
>> Using runtime check, but not hardcoding "#ifdef".
>> This patch depends on the runtime checking patch:
>> https://patchwork.ozlabs.org/patch/505621/.
>>
>> drivers/net/fec_mxc.c | 14 +++++++++-----
>> 1 file changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
>> index c5dcbbb..bff5fd1 100644
>> --- a/drivers/net/fec_mxc.c
>> +++ b/drivers/net/fec_mxc.c
>> @@ -17,6 +17,7 @@
>>
>> #include <asm/arch/clock.h>
>> #include <asm/arch/imx-regs.h>
>> +#include <asm/imx-common/sys_proto.h>
>> #include <asm/io.h>
>> #include <asm/errno.h>
>> #include <linux/compiler.h>
>> @@ -551,12 +552,15 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
>> writel(0x00000000, &fec->eth->gaddr2);
>>
>>
>> - /* clear MIB RAM */
>> - for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
>> - writel(0, i);
>> + /* Do not access reserved register for i.MX6UL */
>> + if (!is_cpu_type(MXC_CPU_MX6UL)) {
>> + /* clear MIB RAM */
>> + for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
>> + writel(0, i);
>>
>> - /* FIFO receive start register */
>> - writel(0x520, &fec->eth->r_fstart);
>> + /* FIFO receive start register */
>> + writel(0x520, &fec->eth->r_fstart);
>> + }
>>
>> /* size and address of each buffer */
>> writel(FEC_MAX_PKT_SIZE, &fec->eth->emrbr);
>>
>
Patch is already applied - however, I have found that this break build
for vf610 boards (they have not a get_cpu_rev()). You can check with the
current u-boot-imx.
Can you take a look, please ?
Thanks,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2015-08-31 17:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 9:40 [U-Boot] [PATCH V2 1/3] imx: clock support enet2 anatop clock support Peng Fan
2015-08-12 9:40 ` [U-Boot] [PATCH V2 2/3] net: fec: do not access reserved register for i.MX6UL Peng Fan
2015-08-12 19:15 ` Joe Hershberger
2015-08-23 15:43 ` Stefano Babic
2015-08-31 17:14 ` Stefano Babic [this message]
2015-09-01 0:32 ` Peng Fan
2015-09-01 7:15 ` Stefano Babic
2015-08-12 9:40 ` [U-Boot] [PATCH V2 3/3] imx: mx6ul_14x14_evk add ENET support Peng Fan
2015-08-12 8:34 ` Peng Fan
2015-08-23 15:45 ` Stefano Babic
2015-08-24 0:07 ` Peng Fan
2015-08-24 7:31 ` Stefano Babic
2015-08-24 6:35 ` Peng Fan
2015-08-23 15:43 ` [U-Boot] [PATCH V2 1/3] imx: clock support enet2 anatop clock support Stefano Babic
-- strict thread matches above, loose matches on Subject: below --
2015-08-12 9:46 Peng Fan
2015-08-12 9:46 ` [U-Boot] [PATCH V2 2/3] net: fec: do not access reserved register for i.MX6UL Peng Fan
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=55E48B5E.8090005@denx.de \
--to=sbabic@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