Patchwork [U-Boot,01/12] da850: indicate cache usage disable in config file

login
register
mail settings
Submitter nagabhushana.netagunte@ti.com
Date Aug. 2, 2011, 3:43 p.m.
Message ID <1312299792-16415-2-git-send-email-nagabhushana.netagunte@ti.com>
Download mbox | patch
Permalink /patch/107952/
State Superseded
Headers show

Comments

nagabhushana.netagunte@ti.com - Aug. 2, 2011, 3:43 p.m.
From: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>

As per new cache management framework, if the caches are not used
in u-boot, it needs to be explicitly indicated through macros in
config file. da850 doesnt support I-CACHE, D-CACHE or L2-CACHE
usage in u-boot which is indicated by the following macro definitions,

1. CONFIG_SYS_ICACHE_OFF
2. CONFIG_SYS_DCACHE_OFF
3. CONFIG_SYS_L2CACHE_OFF

Signed-off-by: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>
---
 include/configs/da850evm.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Wolfgang Denk - Aug. 2, 2011, 4:06 p.m.
Dear nagabhushana.netagunte@ti.com,

In message <1312299792-16415-2-git-send-email-nagabhushana.netagunte@ti.com> you wrote:
> From: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>
> 
> As per new cache management framework, if the caches are not used
> in u-boot, it needs to be explicitly indicated through macros in
> config file. da850 doesnt support I-CACHE, D-CACHE or L2-CACHE
> usage in u-boot which is indicated by the following macro definitions,

What exactly does this mean?  Does it mean that

1) the hardware does not have working caches, so there is no chance to
   ever add such support in software?

2) the hardware does have working caches, but this current software
   support is simple / incomplete, and cache support will be added
   later?

3) ... ?

Best regards,

Wolfgang Denk
Laurence Withers - Aug. 2, 2011, 7:37 p.m.
On Tue, Aug 02, 2011 at 06:06:42PM +0200, Wolfgang Denk wrote:
> Dear nagabhushana.netagunte@ti.com,
> 
> In message <1312299792-16415-2-git-send-email-nagabhushana.netagunte@ti.com> you wrote:
> > From: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>
> > 
> > As per new cache management framework, if the caches are not used
> > in u-boot, it needs to be explicitly indicated through macros in
> > config file. da850 doesnt support I-CACHE, D-CACHE or L2-CACHE
> > usage in u-boot which is indicated by the following macro definitions,
> 
> What exactly does this mean?  Does it mean that
> 
> 1) the hardware does not have working caches, so there is no chance to
>    ever add such support in software?
> 
> 2) the hardware does have working caches, but this current software
>    support is simple / incomplete, and cache support will be added
>    later?

I am also working on a U-Boot port to a DA850-based board, and I can confirm
that both I-cache and D-cache do work correctly. However, there are cache
coherency issues when using the Ethernet driver (DaVinci EMAC). There may
also be other drivers that fail similarly.

If driver issues are the reason for disabling the caches then the commit
message should reflect this.

Bye for now,
nagabhushana.netagunte@ti.com - Aug. 9, 2011, 1:44 p.m.
Hi Laurence,

Thanks for the info about cache coherency issues with DAVINCI EMAC.
I will make appropriate changes to commit message.

Thanks,
Nag

On Wed, Aug 03, 2011 at 01:07:36, Laurence Withers wrote:
> On Tue, Aug 02, 2011 at 06:06:42PM +0200, Wolfgang Denk wrote:
> > Dear nagabhushana.netagunte@ti.com,
> > 
> > In message <1312299792-16415-2-git-send-email-nagabhushana.netagunte@ti.com> you wrote:
> > > From: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>
> > > 
> > > As per new cache management framework, if the caches are not used in 
> > > u-boot, it needs to be explicitly indicated through macros in config 
> > > file. da850 doesnt support I-CACHE, D-CACHE or L2-CACHE usage in 
> > > u-boot which is indicated by the following macro definitions,
> > 
> > What exactly does this mean?  Does it mean that
> > 
> > 1) the hardware does not have working caches, so there is no chance to
> >    ever add such support in software?
> > 
> > 2) the hardware does have working caches, but this current software
> >    support is simple / incomplete, and cache support will be added
> >    later?
> 
> I am also working on a U-Boot port to a DA850-based board, and I can confirm that both I-cache and D-cache do work correctly. However, there are cache coherency issues when using the Ethernet driver (DaVinci EMAC). There may also be other drivers that fail similarly.
> 
> If driver issues are the reason for disabling the caches then the commit message should reflect this.
> 
> Bye for now,
> -- 
> Laurence Withers, <lwithers@guralp.com>                http://www.guralp.com/
> Direct tel:+447753988197 or tel:+443333408643               Software Engineer
> General support queries: <support@guralp.com>         CMG-DCM CMG-EAM CMG-NAM
>
nagabhushana.netagunte@ti.com - Aug. 9, 2011, 1:54 p.m.
Thanks Denk for comments.

I will add appropriate reasons in commit message and resubmit the patch.

Regards,
Nag
On Tue, Aug 02, 2011 at 21:36:42, Wolfgang Denk wrote:
> Dear nagabhushana.netagunte@ti.com,
> 
> In message <1312299792-16415-2-git-send-email-nagabhushana.netagunte@ti.com> you wrote:
> > From: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>
> > 
> > As per new cache management framework, if the caches are not used in 
> > u-boot, it needs to be explicitly indicated through macros in config 
> > file. da850 doesnt support I-CACHE, D-CACHE or L2-CACHE usage in 
> > u-boot which is indicated by the following macro definitions,
> 
> What exactly does this mean?  Does it mean that
> 
> 1) the hardware does not have working caches, so there is no chance to
>    ever add such support in software?
> 
> 2) the hardware does have working caches, but this current software
>    support is simple / incomplete, and cache support will be added
>    later?
> 
> 3) ... ?
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Some people march to the beat of a different drummer. And some people tango!
>

Patch

diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index bbb5a9b..fdcc6e3 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -42,6 +42,9 @@ 
 #define CONFIG_SYS_HZ			1000
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_SYS_TEXT_BASE		0xc1080000
+#define CONFIG_SYS_ICACHE_OFF
+#define CONFIG_SYS_DCACHE_OFF
+#define CONFIG_SYS_L2CACHE_OFF
 
 /*
  * Memory Info