[U-Boot] [PATCH 1/2] TI: netdev: add driver for cpsw ethernet device
Tom Rini
tom.rini at gmail.com
Fri Nov 11 15:49:03 CET 2011
On Thu, Nov 10, 2011 at 11:01 PM, Kumar Nath, Chandan
<chandan.nath at ti.com> wrote:
>
>
>> -----Original Message-----
>> From: Tom Rini [mailto:tom.rini at gmail.com]
>> Sent: Thursday, November 10, 2011 8:11 PM
>> To: Kumar Nath, Chandan
>> Cc: u-boot at lists.denx.de; Chemparathy, Cyril
>> Subject: Re: [U-Boot] [PATCH 1/2] TI: netdev: add driver for cpsw
>> ethernet device
>>
>> On Wed, Nov 9, 2011 at 10:47 PM, Kumar Nath, Chandan
>> <chandan.nath at ti.com> wrote:
>> >> -----Original Message-----
>> >> From: Tom Rini [mailto:tom.rini at gmail.com]
>> >> Sent: Friday, October 21, 2011 9:09 PM
>> >> To: Kumar Nath, Chandan
>> >> Cc: u-boot at lists.denx.de; Chemparathy, Cyril
>> >> Subject: Re: [U-Boot] [PATCH 1/2] TI: netdev: add driver for cpsw
>> >> ethernet device
>> >>
>> >> On Fri, Oct 21, 2011 at 12:02 AM, Chandan Nath <chandan.nath at ti.com>
>> >> wrote:
>> >> > From: Cyril Chemparathy <cyril at ti.com>
>> >> >
>> >> > CPSW is an on-chip ethernet switch that is found on various SoCs
>> from
>> >> Texas
>> >> > Instruments. This patch adds a simple driver (based on the Linux
>> >> driver) for
>> >> > this hardware module.
>> >>
>> >> Have you made the driver safe with dcache enabled?
>> >
>> > No, driver is not made safe with dcache enabled. Can you please tell
>> me
>> > why I need to enable dcache.
>>
>> Because we really want to enable the dcache for performance reasons.
>> Given that to enable dcache on am335x we just need:
>> #ifndef CONFIG_SYS_DCACHE_OFF
>> void enable_caches(void)
>> {
>> /* Enable D-cache. I-cache is already enabled in start.S */
>> dcache_enable();
>> }
>> #endif
>>
>> We really want to not add drivers that aren't cache safe, especially
>> when it's not a lot of work to do so.
>>
>
> I tried enabling dcache by adding above code. But when I executed dhcp command,
> it was not able to find any IP address and keeps trying infinitely.
Correct. The cpsw driver in u-boot is not cache coherent, which is
what I'm asking you to fix. Looking at the patches to make the
davinci emac driver cache cohernet might be of some help here.
--
Tom
More information about the U-Boot
mailing list