Patchwork [U-Boot] at91rm9200ek.h: explicitly disable D-Cache

login
register
mail settings
Submitter Andreas Bießmann
Date Aug. 31, 2011, 5:36 a.m.
Message ID <1314768973-94711-1-git-send-email-andreas.devel@googlemail.com>
Download mbox | patch
Permalink /patch/112448/
State Under Review
Delegated to: Reinhard Meyer
Headers show

Comments

Andreas Bießmann - Aug. 31, 2011, 5:36 a.m.
Commit c2dd0d45540397704de9b13287417d21049d34c6 enabled D-Cache for all
arm devices explicitly. This renders at91_emac driver on at91rm9200ek
unusable.

This patch disables D-Cache for at91rm9200ek explicitly to get this
driver working again.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
---
 include/configs/at91rm9200ek.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Mike Frysinger - Aug. 31, 2011, 2:34 p.m.
On Wednesday, August 31, 2011 01:36:13 Andreas Bießmann wrote:
> Commit c2dd0d45540397704de9b13287417d21049d34c6 enabled D-Cache for all
> arm devices explicitly. This renders at91_emac driver on at91rm9200ek
> unusable.

sounds like the at91_emac driver should get a small patch:
#ifndef CONFIG_SYS_DCACHE_OFF
# error "this driver sucks: define CONFIG_SYS_DCACHE_OFF until it is fixed"
#endif
-mike
Reinhard Meyer - Aug. 31, 2011, 7:51 p.m.
Dear Andreas Bießmann,
> Commit c2dd0d45540397704de9b13287417d21049d34c6 enabled D-Cache for all
> arm devices explicitly. This renders at91_emac driver on at91rm9200ek
> unusable.
>
> This patch disables D-Cache for at91rm9200ek explicitly to get this
> driver working again.

As my experience, the MACB driver does work with dcache enabled.
What are the reasons again that MACB and AT91_EMAC do coexist for the same
SoC-IP ?

Best Regards,
Reinhard
Andreas Bießmann - Aug. 31, 2011, 9:10 p.m.
Dear Reinhard Meyer,

Am 31.08.2011 um 21:51 schrieb Reinhard Meyer:

> Dear Andreas Bießmann,
>> Commit c2dd0d45540397704de9b13287417d21049d34c6 enabled D-Cache for all
>> arm devices explicitly. This renders at91_emac driver on at91rm9200ek
>> unusable.
>> 
>> This patch disables D-Cache for at91rm9200ek explicitly to get this
>> driver working again.
> 
> As my experience, the MACB driver does work with dcache enabled.
> What are the reasons again that MACB and AT91_EMAC do coexist for the same
> SoC-IP ?

The at91rm9200 emac seems to be a older version of the current (E)MAC(B) implementations. Some registers not available there, some flags have other places ... but maybe this could be done with the same driver.
I just wonder why the linux kernel also have an at91-ether and dedicated macb driver?

best regards

Andreas Bießmann

Patch

diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index b847798..b8d1f74 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -219,6 +219,11 @@ 
 		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 
 /*
+ * Cache settings
+ */
+#define CONFIG_SYS_DCACHE_OFF
+
+/*
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + SZ_128K, \