ARM: Clean arm/lib/cache.c, modify ARM1136 and ARM926 accordingly
cover ARM: Clean arm/lib/cache.c, modify ARM1136 and ARM926 accordingly
This series try to clean the code of arch/arm/lib/cache.c Move ARM1136 cache operations into cpu/arm1136/cache.c Add ARM926EJS cache operations into cpu/arm926ejs/cache.c
Hong Xu (3):
ARM: Clean arch/arm/lib/cache.c
ARM: ARM1136 - Remove flush_cache from arch/arm/lib/cache.c
ARM: ARM926EJS - Add cache operations
arch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++ arch/arm/cpu/arm926ejs/Makefile | 2 +- arch/arm/cpu/arm926ejs/cache.c | 142 +++++++++++++++++++++++++++++++++++++++ arch/arm/lib/cache.c | 55 +++++++++------- 5 files changed, 208 insertions(+), 26 deletions(-)
create mode 100644 arch/arm/cpu/arm1136/cache.c create mode 100644 arch/arm/cpu/arm926ejs/cache.c
PATCH 1/3 ARM: Clean arch/arm/lib/cache.c
The default cache operations defined in arch/arm/lib/cache.c do not perform any real cache operation, and instead a WARNING will be emitted.
--- arch/arm/lib/cache.c | 55 ++++++++++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 24 deletions(-)
arch/arm/lib/cache.c +31 -24
@@ -20,36 +20,43 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#include <linux/compiler.h> +#include <common.h> -/* for now: just dummy functions to satisfy the linker */ +#define EMIT_WARNING printf("WARNING: %s - CPU cache operation is not " \ +"implemented!\n", __func__) -#include <common.h> +/* +* Default implementations +* +* Warn user if CPU code does not implement necessary cache functions +*/ +void __weak flush_cache (unsigned long start,unsigned long size) +{ +EMIT_WARNING ; +} -void __flush_cache (unsigned long start,unsigned long size) +void __weak flush_dcache_all (void ) { -#if defined(CONFIG_OMAP2420 ) || defined(CONFIG_ARM1136 ) -void arm1136_cache_flush (void ); +EMIT_WARNING ; +} -arm1136_cache_flush (); -#endif -#ifdef CONFIG_ARM926EJS -/* test and clean, page 2-23 of arm926ejs manual */ - asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : :"memory" ); -/* disable write buffer as well (page 2-22) */ - asm("mcr p15, 0, %0, c7, c10, 4" : :"r" (0 )); -#endif -return ; +void __weak flush_dcache_range (unsigned long start,unsigned long stop) +{ +EMIT_WARNING ; } -void flush_cache (unsigned long start,unsigned long size) - __attribute__((weak,alias ("__flush_cache" ))); -/* -* Default implementation: -* do a range flush for the entire range -*/ -void __flush_dcache_all (void ) +void __weak invalidate_dcache_range (unsigned long start,unsigned long stop) +{ +EMIT_WARNING ; +} + +void __weak invalidate_dcache_all (void ) +{ +EMIT_WARNING ; +} + +void __weak invalidate_icache_all (void ) { -flush_cache (0 , ~0 ); +EMIT_WARNING ; } -void flush_dcache_all (void ) - __attribute__((weak,alias ("__flush_dcache_all" )));
Signature · 1 line
1.7.6
PATCH 1/3 ARM: Clean arch/arm/lib/cache.c
In reply to Hong XuThe default cache operations defined in arch/arm/lib/cache.c do not perform any real cache operation, and instead a WARNING will be emitted.
--- arch/arm/lib/cache.c | 55 ++++++++++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 24 deletions(-)
arch/arm/lib/cache.c +31 -24
@@ -20,36 +20,43 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#include <linux/compiler.h> +#include <common.h> -/* for now: just dummy functions to satisfy the linker */ +#define EMIT_WARNING printf("WARNING: %s - CPU cache operation is not " \ +"implemented!\n", __func__) -#include <common.h> +/* +* Default implementations +* +* Warn user if CPU code does not implement necessary cache functions +*/ +void __weak flush_cache (unsigned long start,unsigned long size) +{ +EMIT_WARNING ; +} -void __flush_cache (unsigned long start,unsigned long size) +void __weak flush_dcache_all (void ) { -#if defined(CONFIG_OMAP2420 ) || defined(CONFIG_ARM1136 ) -void arm1136_cache_flush (void ); +EMIT_WARNING ; +} -arm1136_cache_flush (); -#endif -#ifdef CONFIG_ARM926EJS -/* test and clean, page 2-23 of arm926ejs manual */ - asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : :"memory" ); -/* disable write buffer as well (page 2-22) */ - asm("mcr p15, 0, %0, c7, c10, 4" : :"r" (0 )); -#endif -return ; +void __weak flush_dcache_range (unsigned long start,unsigned long stop) +{ +EMIT_WARNING ; } -void flush_cache (unsigned long start,unsigned long size) - __attribute__((weak,alias ("__flush_cache" ))); -/* -* Default implementation: -* do a range flush for the entire range -*/ -void __flush_dcache_all (void ) +void __weak invalidate_dcache_range (unsigned long start,unsigned long stop) +{ +EMIT_WARNING ; +} + +void __weak invalidate_dcache_all (void ) +{ +EMIT_WARNING ; +} + +void __weak invalidate_icache_all (void ) { -flush_cache (0 , ~0 ); +EMIT_WARNING ; } -void flush_dcache_all (void ) - __attribute__((weak,alias ("__flush_dcache_all" )));
Signature · 1 line
1.7.6
PATCH 1/3 ARM: Clean arch/arm/lib/cache.c
Quoted 21 lines · Hong Xu
The default cache operations defined in
arch/arm/lib/cache.cdo not perform any real cache operation, and instead a WARNING will be emitted.Signed-off-by Hong Xu <[email protected]>Tested-by Elen Song <[email protected]>CC Albert Aribaud <[email protected]>CC Aneesh V <[email protected]>CC Marek Vasut <[email protected]>CC Reinhard Meyer <[email protected]>CC Heiko Schocher <[email protected]>--- arch/arm/lib/cache.c | 55++++++++++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 24 deletions(-)
arch/arm/lib/cache.c +0
-0
arch/arm/lib/cache.c line 27
Quoted 9 lines
arch/arm/lib/cache.c +4
-1@@ -20,36 +20,43 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#include <linux/compiler.h> +#include <common.h> -/* for now: just dummy functions to satisfy the linker */ +#define EMIT_WARNING printf("WARNING: %s - CPU cache operation is not " \ +"implemented!\n", __func__)
Maybe use debug() ? Or make the emission of warning conditional, somehow I have the feeling this will make some people unhappy.
Otherwise looks nice and clean.
Quoted 58 lines
arch/arm/lib/cache.c +26
-23-#include <common.h> +/* +* Default implementations +* +* Warn user if CPU code does not implement necessary cache functions +*/ +void __weak flush_cache (unsigned long start,unsigned long size) +{ +EMIT_WARNING ; +} -void __flush_cache (unsigned long start,unsigned long size) +void __weak flush_dcache_all (void ) { -#if defined(CONFIG_OMAP2420 ) || defined(CONFIG_ARM1136 ) -void arm1136_cache_flush (void ); +EMIT_WARNING ; +} -arm1136_cache_flush (); -#endif -#ifdef CONFIG_ARM926EJS -/* test and clean, page 2-23 of arm926ejs manual */ - asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : :"memory" ); -/* disable write buffer as well (page 2-22) */ - asm("mcr p15, 0, %0, c7, c10, 4" : :"r" (0 )); -#endif -return ; +void __weak flush_dcache_range (unsigned long start,unsigned long stop) +{ +EMIT_WARNING ; } -void flush_cache (unsigned long start,unsigned long size) - __attribute__((weak,alias ("__flush_cache" ))); -/* -* Default implementation: -* do a range flush for the entire range -*/ -void __flush_dcache_all (void ) +void __weak invalidate_dcache_range (unsigned long start,unsigned long stop) +{ +EMIT_WARNING ; +} + +void __weak invalidate_dcache_all (void ) +{ +EMIT_WARNING ; +} + +void __weak invalidate_icache_all (void ) { -flush_cache (0 , ~0 ); +EMIT_WARNING ; } -void flush_dcache_all (void ) - __attribute__((weak,alias ("__flush_dcache_all" )));
PATCH 1/3 ARM: Clean arch/arm/lib/cache.c
Hi Marek,
Quoted 28 lines · Marek Vasut
Quoted 27 lines · Hong Xu
The default cache operations defined in
arch/arm/lib/cache.cdo not perform any real cache operation, and instead a WARNING will be emitted.Signed-off-by Hong Xu<[email protected]>Tested-by Elen Song<[email protected]>CC Albert Aribaud<[email protected]>CC Aneesh V<[email protected]>CC Marek Vasut<[email protected]>CC Reinhard Meyer<[email protected]>CC Heiko Schocher<[email protected]>--- arch/arm/lib/cache.c | 55++++++++++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 24 deletions(-)
arch/arm/lib/cache.c +2
-0@@ -20,36 +20,43 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#include <linux/compiler.h> +#include <common.h>
Quoted 6 lines
arch/arm/lib/cache.c line 27
Quoted 3 lines
arch/arm/lib/cache.c +2
-1-/* for now: just dummy functions to satisfy the linker */ +#define EMIT_WARNING printf("WARNING: %s - CPU cache operation is not " \ +"implemented!\n", __func__)Maybe use
debug()? Or make the emission of warning conditional, somehow I have the feeling this will make some people unhappy.
Just my feelings: It's noisy but it'll give strong message to the user even if the DEBUG is not opened :-)
BR,
Eric
Quoted 4 lines
Otherwise looks nice and clean.
Quoted 3 lines
arch/arm/lib/cache.c +1
-1-#include <common.h> +/*
[...]
PATCH 1/3 ARM: Clean arch/arm/lib/cache.c
Quoted 42 lines · Hong Xu
Hi Marek,
Quoted 32 lines · Marek Vasut
Quoted 31 lines · Hong Xu
The default cache operations defined in
arch/arm/lib/cache.cdo not perform any real cache operation, and instead a WARNING will be emitted.Signed-off-by Hong Xu<[email protected]>Tested-by Elen Song<[email protected]>CC Albert Aribaud<[email protected]>CC Aneesh V<[email protected]>CC Marek Vasut<[email protected]>CC Reinhard Meyer<[email protected]>CC Heiko Schocher<[email protected]>---
arch/arm/lib/cache.c | 55++++++++++++++++++++++++++++--------------------- 1 files changed, 31 insertions(+), 24 deletions(-)
arch/arm/lib/cache.c +2
-0@@ -20,36 +20,43 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#include <linux/compiler.h> +#include <common.h> Quoted 6 lines
arch/arm/lib/cache.c line 29
Quoted 3 lines
arch/arm/lib/cache.c +1
-1-/* for now: just dummy functions to satisfy the linker */ +#define EMIT_WARNING printf("WARNING: %s - CPU cache operation is not " \ +"implemented!\n", __func__)Maybe use
debug()? Or make the emission of warning conditional, somehow I have the feeling this will make some people unhappy.
Quoted 2 lines
Just my feelings: It's noisy but it'll give strong message to the user even if the DEBUG is not opened :-)
That's not my point, it'll likely become noisy on many boards where cache flushing/invalidating isn't necessary and where is wasn't noisy before and noone cared for it not being implemented.
I'd prefer to see other people thoughts on this.
Cheers
Quoted 10 lines
BR,
EricQuoted 4 lines
Otherwise looks nice and clean.
Quoted 2 lines
arch/arm/lib/cache.c +1
-1-#include <common.h> +/* [...]
PATCH 2/3 ARM: ARM1136 - Remove flush_cache from arch/arm/lib/cache.c
In reply to Hong Xuarch/arm/lib/cache.c is cleaned and no real cache operation will be defined in this file. So a new file arch/arm/cpu/arm1136/cache.c is created. This file will define the real cache operations.
--- arch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm1136/cache.c
arch/arm/cpu/arm1136/Makefile +1 -1
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).o START = start.o -COBJS = cpu.o +COBJS = cpu.o cache.o SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
arch/arm/cpu/arm1136/cache.c new file +33 -0
@@ -0,0 +1,33 @@ +/* +* (C) Copyright 2002 +* Wolfgang Denk, DENX Software Engineering, wd at denx.de. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> + +void flush_cache (unsigned long start,unsigned long size) +{ +#if defined(CONFIG_OMAP2420 ) || defined(CONFIG_ARM1136 ) +void arm1136_cache_flush (void ); + +arm1136_cache_flush (); +#endif +}
Signature · 1 line
1.7.6
PATCH 2/3 ARM: ARM1136 - Remove flush_cache from arch/arm/lib/cache.c
In reply to Hong Xuarch/arm/lib/cache.c is cleaned and no real cache operation will be defined in this file. So a new file arch/arm/cpu/arm1136/cache.c is created. This file will define the real cache operations.
--- arch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm1136/cache.c
arch/arm/cpu/arm1136/Makefile +1 -1
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).o START = start.o -COBJS = cpu.o +COBJS = cpu.o cache.o SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
arch/arm/cpu/arm1136/cache.c new file +33 -0
@@ -0,0 +1,33 @@ +/* +* (C) Copyright 2002 +* Wolfgang Denk, DENX Software Engineering, wd at denx.de. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> + +void flush_cache (unsigned long start,unsigned long size) +{ +#if defined(CONFIG_OMAP2420 ) || defined(CONFIG_ARM1136 ) +void arm1136_cache_flush (void ); + +arm1136_cache_flush (); +#endif +}
Signature · 1 line
1.7.6
PATCH 2/3 ARM: ARM1136 - Remove flush_cache from arch/arm/lib/cache.c
Quoted 36 lines · Hong Xu
arch/arm/lib/cache.cis cleaned and no real cache operation will be defined in this file. So a new filearch/arm/cpu/arm1136/cache.cis created. This file will define the real cache operations.Signed-off-by Hong Xu <[email protected]>Tested-by Elen Song <[email protected]>CC Albert Aribaud <[email protected]>CC Aneesh V <[email protected]>CC Marek Vasut <[email protected]>CC Reinhard Meyer <[email protected]>CC Heiko Schocher <[email protected]>--- arch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm1136/cache.carch/arm/cpu/arm1136/Makefile +1
-1@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).o START = start.o -COBJS = cpu.o +COBJS = cpu.o cache.o SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))arch/arm/cpu/arm1136/cache.c new file +0
-0
arch/arm/cpu/arm1136/cache.c line 3
Quoted 3 lines
arch/arm/cpu/arm1136/cache.c new file +3
-0@@ -0,0 +1,33 @@ +/* +* (C) Copyright 2002 +* Wolfgang Denk, DENX Software Engineering, wd at denx.de.
Really ?
Quoted 15 lines
arch/arm/cpu/arm1136/cache.c new file +15
-0+* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License
arch/arm/cpu/arm1136/cache.c line 28
Quoted 10 lines
arch/arm/cpu/arm1136/cache.c new file +10
-0+* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> + +void flush_cache (unsigned long start,unsigned long size) +{ +#if defined(CONFIG_OMAP2420 ) || defined(CONFIG_ARM1136 )
Hm, this is in cpu/arm1136/cache.c ... do we need the macro ?
You can test if this breaks anything by MAKEALL script in uboot tree.
Quoted 5 lines
arch/arm/cpu/arm1136/cache.c new file +5
-0+void arm1136_cache_flush (void ); + +arm1136_cache_flush (); +#endif +}
PATCH 2/3 ARM: ARM1136 - Remove flush_cache from arch/arm/lib/cache.c
Quoted 29 lines · Marek Vasut
Quoted 28 lines · Hong Xu
arch/arm/lib/cache.cis cleaned and no real cache operation will be defined in this file. So a new filearch/arm/cpu/arm1136/cache.cis created. This file will define the real cache operations.Signed-off-by Hong Xu<[email protected]>Tested-by Elen Song<[email protected]>CC Albert Aribaud<[email protected]>CC Aneesh V<[email protected]>CC Marek Vasut<[email protected]>CC Reinhard Meyer<[email protected]>CC Heiko Schocher<[email protected]>--- arch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletions(-)create mode 100644
arch/arm/cpu/arm1136/cache.carch/arm/cpu/arm1136/Makefile +1
-1@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).o START = start.o -COBJS = cpu.o +COBJS = cpu.o cache.o
Quoted 13 lines
arch/arm/cpu/arm1136/cache.c line 3
Quoted 11 lines
arch/arm/cpu/arm1136/Makefile +0
-0SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))arch/arm/cpu/arm1136/cache.c new file +3
-0@@ -0,0 +1,33 @@ +/* +* (C) Copyright 2002 +* Wolfgang Denk, DENX Software Engineering, wd at denx.de. Really ?
not sure...
Maybe add a copyright line on top of it?
Quoted 29 lines
Quoted 16 lines
arch/arm/cpu/arm1136/cache.c new file +15
-0+* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License arch/arm/cpu/arm1136/cache.c line 28
Quoted 10 lines
arch/arm/cpu/arm1136/cache.c new file +10
-0+* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> + +void flush_cache (unsigned long start,unsigned long size) +{ +#if defined(CONFIG_OMAP2420 ) || defined(CONFIG_ARM1136 )Hm, this is in
cpu/arm1136/cache.c... do we need the macro ?
Quoted 1 line
You can test if this breaks anything by MAKEALL script in uboot tree.
Thanks, I'll have a close look at it.
BR,
Eric
Quoted 5 lines
Quoted 5 lines
arch/arm/cpu/arm1136/cache.c new file +5
-0+void arm1136_cache_flush (void ); + +arm1136_cache_flush (); +#endif +}
PATCH 2/3 ARM: ARM1136 - Remove flush_cache from arch/arm/lib/cache.c
Quoted 48 lines · Hong Xu
Quoted 35 lines · Marek Vasut
Quoted 34 lines · Hong Xu
arch/arm/lib/cache.cis cleaned and no real cache operation will be defined in this file. So a new filearch/arm/cpu/arm1136/cache.cis created. This file will define the real cache operations.Signed-off-by Hong Xu<[email protected]>Tested-by Elen Song<[email protected]>CC Albert Aribaud<[email protected]>CC Aneesh V<[email protected]>CC Marek Vasut<[email protected]>CC Reinhard Meyer<[email protected]>CC Heiko Schocher<[email protected]>---
arch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletions(-)create mode 100644
arch/arm/cpu/arm1136/cache.c(quoted diff) +0
-0b/arch/arm/cpu/arm1136/Makefile index 930e0d1..5b5f330 100644
arch/arm/cpu/arm1136/Makefile +1
-1@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).o START = start.o -COBJS = cpu.o +COBJS = cpu.o cache.oSRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))Quoted 11 lines
arch/arm/cpu/arm1136/cache.c line 3
Quoted 9 lines
arch/arm/cpu/arm1136/cache.c new file +3
-0@@ -0,0 +1,33 @@ +/* +* (C) Copyright 2002 +* Wolfgang Denk, DENX Software Engineering, wd at denx.de. Really ?
Quoted 2 lines
not sure...
Maybe add a copyright line on top of it?
I guess replacing it altogether would be a way to go. It's your code afterall, right?
Quoted 29 lines
Quoted 29 lines
Quoted 16 lines
arch/arm/cpu/arm1136/cache.c new file +15
-0+* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License arch/arm/cpu/arm1136/cache.c line 28
Quoted 10 lines
arch/arm/cpu/arm1136/cache.c new file +10
-0+* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> + +void flush_cache (unsigned long start,unsigned long size) +{ +#if defined(CONFIG_OMAP2420 ) || defined(CONFIG_ARM1136 )Hm, this is in
cpu/arm1136/cache.c... do we need the macro ?
Quoted 3 lines
Quoted 1 line
You can test if this breaks anything by MAKEALL script in uboot tree.
Thanks, I'll have a close look at it.
Thanks :)
Quoted 9 lines
BR,
EricQuoted 5 lines
Quoted 5 lines
arch/arm/cpu/arm1136/cache.c new file +5
-0+void arm1136_cache_flush (void ); + +arm1136_cache_flush (); +#endif +}
PATCH 2/3 ARM: ARM1136 - Remove flush_cache from arch/arm/lib/cache.c
In reply to Hong XuDear Hong Xu,
Quoted 11 lines · In message <[email protected]> you wrote:
arch/arm/lib/cache.cis cleaned and no real cache operation will be defined in this file. So a new filearch/arm/cpu/arm1136/cache.cis created. This file will define the real cache operations.Signed-off-by Hong Xu <[email protected]>Tested-by Elen Song <[email protected]>CC Albert Aribaud <[email protected]>CC Aneesh V <[email protected]>CC Marek Vasut <[email protected]>CC Reinhard Meyer <[email protected]>CC Heiko Schocher <[email protected]>
Quoted 5 lines
--- arch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm1136/cache.c
Checkpatch says:
WARNING: externs should be avoided in .c files
#143: FILE: arch/arm/cpu/arm1136/cache.c:29:
+ void arm1136_cache_flush(void);
Please clean up and resubmit. Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
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 Time is fluid ... like a river with currents, eddies, backwash. -- Spock, "The City on the Edge of Forever", stardate 3134.0
PATCH 3/3 ARM: ARM926EJS - Add cache operations
In reply to Hong XuAdd a new file arch/arm/cpu/arm926ejs/cache.c and put cache operations into this file.
--- arch/arm/cpu/arm926ejs/Makefile | 2 +- arch/arm/cpu/arm926ejs/cache.c | 142 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/cache.c
arch/arm/cpu/arm926ejs/Makefile +1 -1
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).o START = start.o -COBJS = cpu.o +COBJS = cpu.o cache.o SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
arch/arm/cpu/arm926ejs/cache.c new file +142 -0
142 lines not on this page · raw message
Signature · 1 line
1.7.6
PATCH 3/3 ARM: ARM926EJS - Add cache operations
In reply to Hong XuAdd a new file arch/arm/cpu/arm926ejs/cache.c and put cache operations into this file.
--- arch/arm/cpu/arm926ejs/Makefile | 2 +- arch/arm/cpu/arm926ejs/cache.c | 142 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/cache.c
arch/arm/cpu/arm926ejs/Makefile +1 -1
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).o START = start.o -COBJS = cpu.o +COBJS = cpu.o cache.o SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
arch/arm/cpu/arm926ejs/cache.c new file +142 -0
142 lines not on this page · raw message
Signature · 1 line
1.7.6
cover ARM: Clean arm/lib/cache.c, modify ARM1136 and ARM926 accordingly
In reply to Hong XuQuoted 8 lines · Hong Xu
This series try to clean the code of
arch/arm/lib/cache.cMove ARM1136 cache operations intocpu/arm1136/cache.cAdd ARM926EJS cache operations intocpu/arm926ejs/cache.cHong Xu (3):
ARM: Cleanarch/arm/lib/cache.c
ARM: ARM1136 - Removeflush_cachefromarch/arm/lib/cache.c
ARM: ARM926EJS - Add cache operations
Hong,
Thanks a lot ! Let me review now :)
Quoted 10 lines
arch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++ arch/arm/cpu/arm926ejs/Makefile | 2 +- arch/arm/cpu/arm926ejs/cache.c | 142 +++++++++++++++++++++++++++++++++++++++ arch/arm/lib/cache.c | 55 +++++++++------- 5 files changed, 208 insertions(+), 26 deletions(-)create mode 100644
arch/arm/cpu/arm1136/cache.ccreate mode 100644arch/arm/cpu/arm926ejs/cache.c
cover ARM: Clean arm/lib/cache.c, modify ARM1136 and ARM926 accordingly
In reply to Hong XuQuoted 3 lines · Hong Xu
This series try to clean the code of
arch/arm/lib/cache.cMove ARM1136 cache operations intocpu/arm1136/cache.cAdd ARM926EJS cache operations intocpu/arm926ejs/cache.c
Hi,
any updates?
Thanks, cheers!
Quoted 15 lines
Hong Xu (3):
ARM: Cleanarch/arm/lib/cache.c
ARM: ARM1136 - Removeflush_cachefromarch/arm/lib/cache.c
ARM: ARM926EJS - Add cache operationsarch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++ arch/arm/cpu/arm926ejs/Makefile | 2 +- arch/arm/cpu/arm926ejs/cache.c | 142 +++++++++++++++++++++++++++++++++++++++ arch/arm/lib/cache.c | 55 +++++++++------- 5 files changed, 208 insertions(+), 26 deletions(-)create mode 100644
arch/arm/cpu/arm1136/cache.ccreate mode 100644arch/arm/cpu/arm926ejs/cache.c
cover ARM: Clean arm/lib/cache.c, modify ARM1136 and ARM926 accordingly
Hi Marek,
Quoted 8 lines · Marek Vasut
Quoted 3 lines · Hong Xu
This series try to clean the code of
arch/arm/lib/cache.cMove ARM1136 cache operations intocpu/arm1136/cache.cAdd ARM926EJS cache operations intocpu/arm926ejs/cache.cHi,
any updates?
Quite busy in the passed days ;-)
And just turned back. V2 patches are on the way
BR,
Eric
Quoted 18 lines
Thanks, cheers!
Quoted 15 lines
Hong Xu (3):
ARM: Cleanarch/arm/lib/cache.c
ARM: ARM1136 - Removeflush_cachefromarch/arm/lib/cache.c
ARM: ARM926EJS - Add cache operationsarch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++ arch/arm/cpu/arm926ejs/Makefile | 2 +- arch/arm/cpu/arm926ejs/cache.c | 142 +++++++++++++++++++++++++++++++++++++++ arch/arm/lib/cache.c | 55 +++++++++------- 5 files changed, 208 insertions(+), 26 deletions(-)create mode 100644
arch/arm/cpu/arm1136/cache.ccreate mode 100644arch/arm/cpu/arm926ejs/cache.c
cover ARM: Clean arm/lib/cache.c, modify ARM1136 and ARM926 accordingly
Quoted 8 lines · Hong Xu
Hi Marek,
Quoted 5 lines · Marek Vasut
Quoted 3 lines · Hong Xu
This series try to clean the code of
arch/arm/lib/cache.cMove ARM1136 cache operations intocpu/arm1136/cache.cAdd ARM926EJS cache operations intocpu/arm926ejs/cache.c
Quoted 6 lines
Quoted 3 lines
Hi,
any updates?
Quite busy in the passed days ;-)
And just turned back. V2 patches are on the way
Hi, I just tested your patches yesterday and they seem to work. Just those two compile issues, but you're doing great ;-)
Quoted 5 lines
BR,
EricQuoted 1 line
Thanks, cheers!
cover ARM: Clean arm/lib/cache.c, modify ARM1136 and ARM926 accordingly
In reply to Hong XuQuoted 16 lines · Hong Xu
This series try to clean the code of
arch/arm/lib/cache.cMove ARM1136 cache operations intocpu/arm1136/cache.cAdd ARM926EJS cache operations intocpu/arm926ejs/cache.cHong Xu (3):
ARM: Cleanarch/arm/lib/cache.c
ARM: ARM1136 - Removeflush_cachefromarch/arm/lib/cache.c
ARM: ARM926EJS - Add cache operationsarch/arm/cpu/arm1136/Makefile | 2 +- arch/arm/cpu/arm1136/cache.c | 33 +++++++++ arch/arm/cpu/arm926ejs/Makefile | 2 +- arch/arm/cpu/arm926ejs/cache.c | 142 +++++++++++++++++++++++++++++++++++++++ arch/arm/lib/cache.c | 55 +++++++++------- 5 files changed, 208 insertions(+), 26 deletions(-)
Quoted 2 lines
create mode 100644
arch/arm/cpu/arm1136/cache.ccreate mode 100644arch/arm/cpu/arm926ejs/cache.c
Hi Hong,
any updates on thius please?
Cheers