arm: update co-processor 15 access
PATCH 1/3 arm: update co-processor 15 access
import system.h from linux
--- cpu/arm1136/cpu.c | 50 ++++----------------------- cpu/arm1176/cpu.c | 58 ++++++------------------------- cpu/arm720t/cpu.c | 58 ++++++------------------------- cpu/arm920t/cpu.c | 69 +++++++------------------------------ cpu/arm925t/cpu.c | 57 ++++--------------------------- cpu/arm926ejs/cpu.c | 71 ++++++++------------------------------- cpu/arm946es/cpu.c | 57 ++++--------------------------- cpu/arm_cortexa8/cpu.c | 48 ++++---------------------- cpu/ixp/cpu.c | 53 ++++++++++++---------------- cpu/lh7a40x/cpu.c | 68 +++++++------------------------------ cpu/pxa/cpu.c | 53 ++++++++++++---------------- cpu/sa1100/cpu.c | 45 +++++++++--------------- include/asm-arm/system.h | 84 ++++++++++++++++++++++++++++++++++++++++++++++ 13 files changed, 238 insertions(+), 533 deletions(-) create mode 100644 include/asm-arm/system.h
cpu/arm1136/cpu.c +7 -43
@@ -33,36 +33,12 @@#include <common.h> #include <command.h> +#include <asm/system.h> #ifdef CONFIG_USE_IRQ DECLARE_GLOBAL_DATA_PTR ;#endif -/* read co-processor 15, register #1 (control register) */ -static unsigned long read_p15_c1 (void ) -{ -unsigned long value; - - __asm__ __volatile__( -"mrc p15, 0, %0, c1, c0, 0 @ read control reg\n" - :"=r" (value) - : - :"memory" ); -return value; -} - -/* write to co-processor 15, register #1 (control register) */ -static void write_p15_c1 (unsigned long value) -{ - __asm__ __volatile__( -"mcr p15, 0, %0, c1, c0, 0 @ write it back\n" - : - :"r" (value) - :"memory" ); - -read_p15_c1 (); -} -static void cp_delay (void ) {volatile int i;
@@ -71,18 +47,6 @@ static void cp_delay (void)for (i =0 ; i <100 ; i++); } -/* See also ARM Ref. Man. */ -#define C1_MMU (1<<0)/* mmu off/on */ -#define C1_ALIGN (1<<1)/* alignment faults off/on */ -#define C1_DC (1<<2)/* dcache off/on */ -#define C1_WB (1<<3)/* merging write buffer on/off */ -#define C1_BIG_ENDIAN (1<<7)/* big endian off/on */ -#define C1_SYS_PROT (1<<8)/* system protection */ -#define C1_ROM_PROT (1<<9)/* ROM protection */ -#define C1_IC (1<<12)/* icache off/on */ -#define C1_HIGH_VECTORS (1<<13)/* location of vectors: low/high addresses */ -#define RESERVED_1 (0xf << 3)/* must be 111b for R/W */ -int cpu_init (void ) {/*
@@ -120,7 +84,7 @@ int cleanup_before_linux (void)/* turn off I/D-cache */ asm ("mrc p15, 0, %0, c1, c0, 0" :"=r" (i)); - i &= ~(C1_DC |C1_IC ); + i &= ~(CR_C |CR_I ); asm ("mcr p15, 0, %0, c1, c0, 0" : :"r" (i));/* flush I/D-cache */
@@ -142,21 +106,21 @@ void icache_enable (void) {ulong reg; - reg =read_p15_c1 ();/* get control reg. */ + reg =get_cr ();/* get control reg. */ cp_delay (); -write_p15_c1 (reg |C1_IC ); +set_cr (reg |CR_I ); }void icache_disable (void ) {ulong reg; - reg =read_p15_c1 (); + reg =get_cr ();cp_delay (); -write_p15_c1 (reg & ~C1_IC ); +set_cr (reg & ~CR_I ); }int icache_status (void ) { -return (read_p15_c1 () &C1_IC ) !=0 ; +return (get_cr () &CR_I ) !=0 ; }
cpu/arm1176/cpu.c +11 -47
109 lines not on this page · raw message
cpu/arm720t/cpu.c +11 -47
110 lines not on this page · raw message
cpu/arm920t/cpu.c +13 -56
127 lines not on this page · raw message
cpu/arm925t/cpu.c +7 -50
96 lines not on this page · raw message
cpu/arm926ejs/cpu.c +14 -57
134 lines not on this page · raw message
cpu/arm946es/cpu.c +7 -50
96 lines not on this page · raw message
cpu/arm_cortexa8/cpu.c +8 -40
93 lines not on this page · raw message
cpu/ixp/cpu.c +23 -30
76 lines not on this page · raw message
cpu/lh7a40x/cpu.c +13 -55
126 lines not on this page · raw message
cpu/pxa/cpu.c +23 -30
76 lines not on this page · raw message
cpu/sa1100/cpu.c +17 -28
70 lines not on this page · raw message
include/asm-arm/system.h new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
1.6.2.1
PATCH 2/3 arm: clean cache management
unify arm cache management except for non standard cache as ARM7TDMI
--- board/armltd/integratorap/split_by_variant.sh | 16 +++- cpu/arm1136/cpu.c | 46 +++--------- cpu/arm1176/cpu.c | 57 +-------------- cpu/arm720t/cpu.c | 74 +++--------------- cpu/arm920t/cpu.c | 73 +++---------------- cpu/arm925t/cpu.c | 45 +++--------- cpu/arm926ejs/cpu.c | 72 +++--------------- cpu/arm946es/cpu.c | 48 +++--------- cpu/arm_cortexa8/cpu.c | 39 ---------- cpu/arm_intcm/cpu.c | 15 ---- cpu/ixp/cpu.c | 64 +++------------- cpu/lh7a40x/cpu.c | 70 +++--------------- cpu/pxa/cpu.c | 62 ++------------- cpu/sa1100/cpu.c | 58 ++------------ include/configs/B2.h | 1 + include/configs/assabet.h | 2 + include/configs/cerf250.h | 3 + include/configs/cradle.h | 3 + include/configs/csb226.h | 4 + include/configs/delta.h | 3 + include/configs/dnp1110.h | 2 + include/configs/evb4510.h | 1 + include/configs/gcplus.h | 2 + include/configs/innokom.h | 4 + include/configs/lart.h | 2 + include/configs/logodl.h | 4 + include/configs/lubbock.h | 3 + include/configs/pleb2.h | 3 + include/configs/pxa255_idp.h | 3 + include/configs/shannon.h | 2 + include/configs/trizepsiv.h | 3 + include/configs/wepep250.h | 2 + include/configs/xaeniax.h | 3 + include/configs/xm250.h | 3 + include/configs/xsengine.h | 3 + include/configs/zylonite.h | 3 + lib_arm/Makefile | 3 + cpu/arm926ejs/cpu.c => lib_arm/cache-cp15.c | 100 ++++++++++--------------- 38 files changed, 217 insertions(+), 684 deletions(-) copy cpu/arm926ejs/cpu.c => lib_arm/cache-cp15.c (59%)
board/armltd/integratorap/split_by_variant.sh +13 -3
@@ -84,8 +84,8 @@ else esac fi -if [ "$cpu" = "arm_intcm" ] -then +case "$cpu" in + arm_intcm) echo "/* Core module undefined/not ported */" >> tmp.fil echo "#define CONFIG_ARM_INTCM 1" >> tmp.fil echo -n "#undef CONFIG_CM_MULTIPLE_SSRAM" >> tmp.fil
@@ -102,7 +102,17 @@ then echo "initialization reg */" >> tmp.fil echo -n "#undef CONFIG_CM_TCRAM " >> tmp.fil echo " /* CM may not have TCRAM */" >> tmp.fil -fi + echo " /* May not be cahed processor */" >> tmp.fil + echo "#define CONFIG_SYS_NO_ICACHE 1" >> tmp.fil + echo "#define CONFIG_SYS_NO_DCACHE 1" >> tmp.fil + ;; + + arm720t) + echo " /* May not be cahed processor */" >> tmp.fil + echo "#define CONFIG_SYS_NO_ICACHE 1" >> tmp.fil + echo "#define CONFIG_SYS_NO_DCACHE 1" >> tmp.fil + ;; +esac mkdir -p ${obj}include mkdir -p ${obj}board/armltd/integratorap
cpu/arm1136/cpu.c +10 -36
71 lines not on this page · raw message
cpu/arm1176/cpu.c +1 -56
75 lines not on this page · raw message
cpu/arm720t/cpu.c +12 -62
99 lines not on this page · raw message
cpu/arm920t/cpu.c +10 -63
98 lines not on this page · raw message
cpu/arm925t/cpu.c +11 -34
68 lines not on this page · raw message
cpu/arm926ejs/cpu.c +10 -62
95 lines not on this page · raw message
cpu/arm946es/cpu.c +11 -37
74 lines not on this page · raw message
cpu/arm_cortexa8/cpu.c +0 -39
@@ -46,13 +46,6 @@ void l2cache_disable(void);static void cache_flush (void ); -static void cp_delay (void ) -{ -/* Many OMAP regs need@least 2 nops */ - asm("nop" ); - asm("nop" ); -} -int cpu_init (void ) {/*
@@ -111,33 +104,6 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])return 0 ; } -void icache_enable (void ) -{ -ulong reg; - - reg =get_cr ();/* get control reg. */ -cp_delay (); -set_cr (reg |CR_I ); -} - -void icache_disable (void ) -{ -ulong reg; - - reg =get_cr (); -cp_delay (); -set_cr (reg & ~CR_I ); -} - -void dcache_disable (void ) -{ -ulong reg; - - reg =get_cr (); -cp_delay (); -set_cr (reg & ~CR_C ); -} -void l2cache_enable () {unsigned long i;
@@ -197,11 +163,6 @@ void l2cache_disable() } } -int icache_status (void ) -{ -return (get_cr () &CR_I ) !=0 ; -} -static void cache_flush (void ) { asm ("mcr p15, 0, %0, c7, c5, 0" : :"r" (0 ));
cpu/arm_intcm/cpu.c +0 -15
@@ -76,18 +76,3 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])/*NOTREACHED*/ return (0 ); } - -/* May not be cahed processor on the CM - do nothing */ -void icache_enable (void ) -{ -} - -void icache_disable (void ) -{ -} - -/* return "disabled" */ -int icache_status (void ) -{ -return 0 ; -}
cpu/ixp/cpu.c +10 -54
90 lines not on this page · raw message
cpu/lh7a40x/cpu.c +10 -60
94 lines not on this page · raw message
cpu/pxa/cpu.c +9 -53
87 lines not on this page · raw message
cpu/sa1100/cpu.c +9 -49
81 lines not on this page · raw message
include/configs/B2.h +1 -0
@@ -38,6 +38,7 @@#define CONFIG_B2 1/* on an B2 Board */ #define CONFIG_ARM_THUMB 1/* this is an ARM7TDMI */ #undef CONFIG_ARM7_REVD/* disable ARM720 REV.D Workarounds */ +#define CONFIG_SYS_NO_CP15_CACHE #define CONFIG_S3C44B0_CLOCK_SPEED 75/* we have a 75Mhz S3C44B0*/
include/configs/assabet.h +2 -0
@@ -37,6 +37,8 @@#define CONFIG_ASSABET 1/* on an Intel Assabet Board */ #undef CONFIG_USE_IRQ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE #define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS 1
include/configs/cerf250.h +3 -0
@@ -41,6 +41,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/cradle.h +3 -0
@@ -37,6 +37,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/csb226.h +4 -0
@@ -42,6 +42,10 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ /* for timer/console/ethernet */ + +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Hardware drivers */
include/configs/delta.h +3 -0
@@ -39,6 +39,9 @@#undef CONFIG_SKIP_RELOCATE_UBOOT#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/dnp1110.h +2 -0
@@ -42,6 +42,8 @@#define CONFIG_DNP1110 1/* on an DNP/1110 Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE /* * Size of malloc() pool
include/configs/evb4510.h +1 -0
@@ -43,6 +43,7 @@#define CONFIG_ARM_THUMB 1/* this is an ARM7TDMI */ #define CONFIG_S3C4510B 1/* it's a S3C4510B chip */ #define CONFIG_EVB4510 1/* on an EVB4510 Board */ +#define CONFIG_SYS_NO_CP15_CACHE #define CONFIG_USE_IRQ #define CONFIG_STACKSIZE_IRQ (4*1024)
include/configs/gcplus.h +2 -0
@@ -49,6 +49,8 @@#define CONFIG_GCPLUS 1/* on an ADS GCPlus Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE #define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS 1
include/configs/innokom.h +4 -0
@@ -39,6 +39,10 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ /* for timer/console/ethernet */ + +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Hardware drivers */
include/configs/lart.h +2 -0
@@ -35,6 +35,8 @@#define CONFIG_LART 1/* on an LART Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE /* * Size of malloc() pool
include/configs/logodl.h +4 -0
@@ -39,6 +39,10 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ /* for timer/console/ethernet */ + +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Hardware drivers */
include/configs/lubbock.h +3 -0
@@ -46,6 +46,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/pleb2.h +3 -0
@@ -42,6 +42,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/pxa255_idp.h +3 -0
@@ -68,6 +68,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/shannon.h +2 -0
@@ -44,6 +44,8 @@#define CONFIG_SHANNON 1/* on an SHANNON/TuxScreen Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE /* * Size of malloc() pool
include/configs/trizepsiv.h +3 -0
@@ -47,6 +47,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +#define RTC /*
include/configs/wepep250.h +2 -0
@@ -27,6 +27,8 @@#define CONFIG_WEPEP250 1/* config for wepep250 board */ #undef CONFIG_USE_IRQ/* don't need use IRQ/FIQ */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE /* * Select serial console configuration
include/configs/xaeniax.h +3 -0
@@ -49,6 +49,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * select serial console configuration */
include/configs/xm250.h +3 -0
@@ -36,6 +36,9 @@#define CONFIG_XM250 1/* on a MicroSys XM250 Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool; this lives below the uppermost 128 KiB which are * used for the RAM copy of the uboot code
include/configs/xsengine.h +3 -0
@@ -35,6 +35,9 @@#define CONFIG_DOS_PARTITION 1#define BOARD_LATE_INIT 1#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +#define CONFIG_SYS_HZ 1000#define CONFIG_SYS_CPUSPEED 0x161/* set core clock to 400/200/100 MHz */
include/configs/zylonite.h +3 -0
@@ -47,6 +47,9 @@#undef CONFIG_SKIP_RELOCATE_UBOOT#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
lib_arm/Makefile +3 -0
@@ -35,6 +35,9 @@ SOBJS-y += _umodsi3.o COBJS-y += board.o COBJS-y += bootm.o COBJS-y += cache.o +ifndef CONFIG_SYS_NO_CP15_CACHE +COBJS-y += cache-cp15.o +endif COBJS-y += div0.o COBJS-y += interrupts.o
lib_arm/cache-cp15.c renamed from cpu/arm926ejs/cpu.c +39 -61
136 lines not on this page · raw message
Signature · 1 line
1.6.2.1
PATCH 2/3 arm: clean cache management
unify arm cache management except for non standard cache as ARM7TDMI
---
Comment fix
Best Regards,
J.
board/armltd/integratorap/split_by_variant.sh | 18 ++++- cpu/arm1136/cpu.c | 46 +++--------- cpu/arm1176/cpu.c | 57 +-------------- cpu/arm720t/cpu.c | 74 +++--------------- cpu/arm920t/cpu.c | 73 +++---------------- cpu/arm925t/cpu.c | 45 +++--------- cpu/arm926ejs/cpu.c | 72 +++--------------- cpu/arm946es/cpu.c | 48 +++--------- cpu/arm_cortexa8/cpu.c | 39 ---------- cpu/arm_intcm/cpu.c | 15 ---- cpu/ixp/cpu.c | 64 +++------------- cpu/lh7a40x/cpu.c | 70 +++--------------- cpu/pxa/cpu.c | 62 ++------------- cpu/sa1100/cpu.c | 58 ++------------ include/configs/B2.h | 1 + include/configs/assabet.h | 2 + include/configs/cerf250.h | 3 + include/configs/cradle.h | 3 + include/configs/csb226.h | 4 + include/configs/delta.h | 3 + include/configs/dnp1110.h | 2 + include/configs/evb4510.h | 1 + include/configs/gcplus.h | 2 + include/configs/innokom.h | 4 + include/configs/lart.h | 2 + include/configs/logodl.h | 4 + include/configs/lubbock.h | 3 + include/configs/pleb2.h | 3 + include/configs/pxa255_idp.h | 3 + include/configs/shannon.h | 2 + include/configs/trizepsiv.h | 3 + include/configs/wepep250.h | 2 + include/configs/xaeniax.h | 3 + include/configs/xm250.h | 3 + include/configs/xsengine.h | 3 + include/configs/zylonite.h | 3 + lib_arm/Makefile | 3 + cpu/arm926ejs/cpu.c => lib_arm/cache-cp15.c | 100 ++++++++++--------------- 38 files changed, 219 insertions(+), 684 deletions(-) copy cpu/arm926ejs/cpu.c => lib_arm/cache-cp15.c (59%)
board/armltd/integratorap/split_by_variant.sh +15 -3
@@ -84,8 +84,8 @@ else esac fi -if [ "$cpu" = "arm_intcm" ] -then +case "$cpu" in + arm_intcm) echo "/* Core module undefined/not ported */" >> tmp.fil echo "#define CONFIG_ARM_INTCM 1" >> tmp.fil echo -n "#undef CONFIG_CM_MULTIPLE_SSRAM" >> tmp.fil
@@ -102,7 +102,19 @@ then echo "initialization reg */" >> tmp.fil echo -n "#undef CONFIG_CM_TCRAM " >> tmp.fil echo " /* CM may not have TCRAM */" >> tmp.fil -fi + echo -n " /* May not be processor " >> tmp.fil + echo "without cache support */" >> tmp.fil + echo "#define CONFIG_SYS_NO_ICACHE 1" >> tmp.fil + echo "#define CONFIG_SYS_NO_DCACHE 1" >> tmp.fil + ;; + + arm720t) + echo -n " /* May not be processor " >> tmp.fil + echo "without cache support */" >> tmp.fil + echo "#define CONFIG_SYS_NO_ICACHE 1" >> tmp.fil + echo "#define CONFIG_SYS_NO_DCACHE 1" >> tmp.fil + ;; +esac mkdir -p ${obj}include mkdir -p ${obj}board/armltd/integratorap
cpu/arm1136/cpu.c +10 -36
71 lines not on this page · raw message
cpu/arm1176/cpu.c +1 -56
75 lines not on this page · raw message
cpu/arm720t/cpu.c +12 -62
99 lines not on this page · raw message
cpu/arm920t/cpu.c +10 -63
98 lines not on this page · raw message
cpu/arm925t/cpu.c +11 -34
68 lines not on this page · raw message
cpu/arm926ejs/cpu.c +10 -62
95 lines not on this page · raw message
cpu/arm946es/cpu.c +11 -37
74 lines not on this page · raw message
cpu/arm_cortexa8/cpu.c +0 -39
@@ -46,13 +46,6 @@ void l2cache_disable(void);static void cache_flush (void ); -static void cp_delay (void ) -{ -/* Many OMAP regs need@least 2 nops */ - asm("nop" ); - asm("nop" ); -} -int cpu_init (void ) {/*
@@ -111,33 +104,6 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])return 0 ; } -void icache_enable (void ) -{ -ulong reg; - - reg =get_cr ();/* get control reg. */ -cp_delay (); -set_cr (reg |CR_I ); -} - -void icache_disable (void ) -{ -ulong reg; - - reg =get_cr (); -cp_delay (); -set_cr (reg & ~CR_I ); -} - -void dcache_disable (void ) -{ -ulong reg; - - reg =get_cr (); -cp_delay (); -set_cr (reg & ~CR_C ); -} -void l2cache_enable () {unsigned long i;
@@ -197,11 +163,6 @@ void l2cache_disable() } } -int icache_status (void ) -{ -return (get_cr () &CR_I ) !=0 ; -} -static void cache_flush (void ) { asm ("mcr p15, 0, %0, c7, c5, 0" : :"r" (0 ));
cpu/arm_intcm/cpu.c +0 -15
@@ -76,18 +76,3 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])/*NOTREACHED*/ return (0 ); } - -/* May not be cahed processor on the CM - do nothing */ -void icache_enable (void ) -{ -} - -void icache_disable (void ) -{ -} - -/* return "disabled" */ -int icache_status (void ) -{ -return 0 ; -}
cpu/ixp/cpu.c +10 -54
90 lines not on this page · raw message
cpu/lh7a40x/cpu.c +10 -60
94 lines not on this page · raw message
cpu/pxa/cpu.c +9 -53
87 lines not on this page · raw message
cpu/sa1100/cpu.c +9 -49
81 lines not on this page · raw message
include/configs/B2.h +1 -0
@@ -38,6 +38,7 @@#define CONFIG_B2 1/* on an B2 Board */ #define CONFIG_ARM_THUMB 1/* this is an ARM7TDMI */ #undef CONFIG_ARM7_REVD/* disable ARM720 REV.D Workarounds */ +#define CONFIG_SYS_NO_CP15_CACHE #define CONFIG_S3C44B0_CLOCK_SPEED 75/* we have a 75Mhz S3C44B0*/
include/configs/assabet.h +2 -0
@@ -37,6 +37,8 @@#define CONFIG_ASSABET 1/* on an Intel Assabet Board */ #undef CONFIG_USE_IRQ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE #define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS 1
include/configs/cerf250.h +3 -0
@@ -41,6 +41,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/cradle.h +3 -0
@@ -37,6 +37,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/csb226.h +4 -0
@@ -42,6 +42,10 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ /* for timer/console/ethernet */ + +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Hardware drivers */
include/configs/delta.h +3 -0
@@ -39,6 +39,9 @@#undef CONFIG_SKIP_RELOCATE_UBOOT#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/dnp1110.h +2 -0
@@ -42,6 +42,8 @@#define CONFIG_DNP1110 1/* on an DNP/1110 Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE /* * Size of malloc() pool
include/configs/evb4510.h +1 -0
@@ -43,6 +43,7 @@#define CONFIG_ARM_THUMB 1/* this is an ARM7TDMI */ #define CONFIG_S3C4510B 1/* it's a S3C4510B chip */ #define CONFIG_EVB4510 1/* on an EVB4510 Board */ +#define CONFIG_SYS_NO_CP15_CACHE #define CONFIG_USE_IRQ #define CONFIG_STACKSIZE_IRQ (4*1024)
include/configs/gcplus.h +2 -0
@@ -49,6 +49,8 @@#define CONFIG_GCPLUS 1/* on an ADS GCPlus Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE #define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS 1
include/configs/innokom.h +4 -0
@@ -39,6 +39,10 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ /* for timer/console/ethernet */ + +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Hardware drivers */
include/configs/lart.h +2 -0
@@ -35,6 +35,8 @@#define CONFIG_LART 1/* on an LART Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE /* * Size of malloc() pool
include/configs/logodl.h +4 -0
@@ -39,6 +39,10 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ /* for timer/console/ethernet */ + +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Hardware drivers */
include/configs/lubbock.h +3 -0
@@ -46,6 +46,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/pleb2.h +3 -0
@@ -42,6 +42,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/pxa255_idp.h +3 -0
@@ -68,6 +68,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
include/configs/shannon.h +2 -0
@@ -44,6 +44,8 @@#define CONFIG_SHANNON 1/* on an SHANNON/TuxScreen Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE /* * Size of malloc() pool
include/configs/trizepsiv.h +3 -0
@@ -47,6 +47,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +#define RTC /*
include/configs/wepep250.h +2 -0
@@ -27,6 +27,8 @@#define CONFIG_WEPEP250 1/* config for wepep250 board */ #undef CONFIG_USE_IRQ/* don't need use IRQ/FIQ */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE /* * Select serial console configuration
include/configs/xaeniax.h +3 -0
@@ -49,6 +49,9 @@#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * select serial console configuration */
include/configs/xm250.h +3 -0
@@ -36,6 +36,9 @@#define CONFIG_XM250 1/* on a MicroSys XM250 Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool; this lives below the uppermost 128 KiB which are * used for the RAM copy of the uboot code
include/configs/xsengine.h +3 -0
@@ -35,6 +35,9 @@#define CONFIG_DOS_PARTITION 1#define BOARD_LATE_INIT 1#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +#define CONFIG_SYS_HZ 1000#define CONFIG_SYS_CPUSPEED 0x161/* set core clock to 400/200/100 MHz */
include/configs/zylonite.h +3 -0
@@ -47,6 +47,9 @@#undef CONFIG_SKIP_RELOCATE_UBOOT#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ +/* we will never enable dcache, because we have to setup MMU first */ +#define CONFIG_SYS_NO_DCACHE +/* * Size of malloc() pool */
lib_arm/Makefile +3 -0
@@ -35,6 +35,9 @@ SOBJS-y += _umodsi3.o COBJS-y += board.o COBJS-y += bootm.o COBJS-y += cache.o +ifndef CONFIG_SYS_NO_CP15_CACHE +COBJS-y += cache-cp15.o +endif COBJS-y += div0.o COBJS-y += interrupts.o
lib_arm/cache-cp15.c renamed from cpu/arm926ejs/cpu.c +39 -61
136 lines not on this page · raw message
Signature · 1 line
1.6.1.3
PATCH 2/3 arm: clean cache management
In reply to Jean-Christophe PLAGNIOL-VILLARDDear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 3 lines · In message <[email protected]> you wrote:
unify arm cache management except for non standard cache as ARM7TDMI
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
...
Review
Quoted 1 line
(quoted diff) +1
-0+ echo " /* May not be cahed processor */" >> tmp.fil
"cahed"? Typo for "cached"?
What is a "cached processor" ?
board/armltd/integratorap/split_by_variant.sh then · line 111
Quoted 6 lines
board/armltd/integratorap/split_by_variant.sh +6
-0+ echo "#define CONFIG_SYS_NO_ICACHE 1" >> tmp.fil + echo "#define CONFIG_SYS_NO_DCACHE 1" >> tmp.fil + ;; + + arm720t) + echo " /* May not be cahed processor */" >> tmp.fil
Ditto.
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 To understand a program you must become both the machine and the program.
PATCH 2/3 arm: clean cache management
Quoted 10 lines · Wolfgang Denk
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 3 lines · In message <[email protected]> you wrote:
unify arm cache management except for non standard cache as ARM7TDMI
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>...
Review
Quoted 1 line
(quoted diff) +1
-0+ echo " /* May not be cahed processor */" >> tmp.fil"cahed"? Typo for "cached"?
yes
Quoted 2 lines
What is a "cached processor" ?
some arm processor or prototype does not have cache support
Best Regards,
J.
PATCH 2/3 arm: clean cache management
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 3 lines · In message <[email protected]> you wrote:
Quoted 2 lines
"cahed"? Typo for "cached"?
yes
Please fix.
Quoted 2 lines
Quoted 1 line
What is a "cached processor" ?
some arm processor or prototype does not have cache support
That's something different. You can cache data (resulting in cached data) or you can cache instructions (resulting in cached instructions), but you cannot cache a CPU, thus there cannot be a "cached CPU".
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 No one can guarantee the actions of another. -- Spock, "Day of the Dove", stardate unknown
PATCH 3/3 arm: unify reset command
In reply to Jean-Christophe PLAGNIOL-VILLARD--- cpu/arm1136/cpu.c | 8 ---- cpu/arm1176/cpu.c | 8 ---- cpu/arm720t/cpu.c | 8 ---- cpu/arm920t/cpu.c | 8 ---- cpu/arm925t/cpu.c | 8 ---- cpu/arm926ejs/cpu.c | 8 ---- cpu/arm946es/cpu.c | 10 ----- cpu/arm_cortexa8/cpu.c | 9 ---- cpu/arm_intcm/cpu.c | 10 ----- cpu/ixp/cpu.c | 12 ------ cpu/lh7a40x/cpu.c | 9 ---- cpu/pxa/cpu.c | 12 ------ cpu/s3c44b0/cpu.c | 9 ---- cpu/sa1100/cpu.c | 12 ------ lib_arm/Makefile | 1 + cpu/s3c44b0/cpu.c => lib_arm/reset.c | 68 +++++++++------------------------ 16 files changed, 20 insertions(+), 180 deletions(-) copy cpu/s3c44b0/cpu.c => lib_arm/reset.c (58%)
cpu/arm1136/cpu.c +0 -8
@@ -83,14 +83,6 @@ int cleanup_before_linux (void)return 0 ; } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -disable_interrupts (); -reset_cpu (0 ); -/*NOTREACHED*/ -return (0 ); -} -static void cache_flush (void ) {unsigned long i =0 ;
cpu/arm1176/cpu.c +0 -8
@@ -79,14 +79,6 @@ void reset_cpu (ulong ignored)/*NOTREACHED*/ } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -disable_interrupts (); -reset_cpu (0 ); -/*NOTREACHED*/ -return 0 ; -} -/* flush I/D-cache */ static void cache_flush (void ) {
cpu/arm720t/cpu.c +0 -8
@@ -86,14 +86,6 @@ int cleanup_before_linux (void)return 0 ; } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -disable_interrupts (); -reset_cpu (0 ); -/*NOTREACHED*/ -return (0 ); -} -#if defined(CONFIG_IMPA7 ) || defined(CONFIG_EP7312 ) || defined(CONFIG_ARMADILLO )/* flush I/D-cache */ static void cache_flush (void )
cpu/arm920t/cpu.c +0 -8
@@ -72,14 +72,6 @@ int cleanup_before_linux (void)return 0 ; } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -disable_interrupts (); -reset_cpu (0 ); -/*NOTREACHED*/ -return 0 ; -} -/* flush I/D-cache */ static void cache_flush (void ) {
cpu/arm925t/cpu.c +0 -8
@@ -73,14 +73,6 @@ int cleanup_before_linux (void)return 0 ; } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -disable_interrupts (); -reset_cpu (0 ); -/*NOTREACHED*/ -return (0 ); -} -/* flush I/D-cache */ static void cache_flush (void ) {
cpu/arm926ejs/cpu.c +0 -8
@@ -73,14 +73,6 @@ int cleanup_before_linux (void)return 0 ; } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -disable_interrupts (); -reset_cpu (0 ); -/*NOTREACHED*/ -return (0 ); -} -/* flush I/D-cache */ static void cache_flush (void ) {
cpu/arm946es/cpu.c +0 -10
@@ -76,16 +76,6 @@ int cleanup_before_linux (void)return 0 ; } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -extern void reset_cpu (ulong addr); - -disable_interrupts (); -reset_cpu (0 ); -/*NOTREACHED*/ -return (0 ); -} -/* flush I/D-cache */ static void cache_flush (void ) {
cpu/arm_cortexa8/cpu.c +0 -9
@@ -95,15 +95,6 @@ int cleanup_before_linux(void)return 0 ; } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -disable_interrupts (); -reset_cpu (0 ); - -/* NOTREACHED */ -return 0 ; -} -void l2cache_enable () {unsigned long i;
cpu/arm_intcm/cpu.c +0 -10
@@ -66,13 +66,3 @@ int cleanup_before_linux (void)return (0 ); } - -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -extern void reset_cpu (ulong addr); - -disable_interrupts (); -reset_cpu (0 ); -/*NOTREACHED*/ -return (0 ); -}
cpu/ixp/cpu.c +0 -12
@@ -113,18 +113,6 @@ int cleanup_before_linux (void)return 0 ; } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -printf ("resetting ...\n" ); - -udelay (50000 );/* wait 50 ms */ -disable_interrupts (); -reset_cpu (0 ); - -/*NOTREACHED*/ -return (0 ); -} -/* flush I/D-cache */ static void cache_flush (void ) {
cpu/lh7a40x/cpu.c +0 -9
@@ -73,15 +73,6 @@ int cleanup_before_linux (void)return 0 ; } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -disable_interrupts (); -reset_cpu (0 ); -/*NOTREACHED*/ -return (0 ); -} - -/* flush I/D-cache */ static void cache_flush (void ) {
cpu/pxa/cpu.c +0 -12
@@ -74,18 +74,6 @@ int cleanup_before_linux (void)return (0 ); } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -printf ("resetting ...\n" ); - -udelay (50000 );/* wait 50 ms */ -disable_interrupts (); -reset_cpu (0 ); - -/*NOTREACHED*/ -return (0 ); -} -/* flush I/D-cache */ static void cache_flush (void ) {
cpu/s3c44b0/cpu.c +0 -9
@@ -72,12 +72,3 @@ void reset_cpu (ulong addr)/*NOP*/ } } - -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -disable_interrupts (); -reset_cpu (0 ); - -/*NOTREACHED*/ -return (0 ); -}
cpu/sa1100/cpu.c +0 -12
@@ -73,18 +73,6 @@ int cleanup_before_linux (void)return (0 ); } -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -printf ("resetting ...\n" ); - -udelay (50000 );/* wait 50 ms */ -disable_interrupts (); -reset_cpu (0 ); - -/*NOTREACHED*/ -return (0 ); -} -/* flush I/D-cache */ static void cache_flush (void ) {
lib_arm/Makefile +1 -0
@@ -40,6 +40,7 @@ COBJS-y += cache-cp15.o endif COBJS-y += div0.o COBJS-y += interrupts.o +COBJS-y += reset.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
lib_arm/reset.c renamed from cpu/s3c44b0/cpu.c +19 -49
89 lines not on this page · raw message
Signature · 1 line
1.6.2.1