* [U-Boot] Conflicting definitions of flush_dcache
@ 2011-10-31 7:56 Stefan Kristiansson
2011-10-31 18:32 ` Mike Frysinger
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kristiansson @ 2011-10-31 7:56 UTC (permalink / raw)
To: u-boot
Hi,
I noticed the following dilemma when I tried to enable both
CONFIG_ETHOC and CONFIG_CMD_CACHE:
The ethoc ethernet driver expects:
void flush_dcache(unsigned long start, unsigned long size)
while cmd_cache.c expect it to be:
void flush_dcache(void)
Grepping around the sources, I found that apart from drivers/net/ethoc.c
also drivers/net/altera_tse.c uses flush_dcache with the two ulong parameters.
No architecture apart from nios2 seems to provide flush_dcache like this
and flush_dcache is not declared in common.h,
so my gut feeling is that nios2 and the 2 ethernet drivers should be
changed to use for example flush_dcache_range(?)
Perhaps cmd_cache.c should also be fixed to use flush_dcache_all()?
flush_icache() ofcourse suffer from the same problem.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Conflicting definitions of flush_dcache
2011-10-31 7:56 [U-Boot] Conflicting definitions of flush_dcache Stefan Kristiansson
@ 2011-10-31 18:32 ` Mike Frysinger
2011-11-01 2:01 ` Thomas Chou
2011-11-01 4:21 ` [U-Boot] [PATCH] cmd_cache: use cache/invalidate functions available in common.h Stefan Kristiansson
0 siblings, 2 replies; 6+ messages in thread
From: Mike Frysinger @ 2011-10-31 18:32 UTC (permalink / raw)
To: u-boot
On Monday 31 October 2011 03:56:25 Stefan Kristiansson wrote:
> so my gut feeling is that nios2 and the 2 ethernet drivers should be
> changed to use for example flush_dcache_range(?)
correct
> Perhaps cmd_cache.c should also be fixed to use flush_dcache_all()?
> flush_icache() ofcourse suffer from the same problem.
that sounds reasonable. the prototypes also need to get added to
include/common.h ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111031/2d6ed692/attachment.pgp
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Conflicting definitions of flush_dcache
2011-10-31 18:32 ` Mike Frysinger
@ 2011-11-01 2:01 ` Thomas Chou
2011-11-01 4:21 ` [U-Boot] [PATCH] cmd_cache: use cache/invalidate functions available in common.h Stefan Kristiansson
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Chou @ 2011-11-01 2:01 UTC (permalink / raw)
To: u-boot
On 11/01/2011 02:32 AM, Mike Frysinger wrote:
> On Monday 31 October 2011 03:56:25 Stefan Kristiansson wrote:
>> so my gut feeling is that nios2 and the 2 ethernet drivers should be
>> changed to use for example flush_dcache_range(?)
>
> correct
Thanks. I will fix the nios2 and the two net drivers to use
flush_dcache_range(?).
- Thomas
>
>> Perhaps cmd_cache.c should also be fixed to use flush_dcache_all()?
>> flush_icache() ofcourse suffer from the same problem.
>
> that sounds reasonable. the prototypes also need to get added to
> include/common.h ...
> -mike
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] cmd_cache: use cache/invalidate functions available in common.h
2011-10-31 18:32 ` Mike Frysinger
2011-11-01 2:01 ` Thomas Chou
@ 2011-11-01 4:21 ` Stefan Kristiansson
2011-11-01 15:17 ` Mike Frysinger
2012-03-06 21:13 ` Wolfgang Denk
1 sibling, 2 replies; 6+ messages in thread
From: Stefan Kristiansson @ 2011-11-01 4:21 UTC (permalink / raw)
To: u-boot
flush_dcache()/flush_icache() aren't defined in common.h,
flush_dcache_all()/invalidate_icache_all() however are.
Let the icache and dcache commands use those instead.
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
---
common/cmd_cache.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/common/cmd_cache.c b/common/cmd_cache.c
index 9778d3b..360136c 100644
--- a/common/cmd_cache.c
+++ b/common/cmd_cache.c
@@ -30,10 +30,10 @@
static int parse_argv(const char *);
-void __weak flush_icache(void)
+void __weak invalidate_icache_all(void)
{
- /* please define arch specific flush_icache */
- puts("No arch specific flush_icache available!\n");
+ /* please define arch specific invalidate_icache_all */
+ puts("No arch specific invalidate_icache_all available!\n");
}
int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -45,7 +45,7 @@ int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
break;
case 1: icache_enable ();
break;
- case 2: flush_icache();
+ case 2: invalidate_icache_all();
break;
}
/* FALL TROUGH */
@@ -59,10 +59,10 @@ int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
-void __weak flush_dcache(void)
+void __weak flush_dcache_all(void)
{
- puts("No arch specific flush_dcache available!\n");
- /* please define arch specific flush_dcache */
+ puts("No arch specific flush_dcache_all available!\n");
+ /* please define arch specific flush_dcache_all */
}
int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -74,7 +74,7 @@ int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
break;
case 1: dcache_enable ();
break;
- case 2: flush_dcache();
+ case 2: flush_dcache_all();
break;
}
/* FALL TROUGH */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] cmd_cache: use cache/invalidate functions available in common.h
2011-11-01 4:21 ` [U-Boot] [PATCH] cmd_cache: use cache/invalidate functions available in common.h Stefan Kristiansson
@ 2011-11-01 15:17 ` Mike Frysinger
2012-03-06 21:13 ` Wolfgang Denk
1 sibling, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2011-11-01 15:17 UTC (permalink / raw)
To: u-boot
i think the ppc guys might need to rename some of their funcs, and it seems
like boards/drivers that use these are ppc-only, so there probably won't be
any tree breakage ...
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111101/8cf5a6ad/attachment.pgp
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] cmd_cache: use cache/invalidate functions available in common.h
2011-11-01 4:21 ` [U-Boot] [PATCH] cmd_cache: use cache/invalidate functions available in common.h Stefan Kristiansson
2011-11-01 15:17 ` Mike Frysinger
@ 2012-03-06 21:13 ` Wolfgang Denk
1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2012-03-06 21:13 UTC (permalink / raw)
To: u-boot
Dear Stefan Kristiansson,
In message <1320121272-17613-1-git-send-email-stefan.kristiansson@saunalahti.fi> you wrote:
> flush_dcache()/flush_icache() aren't defined in common.h,
> flush_dcache_all()/invalidate_icache_all() however are.
>
> Let the icache and dcache commands use those instead.
>
> Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> ---
> common/cmd_cache.c | 16 ++++++++--------
> 1 files changed, 8 insertions(+), 8 deletions(-)
Applied, thanks.
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 at denx.de
"The lesser of two evils -- is evil." - Seymour (Sy) Leon
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-06 21:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-31 7:56 [U-Boot] Conflicting definitions of flush_dcache Stefan Kristiansson
2011-10-31 18:32 ` Mike Frysinger
2011-11-01 2:01 ` Thomas Chou
2011-11-01 4:21 ` [U-Boot] [PATCH] cmd_cache: use cache/invalidate functions available in common.h Stefan Kristiansson
2011-11-01 15:17 ` Mike Frysinger
2012-03-06 21:13 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox