Skip to contentSkip to conversation

ppc: Refactor cache routines, so there is only one common set.

PATCH New Rafal Jaworowski 2 participants 2 messages Jan 15, 2008 – Feb 14, 2008

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ppc: Refactor cache routines, so there is only one common set.

---
 cpu/mpc512x/start.S |   46 --------------------------------
 cpu/mpc83xx/start.S |   34 ------------------------
 cpu/mpc85xx/start.S |   45 -------------------------------
 cpu/mpc86xx/start.S |   44 -------------------------------
 cpu/ppc4xx/start.S  |   33 -----------------------
 lib_ppc/Makefile    |    2 +-
 lib_ppc/ppccache.S  |   72 +++++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 73 insertions(+), 203 deletions(-)
 create mode 100644 lib_ppc/ppccache.S
cpu/mpc512x/start.S +0 -46
index 244c69b..5a9d868 100644
@@ -479,52 +479,6 @@ get_pvr:
 	mfspr	r3, PVR
 	blr
 
-/*------------------------------------------------------------------------------- */
-/* Function:	 ppcDcbf */
-/* Description:	 Data Cache block flush */
-/* Input:	 r3 = effective address */
-/* Output:	 none. */
-/*------------------------------------------------------------------------------- */
-	.globl	ppcDcbf
-ppcDcbf:
-	dcbf	r0,r3
-	blr
-
-/*------------------------------------------------------------------------------- */
-/* Function:	 ppcDcbi */
-/* Description:	 Data Cache block Invalidate */
-/* Input:	 r3 = effective address */
-/* Output:	 none. */
-/*------------------------------------------------------------------------------- */
-	.globl	ppcDcbi
-ppcDcbi:
-	dcbi	r0,r3
-	blr
-
-/*--------------------------------------------------------------------------
- * Function:	 ppcDcbz
- * Description:	 Data Cache block zero.
- * Input:	 r3 = effective address
- * Output:	 none.
- *-------------------------------------------------------------------------- */
-
-	.globl	ppcDcbz
-ppcDcbz:
-	dcbz	r0,r3
-	blr
-
-	.globl	ppcDWstore
-ppcDWstore:
-	lfd	1, 0(r4)
-	stfd	1, 0(r3)
-	blr
-
-	.globl	ppcDWload
-ppcDWload:
-	lfd	1, 0(r3)
-	stfd	1, 0(r4)
-	blr
-
 /*-------------------------------------------------------------------*/
 
 /*
cpu/mpc83xx/start.S +0 -34
index 1dfbf62..309eb30 100644
@@ -840,40 +840,6 @@ get_pvr:
 	mfspr	r3, PVR
 	blr
 
-/*------------------------------------------------------------------------------- */
-/* Function:	 ppcDcbf */
-/* Description:	 Data Cache block flush */
-/* Input:	 r3 = effective address */
-/* Output:	 none. */
-/*------------------------------------------------------------------------------- */
-	.globl	ppcDcbf
-ppcDcbf:
-	dcbf	r0,r3
-	blr
-
-/*------------------------------------------------------------------------------- */
-/* Function:	 ppcDcbi */
-/* Description:	 Data Cache block Invalidate */
-/* Input:	 r3 = effective address */
-/* Output:	 none. */
-/*------------------------------------------------------------------------------- */
-	.globl	ppcDcbi
-ppcDcbi:
-	dcbi	r0,r3
-	blr
-
-/*--------------------------------------------------------------------------
- * Function:	 ppcDcbz
- * Description:	 Data Cache block zero.
- * Input:	 r3 = effective address
- * Output:	 none.
- *-------------------------------------------------------------------------- */
-
-	.globl	ppcDcbz
-ppcDcbz:
-	dcbz	r0,r3
-	blr
-
 	.globl	ppcDWstore
 ppcDWstore:
 	lfd	1, 0(r4)
cpu/mpc85xx/start.S +0 -45

51 lines not on this page · raw message

cpu/mpc86xx/start.S +0 -44

50 lines not on this page · raw message

cpu/ppc4xx/start.S +0 -33
index 77c2aa4..c29c87b 100644
@@ -1306,39 +1306,6 @@ in32r:
 	lwbrx	r3,r0,r3
 	blr
 
-/*------------------------------------------------------------------------------- */
-/* Function:	 ppcDcbf */
-/* Description:	 Data Cache block flush */
-/* Input:	 r3 = effective address */
-/* Output:	 none. */
-/*------------------------------------------------------------------------------- */
-	.globl	ppcDcbf
-ppcDcbf:
-	dcbf	r0,r3
-	blr
-
-/*------------------------------------------------------------------------------- */
-/* Function:	 ppcDcbi */
-/* Description:	 Data Cache block Invalidate */
-/* Input:	 r3 = effective address */
-/* Output:	 none. */
-/*------------------------------------------------------------------------------- */
-	.globl	ppcDcbi
-ppcDcbi:
-	dcbi	r0,r3
-	blr
-
-/*------------------------------------------------------------------------------- */
-/* Function:	 ppcSync */
-/* Description:	 Processor Synchronize */
-/* Input:	 none. */
-/* Output:	 none. */
-/*------------------------------------------------------------------------------- */
-	.globl	ppcSync
-ppcSync:
-	sync
-	blr
-
 /*
  * void relocate_code (addr_sp, gd, addr_moni)
  *
lib_ppc/Makefile +1 -1
index 2ba034f..afbd5ca 100644
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(ARCH).a
 
-SOBJS	= ppcstring.o ticks.o
+SOBJS	= ppccache.o ppcstring.o ticks.o
 
 COBJS	= board.o \
 	  bat_rw.o cache.o extable.o kgdb.o time.o interrupts.o
lib_ppc/ppccache.S new file +72 -0

72 lines not on this page · raw message

Signature · 1 line
1.5.2.2
#1 lore raw

PATCH v2 1/1 ppc: Refactor cache routines, so there is only one common set.

Quoted 11 lines · In message <[email protected]> you wrote:
---
 cpu/mpc512x/start.S |   46 --------------------------------
 cpu/mpc83xx/start.S |   34 ------------------------
 cpu/mpc85xx/start.S |   45 -------------------------------
 cpu/mpc86xx/start.S |   44 -------------------------------
 cpu/ppc4xx/start.S  |   33 -----------------------
 lib_ppc/Makefile    |    2 +-
 lib_ppc/ppccache.S  |   72 +++++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 73 insertions(+), 203 deletions(-)
 create mode 100644 lib_ppc/ppccache.S

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 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
"...this does not mean that some of us should not want, in  a  rather
dispassionate sort of way, to put a bullet through csh's head."
                   - Larry Wall in <[email protected]>