[U-Boot-Users] Fw: Does U-boot support ethernet chip LAN9210 from SMSC?

이승열 sunnylee at probedigital.com
Mon Jun 30 12:21:54 CEST 2008


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 at probedigital.com>
To: "Ben Warren" <biggerbadderben at gmail.com>
Cc: <u-boot-users at 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 at gmail.com>
> To: "이승열" <sunnylee at probedigital.com>
> Cc: <u-boot-users at 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 at 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
>>


More information about the U-Boot mailing list