From: 이승열 <sunnylee@probedigital.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Fw: Does U-boot support ethernet chip LAN9210 from SMSC?
Date: Mon, 30 Jun 2008 19:21:54 +0900 [thread overview]
Message-ID: <02d401c8da9b$20600990$b301a8c0@server> (raw)
Hi Ben,
The below is the part of smsc911x.c.
In reg_read(), line 5 shows "(*(addr_16 + 1) << 16));", which add 1 to addr_16.
In reg_write(), line 10 shows *(volatile u16*)(addr + 2) = (u16)(val >> 16);, which add 2 to addr.
I don't understand this. Can you explain to me why address offset differs?
1. #elif CONFIG_DRIVER_SMC911X_16_BIT
2. static inline u32 reg_read(u32 addr)
3. {
4. volatile u16 *addr_16 = (u16 *)addr;
5. return ((*addr_16 & 0x0000ffff) | (*(addr_16 + 1) << 16));
6. }
7. static inline void reg_write(u32 addr, u32 val)
8.{
9. *(volatile u16*)addr = (u16)val;
10. *(volatile u16*)(addr + 2) = (u16)(val >> 16);
11. }
12. #else
Best Regards,
Seung Youl.
----- Original Message -----
From: "???" <sunnylee@probedigital.com>
To: "Ben Warren" <biggerbadderben@gmail.com>
Cc: <u-boot-users@lists.sourceforge.net>
Sent: Monday, June 30, 2008 3:02 PM
Subject: Re: [U-Boot-Users] Does U-boot support ethernet chip LAN9210 from SMSC?
> Hi Ben,
>
> I have found smc911x.c source code in which both 16 and 32 bit access are supported.
> I will test my board with this source code.
>
> Thank you.
>
> Best Regards,
> Seung Youl.
>
>
>
> ----- Original Message -----
> From: "Ben Warren" <biggerbadderben@gmail.com>
> To: "???" <sunnylee@probedigital.com>
> Cc: <u-boot-users@lists.sourceforge.net>
> Sent: Monday, June 30, 2008 2:43 PM
> Subject: Re: [U-Boot-Users] Does U-boot support ethernet chip LAN9210 from SMSC?
>
>
>> On Sun, Jun 29, 2008 at 10:06 PM, ??? <sunnylee@probedigital.com> wrote:
>>> Hi Ben,
>>>
>>> Sorry for bothering you.
>>>
>>> I have downloaded the latest version of U-boot.
>>> There is smc911x.c file. I have added this file to Makefile.
>>> The compilation is successful.
>> You don't have to add anything to the Makefile, just use the correct
>> CONFIG options
>>>
>>> But, there are two problems.
>>> 1. there is no LAN9210 entry in chip id list
>> So add it. I haven't looked at the LAN9210 data sheet to even know if
>> it will work with this chip. You're going to have to do some work.
>>> 2. Only 32-bit is supported.
>>>
>> Not true. Both 16 and 32 bit access is supported. Check the source
>> code (hint: look for CONFIG_DRIVER_SMC911X_16_BIT)
>>> Is there any recent driver for LAN9210?
>>
>> I don't know of another or I would have told you about it.
>>
>> Good luck,
>> Ben
>>
next reply other threads:[~2008-06-30 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-30 10:21 이승열 [this message]
2008-06-30 11:54 ` [U-Boot-Users] Fw: Does U-boot support ethernet chip LAN9210 from SMSC? Kenneth Johansson
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='02d401c8da9b$20600990$b301a8c0@server' \
--to=sunnylee@probedigital.com \
--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