Skip to contentSkip to conversation

arm: update co-processor 15 access

PATCH New Jean-Christophe PLAGNIOL-VILLARD 2 participants 7 messages Mar 30, 2009 – Apr 5, 2009

lore
Share & tools
lore
#0 lore raw

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
index 0486163..0abe307 100644
@@ -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
#1 lore raw

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
index 51dc53f..0c89844 100755
@@ -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
index 506dbec..64ee972 100644
@@ -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
index ccf7fd5..ea6747a 100644
@@ -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
index 01b65c5..35fad5c 100644
@@ -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
index a6c442b..8c5b84c 100644
@@ -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
index 751e03c..82d1401 100644
@@ -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
index 850d93b..75c5f9b 100644
@@ -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
index d9f85f0..ed18450 100644
@@ -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
index f5508b7..bacbd90 100644
@@ -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
index 8f615bd..b6cfc67 100644
@@ -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
index ffc9408..0f415d9 100644
@@ -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
index 77d4578..b2fbca2 100644
@@ -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
index 895998a..69654c7 100644
@@ -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
index e34ec22..5d6d460 100644
@@ -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
index 9afa800..889a9a3 100644
@@ -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
index a4b430b..2cf9c02 100644
@@ -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
index ab9ea4f..ed873fa 100644
@@ -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
index 5e2e7cf..7485f72 100644
@@ -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
index c8b0b16..13cc5ff 100644
@@ -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
index c2744b5..4917318 100644
@@ -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
index 717577f..9c2a5f8 100644
@@ -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
index 086ca69..1632d29 100644
@@ -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
index 922eb2c..c8bdf31 100644
@@ -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
index cad414c..7e2abbf 100644
@@ -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
index 064740d..217636a 100644
@@ -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
index c8795b2..3ac9d1f 100644
@@ -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
#2 lore raw

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
index 51dc53f..2c9fe2e 100755
@@ -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
index 506dbec..64ee972 100644
@@ -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
index ccf7fd5..ea6747a 100644
@@ -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
index 01b65c5..35fad5c 100644
@@ -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
index a6c442b..8c5b84c 100644
@@ -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
index 751e03c..82d1401 100644
@@ -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
index 850d93b..75c5f9b 100644
@@ -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
index d9f85f0..ed18450 100644
@@ -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
index f5508b7..bacbd90 100644
@@ -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
index 8f615bd..b6cfc67 100644
@@ -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
index ffc9408..0f415d9 100644
@@ -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
index 77d4578..b2fbca2 100644
@@ -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
index 895998a..69654c7 100644
@@ -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
index e34ec22..5d6d460 100644
@@ -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
index 9afa800..889a9a3 100644
@@ -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
index a4b430b..2cf9c02 100644
@@ -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
index ab9ea4f..ed873fa 100644
@@ -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
index 5e2e7cf..7485f72 100644
@@ -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
index c8b0b16..13cc5ff 100644
@@ -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
index c2744b5..4917318 100644
@@ -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
index e74303d..197ac0b 100644
@@ -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
index 086ca69..1632d29 100644
@@ -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
index 922eb2c..c8bdf31 100644
@@ -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
index cad414c..7e2abbf 100644
@@ -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
index 064740d..217636a 100644
@@ -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
index c8795b2..3ac9d1f 100644
@@ -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
#3 lore raw

PATCH 2/3 arm: clean cache management

In reply to Jean-Christophe PLAGNIOL-VILLARD

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

...

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.
#4 lore raw

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

...

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.

#5 lore raw

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
#6 lore raw

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
index 78f6e92..e03a765 100644
@@ -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
index 8aefbe3..bfa4378 100644
@@ -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
index a6f5c4d..6c40903 100644
@@ -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
index 08c9339..87c1adc 100644
@@ -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
index eb6364d..cf6a489 100644
@@ -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
index 84c169e..6307e33 100644
@@ -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
index 8d0c533..ef7995d 100644
@@ -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
index 64ee972..5e7b935 100644
@@ -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
index ea6747a..1636ffb 100644
@@ -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
index d9cfbab..42c62f6 100644
@@ -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
index e862251..93ebd13 100644
@@ -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
index ab58d39..3a1be57 100644
@@ -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
index e4cdb82..7ef4a1f 100644
@@ -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
index 6c897d0..ed1a6f7 100644
@@ -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
index 3ac9d1f..4469361 100644
@@ -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