All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc
@ 2017-07-12  9:43 Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 01/14] powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk() Christophe Leroy
                   ` (14 more replies)
  0 siblings, 15 replies; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

This serie makes some cleanup in the powerpc area
following the reintroduction of the 8xx.

No travis verification done, travis is timing out

Christophe Leroy (14):
  powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
  powerpc: get rid of addr_probe()
  powerpc, timer: Does 8xx specific actions in 8xx cpu_init
  power, timer: reset TBL before TBU
  powerpc: move set_msr() and get_msr() into .h
  powerpc: Remove unneccessary #ifdefs in reginfo
  Convert CONFIG_CMD_REGINFO to Kconfig
  powerpc, 8xx: Simplifying check_CPU()
  powerpc, 8xx: Move cache function into C files
  powerpc, 8xx: move get_immr() into C
  powerpc, 8xx: move cache helper into C
  powerpc: move get_pvr() and get_svr() into C
  powerpc, 8xx: fix missing function declarations.
  powerpc: Remove 8260 remainders

 MAINTAINERS                          |   6 --
 README                               |   1 -
 arch/powerpc/Kconfig                 |   3 +
 arch/powerpc/cpu/mpc83xx/start.S     |  10 ----
 arch/powerpc/cpu/mpc83xx/traps.c     |  27 ---------
 arch/powerpc/cpu/mpc85xx/cpu.c       |   3 +-
 arch/powerpc/cpu/mpc85xx/start.S     |  10 ----
 arch/powerpc/cpu/mpc85xx/traps.c     |   8 ---
 arch/powerpc/cpu/mpc86xx/cpu.c       |   3 +-
 arch/powerpc/cpu/mpc86xx/start.S     |  10 ----
 arch/powerpc/cpu/mpc86xx/traps.c     |  10 ----
 arch/powerpc/cpu/mpc8xx/Makefile     |   1 +
 arch/powerpc/cpu/mpc8xx/cache.c      |  49 ++++++++++++++++
 arch/powerpc/cpu/mpc8xx/cpu.c        |  39 +++----------
 arch/powerpc/cpu/mpc8xx/cpu_init.c   |   5 +-
 arch/powerpc/cpu/mpc8xx/immap.c      |  13 +++--
 arch/powerpc/cpu/mpc8xx/reginfo.c    |   3 +-
 arch/powerpc/cpu/mpc8xx/speed.c      |  25 +-------
 arch/powerpc/cpu/mpc8xx/start.S      | 108 -----------------------------------
 arch/powerpc/cpu/mpc8xx/traps.c      |  10 +---
 arch/powerpc/include/asm/cache.h     |  32 +++++++++++
 arch/powerpc/include/asm/ppc.h       |  49 +++++++++++++---
 arch/powerpc/include/asm/processor.h |  14 -----
 arch/powerpc/lib/bootm.c             |   2 +
 arch/powerpc/lib/interrupts.c        |  17 ------
 arch/powerpc/lib/kgdb.c              |  14 -----
 arch/powerpc/lib/time.c              |  13 +----
 cmd/Kconfig                          |   5 ++
 cmd/reginfo.c                        |  20 +------
 drivers/i2c/soft_i2c.c               |   4 --
 drivers/net/mpc8xx_fec.c             |   1 +
 drivers/serial/serial.c              |   3 -
 include/config_cmd_all.h             |   1 -
 include/configs/B4860QDS.h           |   1 -
 include/configs/BSC9131RDB.h         |   1 -
 include/configs/BSC9132QDS.h         |   1 -
 include/configs/C29XPCIE.h           |   1 -
 include/configs/M5208EVBE.h          |   1 -
 include/configs/M52277EVB.h          |   1 -
 include/configs/M5235EVB.h           |   1 -
 include/configs/M53017EVB.h          |   1 -
 include/configs/M5329EVB.h           |   1 -
 include/configs/M5373EVB.h           |   1 -
 include/configs/M54418TWR.h          |   1 -
 include/configs/M54451EVB.h          |   1 -
 include/configs/M54455EVB.h          |   1 -
 include/configs/M5475EVB.h           |   1 -
 include/configs/M5485EVB.h           |   1 -
 include/configs/MCR3000.h            |   1 -
 include/configs/MPC8536DS.h          |   1 -
 include/configs/MPC8541CDS.h         |   1 -
 include/configs/MPC8544DS.h          |   1 -
 include/configs/MPC8548CDS.h         |   1 -
 include/configs/MPC8555CDS.h         |   1 -
 include/configs/MPC8560ADS.h         |   1 -
 include/configs/MPC8568MDS.h         |   1 -
 include/configs/MPC8569MDS.h         |   1 -
 include/configs/MPC8572DS.h          |   1 -
 include/configs/MPC8610HPCD.h        |   2 -
 include/configs/MPC8641HPCN.h        |   1 -
 include/configs/P1010RDB.h           |   1 -
 include/configs/P1022DS.h            |   1 -
 include/configs/P1023RDB.h           |   1 -
 include/configs/T102xQDS.h           |   1 -
 include/configs/T102xRDB.h           |   1 -
 include/configs/T1040QDS.h           |   1 -
 include/configs/T104xRDB.h           |   1 -
 include/configs/T208xQDS.h           |   1 -
 include/configs/T208xRDB.h           |   1 -
 include/configs/T4240RDB.h           |   2 -
 include/configs/TQM834x.h            |   1 -
 include/configs/UCP1020.h            |   1 -
 include/configs/astro_mcf5373l.h     |   1 -
 include/configs/controlcenterd.h     |   3 -
 include/configs/corenet_ds.h         |   1 -
 include/configs/cyrus.h              |   1 -
 include/configs/dragonboard410c.h    |   1 -
 include/configs/p1_p2_rdb_pc.h       |   1 -
 include/configs/p1_twr.h             |   1 -
 include/configs/qemu-ppce500.h       |   2 -
 include/configs/s5p_goni.h           |   1 -
 include/configs/sbc8548.h            |   1 -
 include/configs/sbc8641d.h           |   2 -
 include/configs/smdkc100.h           |   1 -
 include/configs/socrates.h           |   1 -
 include/configs/t4qds.h              |   2 -
 include/configs/vct.h                |   1 -
 include/configs/xilinx-ppc.h         |   1 -
 include/configs/xpedite517x.h        |   1 -
 include/configs/xpedite520x.h        |   1 -
 include/configs/xpedite537x.h        |   1 -
 include/configs/xpedite550x.h        |   1 -
 include/ioports.h                    |   7 +--
 scripts/config_whitelist.txt         |   1 -
 94 files changed, 166 insertions(+), 427 deletions(-)
 create mode 100644 arch/powerpc/cpu/mpc8xx/cache.c

-- 
2.12.0

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 01/14] powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12 12:52   ` Wolfgang Denk
  2017-07-12  9:43 ` [U-Boot] [PATCH 02/14] powerpc: get rid of addr_probe() Christophe Leroy
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

divider is calculated based on SCCR_DFBRG, with:
SCCR_DFBRG 00 => divider 1  = 1 << 0
SCCR_DFBRG 01 => divider 4  = 1 << 2
SCCR_DFBRG 10 => divider 16 = 1 << 4
SCCR_DFBRG 11 => divider 64 = 1 << 6

This can be easily converted to a single shift operation:
divider = 1 << (SCCR_DFBRG * 2)

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/speed.c | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index 8d43efff6c..21a3de317c 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -12,27 +12,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-void get_brgclk(uint sccr)
-{
-	uint divider = 0;
-
-	switch ((sccr & SCCR_DFBRG11) >> 11) {
-	case 0:
-		divider = 1;
-		break;
-	case 1:
-		divider = 4;
-		break;
-	case 2:
-		divider = 16;
-		break;
-	case 3:
-		divider = 64;
-		break;
-	}
-	gd->arch.brg_clk = gd->cpu_clk / divider;
-}
-
 /*
  * get_clocks() fills in gd->cpu_clock depending on CONFIG_8xx_GCLK_FREQ
  */
@@ -41,6 +20,8 @@ int get_clocks(void)
 	uint immr = get_immr(0);	/* Return full IMMR contents */
 	immap_t __iomem *immap = (immap_t __iomem *)(immr & 0xFFFF0000);
 	uint sccr = in_be32(&immap->im_clkrst.car_sccr);
+	uint divider = 1 << ((sccr & SCCR_DFBRG11) >> 10);
+
 	/*
 	 * If for some reason measuring the gclk frequency won't
 	 * work, we return the hardwired value.
@@ -57,7 +38,7 @@ int get_clocks(void)
 		gd->bus_clk = gd->cpu_clk / 2;
 	}
 
-	get_brgclk(sccr);
+	gd->arch.brg_clk = gd->cpu_clk / divider;
 
 	return 0;
 }
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 02/14] powerpc: get rid of addr_probe()
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 01/14] powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk() Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12 12:56   ` Wolfgang Denk
  2017-07-12  9:43 ` [U-Boot] [PATCH 03/14] powerpc, timer: Does 8xx specific actions in 8xx cpu_init Christophe Leroy
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

This function has never been used, at least since the beginning
of the git repository

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc83xx/traps.c | 27 ---------------------------
 arch/powerpc/cpu/mpc85xx/traps.c |  8 --------
 arch/powerpc/cpu/mpc86xx/traps.c | 10 ----------
 arch/powerpc/cpu/mpc8xx/traps.c  |  8 --------
 4 files changed, 53 deletions(-)

diff --git a/arch/powerpc/cpu/mpc83xx/traps.c b/arch/powerpc/cpu/mpc83xx/traps.c
index 3dd6900c86..f238d0b91c 100644
--- a/arch/powerpc/cpu/mpc83xx/traps.c
+++ b/arch/powerpc/cpu/mpc83xx/traps.c
@@ -215,30 +215,3 @@ void DebugException(struct pt_regs *regs)
 	do_bedbug_breakpoint( regs );
 #endif
 }
-
-/* Probe an address by reading.  If not present, return -1, otherwise
- * return 0.
- */
-int addr_probe(uint *addr)
-{
-#if 0
-	int	retval;
-
-	__asm__ __volatile__(			\
-		"1:	lwz %0,0(%1)\n"		\
-		"	eieio\n"		\
-		"	li %0,0\n"		\
-		"2:\n"				\
-		".section .fixup,\"ax\"\n"	\
-		"3:	li %0,-1\n"		\
-		"	b 2b\n"			\
-		".section __ex_table,\"a\"\n"	\
-		"	.align 2\n"		\
-		"	.long 1b,3b\n"		\
-		".text"				\
-		: "=r" (retval) : "r"(addr));
-
-	return (retval);
-#endif
-	return 0;
-}
diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c
index 24adbc3078..9d3556e50c 100644
--- a/arch/powerpc/cpu/mpc85xx/traps.c
+++ b/arch/powerpc/cpu/mpc85xx/traps.c
@@ -286,11 +286,3 @@ void DebugException(struct pt_regs *regs)
 	do_bedbug_breakpoint( regs );
 #endif
 }
-
-/* Probe an address by reading.	 If not present, return -1, otherwise
- * return 0.
- */
-int addr_probe(uint *addr)
-{
-	return 0;
-}
diff --git a/arch/powerpc/cpu/mpc86xx/traps.c b/arch/powerpc/cpu/mpc86xx/traps.c
index 92fb537453..da74146844 100644
--- a/arch/powerpc/cpu/mpc86xx/traps.c
+++ b/arch/powerpc/cpu/mpc86xx/traps.c
@@ -195,13 +195,3 @@ void UnknownException(struct pt_regs *regs)
 	       regs->nip, regs->msr, regs->trap);
 	_exception(0, regs);
 }
-
-/*
- * Probe an address by reading.
- * If not present, return -1,
- * otherwise return 0.
- */
-int addr_probe(uint *addr)
-{
-	return 0;
-}
diff --git a/arch/powerpc/cpu/mpc8xx/traps.c b/arch/powerpc/cpu/mpc8xx/traps.c
index 8b8d617eed..ebf4e412c9 100644
--- a/arch/powerpc/cpu/mpc8xx/traps.c
+++ b/arch/powerpc/cpu/mpc8xx/traps.c
@@ -155,11 +155,3 @@ void DebugException(struct pt_regs *regs)
 	printf("Debugger trap at @ %lx\n", regs->nip);
 	show_regs(regs);
 }
-
-/* Probe an address by reading.  If not present, return -1, otherwise
- * return 0.
- */
-int addr_probe(uint *addr)
-{
-	return 0;
-}
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 03/14] powerpc, timer: Does 8xx specific actions in 8xx cpu_init
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 01/14] powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk() Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 02/14] powerpc: get rid of addr_probe() Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 04/14] power, timer: reset TBL before TBU Christophe Leroy
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/cpu_init.c |  5 ++++-
 arch/powerpc/lib/time.c            | 11 -----------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c
index 16e7bf5fd5..dc601a1297 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c
@@ -38,7 +38,10 @@ void cpu_init_f(immap_t __iomem *immr)
 	/* unlock TBSCRK */
 
 	out_be32(&immr->im_sitk.sitk_tbscrk, KAPWR_KEY);
-	out_be16(&immr->im_sit.sit_tbscr, CONFIG_SYS_TBSCR);
+	out_be16(&immr->im_sit.sit_tbscr, CONFIG_SYS_TBSCR | TBSCR_TBE);
+
+	/* Unlock timebase register */
+	out_be32(&immr->im_sitk.sitk_tbk, KAPWR_KEY);
 
 	/* initialize the PIT (11-31) */
 
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index 41a271a42d..ff9bb67e28 100644
--- a/arch/powerpc/lib/time.c
+++ b/arch/powerpc/lib/time.c
@@ -65,21 +65,10 @@ int timer_init(void)
 {
 	unsigned long temp;
 
-#if defined(CONFIG_8xx)
-	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
-
-	/* unlock */
-	out_be32(&immap->im_sitk.sitk_tbk, KAPWR_KEY);
-#endif
-
 	/* reset */
 	asm volatile("li %0,0 ; mttbu %0 ; mttbl %0;"
 	     : "=&r"(temp) );
 
-#if defined(CONFIG_8xx)
-	/* enable */
-	setbits_be16(&immap->im_sit.sit_tbscr, TBSCR_TBE);
-#endif
 	return (0);
 }
 /* ------------------------------------------------------------------------- */
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 04/14] power, timer: reset TBL before TBU
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (2 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 03/14] powerpc, timer: Does 8xx specific actions in 8xx cpu_init Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12 13:00   ` Wolfgang Denk
  2017-07-12  9:43 ` [U-Boot] [PATCH 05/14] powerpc: move set_msr() and get_msr() into .h Christophe Leroy
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

In order to avoid TBU increment due to TBL reaching its max
and wrapping, reset TBL before resetting TBU

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/lib/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index ff9bb67e28..c43f254481 100644
--- a/arch/powerpc/lib/time.c
+++ b/arch/powerpc/lib/time.c
@@ -66,7 +66,7 @@ int timer_init(void)
 	unsigned long temp;
 
 	/* reset */
-	asm volatile("li %0,0 ; mttbu %0 ; mttbl %0;"
+	asm volatile("li %0,0 ; mttbl %0 ; mttbu %0;"
 	     : "=&r"(temp) );
 
 	return (0);
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 05/14] powerpc: move set_msr() and get_msr() into .h
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (3 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 04/14] power, timer: reset TBL before TBU Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12 13:03   ` Wolfgang Denk
  2017-07-12  9:43 ` [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo Christophe Leroy
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

set_msr() and get_msr() are defined and used twice.
This patch moves them into ppc.h

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/include/asm/ppc.h | 14 ++++++++++++++
 arch/powerpc/lib/interrupts.c  | 14 --------------
 arch/powerpc/lib/kgdb.c        | 14 --------------
 3 files changed, 14 insertions(+), 28 deletions(-)

diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index c6aa2f0dfb..89f08eccc7 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -96,6 +96,20 @@ static inline ulong get_ddr_freq(ulong dummy)
 ulong get_ddr_freq(ulong);
 #endif
 
+static inline unsigned long get_msr(void)
+{
+	unsigned long msr;
+
+	asm volatile ("mfmsr %0" : "=r" (msr) : );
+
+	return msr;
+}
+
+static inline void set_msr(unsigned long msr)
+{
+	asm volatile ("mtmsr %0" : : "r" (msr));
+}
+
 #endif /* !__ASSEMBLY__ */
 
 #ifdef CONFIG_PPC
diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
index 50313573fb..ccba829710 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -33,20 +33,6 @@ extern void timer_interrupt_cpu (struct pt_regs *);
 
 static unsigned decrementer_count; /* count value for 1e6/HZ microseconds */
 
-static __inline__ unsigned long get_msr (void)
-{
-	unsigned long msr;
-
-	asm volatile ("mfmsr %0":"=r" (msr):);
-
-	return msr;
-}
-
-static __inline__ void set_msr (unsigned long msr)
-{
-	asm volatile ("mtmsr %0"::"r" (msr));
-}
-
 static __inline__ unsigned long get_dec (void)
 {
 	unsigned long val;
diff --git a/arch/powerpc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c
index 88c2af21eb..aa16a00a42 100644
--- a/arch/powerpc/lib/kgdb.c
+++ b/arch/powerpc/lib/kgdb.c
@@ -38,20 +38,6 @@ kgdb_longjmp(long *buf, int val)
 	     : "=&r"(temp) : "r" (buf), "r" (val));
 }
 
-static inline unsigned long
-get_msr(void)
-{
-	unsigned long msr;
-	asm volatile("mfmsr %0" : "=r" (msr):);
-	return msr;
-}
-
-static inline void
-set_msr(unsigned long msr)
-{
-	asm volatile("mtmsr %0" : : "r" (msr));
-}
-
 /* Convert the SPARC hardware trap type code to a unix signal number. */
 /*
  * This table contains the mapping between PowerPC hardware trap types, and
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (4 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 05/14] powerpc: move set_msr() and get_msr() into .h Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12 13:07   ` Wolfgang Denk
  2017-07-12  9:43 ` [U-Boot] [PATCH 07/14] Convert CONFIG_CMD_REGINFO to Kconfig Christophe Leroy
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

reginfo command is calling mpc8xx_reginfo(), mpc85xx_reginfo()
or mpc86xx_reginfo() based on CONFIG_ symbol.
As those 3 functions can't me defined at the same time, let's
rename them mpc8xxx_reginfo() to avoid the #ifdefs

Lets all remove the #ifdefs around the U_BOOT_CMD as this
file is only compiled when CONFIG_CMD_REGINFO is defined

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc85xx/cpu.c    |  3 ++-
 arch/powerpc/cpu/mpc86xx/cpu.c    |  3 ++-
 arch/powerpc/cpu/mpc8xx/reginfo.c |  3 ++-
 arch/powerpc/include/asm/ppc.h    |  4 ++++
 cmd/reginfo.c                     | 20 ++------------------
 5 files changed, 12 insertions(+), 21 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index e3ef4ae816..711354a868 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -23,6 +23,7 @@
 #include <post.h>
 #include <asm/processor.h>
 #include <fsl_ddr_sdram.h>
+#include <asm/ppc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -384,7 +385,7 @@ int cpu_mmc_init(bd_t *bis)
  * Currently prints out LAWs, BR0/OR0 for LBC, CSPR/CSOR/Timing
  * parameters for IFC and TLBs
  */
-void mpc85xx_reginfo(void)
+void mpc8xxx_reginfo(void)
 {
 	print_tlbcam();
 	print_laws();
diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c
index 7a9570c8ec..c46cd965dd 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu.c
@@ -13,6 +13,7 @@
 #include <asm/mmu.h>
 #include <mpc86xx.h>
 #include <asm/fsl_law.h>
+#include <asm/ppc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -160,7 +161,7 @@ watchdog_reset(void)
  * Print out the state of various machine registers.
  * Currently prints out LAWs, BR0/OR0, and BATs
  */
-void mpc86xx_reginfo(void)
+void mpc8xxx_reginfo(void)
 {
 	print_bats();
 	print_laws();
diff --git a/arch/powerpc/cpu/mpc8xx/reginfo.c b/arch/powerpc/cpu/mpc8xx/reginfo.c
index 1ba4d22bdd..62fbf151ce 100644
--- a/arch/powerpc/cpu/mpc8xx/reginfo.c
+++ b/arch/powerpc/cpu/mpc8xx/reginfo.c
@@ -8,8 +8,9 @@
 #include <common.h>
 #include <mpc8xx.h>
 #include <asm/io.h>
+#include <asm/ppc.h>
 
-void mpc8xx_reginfo(void)
+void mpc8xxx_reginfo(void)
 {
 	immap_t __iomem     *immap  = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	memctl8xx_t __iomem *memctl = &immap->im_memctl;
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index 89f08eccc7..4013ddaa74 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -110,6 +110,10 @@ static inline void set_msr(unsigned long msr)
 	asm volatile ("mtmsr %0" : : "r" (msr));
 }
 
+#ifdef CONFIG_CMD_REGINFO
+void mpc8xxx_reginfo(void);
+#endif
+
 #endif /* !__ASSEMBLY__ */
 
 #ifdef CONFIG_PPC
diff --git a/cmd/reginfo.c b/cmd/reginfo.c
index b364cc899a..5640b035dc 100644
--- a/cmd/reginfo.c
+++ b/cmd/reginfo.c
@@ -7,36 +7,20 @@
 
 #include <common.h>
 #include <command.h>
-#if defined(CONFIG_8xx)
-void mpc8xx_reginfo(void);
-#elif defined(CONFIG_MPC86xx)
-extern void mpc86xx_reginfo(void);
-#elif defined(CONFIG_MPC85xx)
-extern void mpc85xx_reginfo(void);
-#endif
+#include <asm/ppc.h>
 
 static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc,
 		       char * const argv[])
 {
-#if defined(CONFIG_8xx)
-	mpc8xx_reginfo();
-
-#elif defined(CONFIG_MPC86xx)
-	mpc86xx_reginfo();
-
-#elif defined(CONFIG_MPC85xx)
-	mpc85xx_reginfo();
-#endif
+	mpc8xxx_reginfo();
 
 	return 0;
 }
 
  /**************************************************/
 
-#if defined(CONFIG_CMD_REGINFO)
 U_BOOT_CMD(
 	reginfo,	2,	1,	do_reginfo,
 	"print register information",
 	""
 );
-#endif
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 07/14] Convert CONFIG_CMD_REGINFO to Kconfig
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (5 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12 13:11   ` Wolfgang Denk
  2017-07-12  9:43 ` [U-Boot] [PATCH 08/14] powerpc, 8xx: Simplifying check_CPU() Christophe Leroy
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 README                            | 1 -
 arch/powerpc/Kconfig              | 3 +++
 cmd/Kconfig                       | 5 +++++
 include/config_cmd_all.h          | 1 -
 include/configs/B4860QDS.h        | 1 -
 include/configs/BSC9131RDB.h      | 1 -
 include/configs/BSC9132QDS.h      | 1 -
 include/configs/C29XPCIE.h        | 1 -
 include/configs/M5208EVBE.h       | 1 -
 include/configs/M52277EVB.h       | 1 -
 include/configs/M5235EVB.h        | 1 -
 include/configs/M53017EVB.h       | 1 -
 include/configs/M5329EVB.h        | 1 -
 include/configs/M5373EVB.h        | 1 -
 include/configs/M54418TWR.h       | 1 -
 include/configs/M54451EVB.h       | 1 -
 include/configs/M54455EVB.h       | 1 -
 include/configs/M5475EVB.h        | 1 -
 include/configs/M5485EVB.h        | 1 -
 include/configs/MCR3000.h         | 1 -
 include/configs/MPC8536DS.h       | 1 -
 include/configs/MPC8541CDS.h      | 1 -
 include/configs/MPC8544DS.h       | 1 -
 include/configs/MPC8548CDS.h      | 1 -
 include/configs/MPC8555CDS.h      | 1 -
 include/configs/MPC8560ADS.h      | 1 -
 include/configs/MPC8568MDS.h      | 1 -
 include/configs/MPC8569MDS.h      | 1 -
 include/configs/MPC8572DS.h       | 1 -
 include/configs/MPC8610HPCD.h     | 2 --
 include/configs/MPC8641HPCN.h     | 1 -
 include/configs/P1010RDB.h        | 1 -
 include/configs/P1022DS.h         | 1 -
 include/configs/P1023RDB.h        | 1 -
 include/configs/T102xQDS.h        | 1 -
 include/configs/T102xRDB.h        | 1 -
 include/configs/T1040QDS.h        | 1 -
 include/configs/T104xRDB.h        | 1 -
 include/configs/T208xQDS.h        | 1 -
 include/configs/T208xRDB.h        | 1 -
 include/configs/T4240RDB.h        | 2 --
 include/configs/TQM834x.h         | 1 -
 include/configs/UCP1020.h         | 1 -
 include/configs/astro_mcf5373l.h  | 1 -
 include/configs/controlcenterd.h  | 3 ---
 include/configs/corenet_ds.h      | 1 -
 include/configs/cyrus.h           | 1 -
 include/configs/dragonboard410c.h | 1 -
 include/configs/p1_p2_rdb_pc.h    | 1 -
 include/configs/p1_twr.h          | 1 -
 include/configs/qemu-ppce500.h    | 2 --
 include/configs/s5p_goni.h        | 1 -
 include/configs/sbc8548.h         | 1 -
 include/configs/sbc8641d.h        | 2 --
 include/configs/smdkc100.h        | 1 -
 include/configs/socrates.h        | 1 -
 include/configs/t4qds.h           | 2 --
 include/configs/vct.h             | 1 -
 include/configs/xilinx-ppc.h      | 1 -
 include/configs/xpedite517x.h     | 1 -
 include/configs/xpedite520x.h     | 1 -
 include/configs/xpedite537x.h     | 1 -
 include/configs/xpedite550x.h     | 1 -
 scripts/config_whitelist.txt      | 1 -
 64 files changed, 8 insertions(+), 69 deletions(-)

diff --git a/README b/README
index c73f6dd574..ae5bcdc1ba 100644
--- a/README
+++ b/README
@@ -822,7 +822,6 @@ The following options need to be configured:
 					  host
 		CONFIG_CMD_PORTIO	* Port I/O
 		CONFIG_CMD_READ		* Read raw data from partition
-		CONFIG_CMD_REGINFO	* Register dump
 		CONFIG_CMD_RUN		  run command in env variable
 		CONFIG_CMD_SANDBOX	* sb command to access sandbox features
 		CONFIG_CMD_SAVES	* save S record dump
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index e9002a76ab..60c74f9c32 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -23,14 +23,17 @@ config MPC85xx
 	imply USB_EHCI_HCD if USB
 	imply CMD_HASH
 	imply CMD_IRQ
+	imply CMD_REGINFO
 
 config MPC86xx
 	bool "MPC86xx"
 	select SYS_FSL_DDR
 	select SYS_FSL_DDR_BE
+	imply CMD_REGINFO
 
 config 8xx
 	bool "MPC8xx"
+	imply CMD_REGINFO
 
 endchoice
 
diff --git a/cmd/Kconfig b/cmd/Kconfig
index c80ac364ea..016856b9f9 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -158,6 +158,11 @@ config CMD_LICENSE
 	help
 	  Print GPL license text
 
+config CMD_REGINFO
+	bool "reginfo"
+	help
+	  Register dump
+
 endmenu
 
 menu "Boot commands"
diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h
index 2874a7850d..e6dfe07a2c 100644
--- a/include/config_cmd_all.h
+++ b/include/config_cmd_all.h
@@ -20,7 +20,6 @@
 #define CONFIG_CMD_PCI		/* pciinfo			*/
 #define CONFIG_CMD_PCMCIA	/* PCMCIA support		*/
 #define CONFIG_CMD_PORTIO	/* Port I/O			*/
-#define CONFIG_CMD_REGINFO	/* Register dump		*/
 #define CONFIG_CMD_REISER	/* Reiserfs support		*/
 #define CONFIG_CMD_READ		/* Read data from partition	*/
 #define CONFIG_CMD_SANDBOX	/* sb command to access sandbox features */
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 2226aba674..a726a2bfe9 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -702,7 +702,6 @@ unsigned long get_board_ddr_clk(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index 59b2252e6f..ef8a5e7550 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -293,7 +293,6 @@ extern unsigned long get_sdram_size(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 /*
  * Miscellaneous configurable options
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index 407e499de1..99f821a020 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -520,7 +520,6 @@ combinations. this should be removed later
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 /*
  * Miscellaneous configurable options
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index 398d0e0550..332a9b3437 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -436,7 +436,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 /*
  * Miscellaneous configurable options
diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h
index f8b1d4af38..fe4a230b46 100644
--- a/include/configs/M5208EVBE.h
+++ b/include/configs/M5208EVBE.h
@@ -21,7 +21,6 @@
 #define CONFIG_WATCHDOG_TIMEOUT		5000
 
 /* Command line configuration */
-#define CONFIG_CMD_REGINFO
 
 #define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h
index fc9b26ff46..15bbbd6b57 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -36,7 +36,6 @@
 #define CONFIG_BOOTP_HOSTNAME
 
 /* Command line configuration */
-#define CONFIG_CMD_REGINFO
 
 #define CONFIG_HOSTNAME			M52277EVB
 #define CONFIG_SYS_UBOOT_END		0x3FFFF
diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h
index 7247111cf5..84d3f3cfa6 100644
--- a/include/configs/M5235EVB.h
+++ b/include/configs/M5235EVB.h
@@ -35,7 +35,6 @@
 
 /* Command line configuration */
 #define CONFIG_CMD_PCI
-#define CONFIG_CMD_REGINFO
 
 #define CONFIG_MCFFEC
 #ifdef CONFIG_MCFFEC
diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h
index b88c3709c6..55e1163a83 100644
--- a/include/configs/M53017EVB.h
+++ b/include/configs/M53017EVB.h
@@ -26,7 +26,6 @@
 #define CONFIG_WATCHDOG_TIMEOUT		5000
 
 /* Command line configuration */
-#define CONFIG_CMD_REGINFO
 
 #define CONFIG_SYS_UNIFY_CACHE
 
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 999bcd9495..0f6cf6f898 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -26,7 +26,6 @@
 #define CONFIG_WATCHDOG_TIMEOUT	5000	/* timeout in milliseconds, max timeout is 6.71sec */
 
 /* Command line configuration */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_NANDFLASH_SIZE
 #      define CONFIG_CMD_NAND
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index 3a39e5031d..99868a35e3 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -26,7 +26,6 @@
 #define CONFIG_WATCHDOG_TIMEOUT	3360	/* timeout in ms, max is 3.36 sec */
 
 /* Command line configuration */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_NANDFLASH_SIZE
 #      define CONFIG_CMD_NAND
diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h
index f4d970d0d8..8fb9abd79c 100644
--- a/include/configs/M54418TWR.h
+++ b/include/configs/M54418TWR.h
@@ -38,7 +38,6 @@
 
 /* Command line configuration */
 #undef CONFIG_CMD_NAND
-#define CONFIG_CMD_REGINFO
 
 /*
  * NAND FLASH
diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h
index 7d6edda361..3c1cd9c837 100644
--- a/include/configs/M54451EVB.h
+++ b/include/configs/M54451EVB.h
@@ -36,7 +36,6 @@
 #define CONFIG_BOOTP_HOSTNAME
 
 /* Command line configuration */
-#define CONFIG_CMD_REGINFO
 
 /* Network configuration */
 #define CONFIG_MCFFEC
diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h
index 39ba94065a..35604ad489 100644
--- a/include/configs/M54455EVB.h
+++ b/include/configs/M54455EVB.h
@@ -37,7 +37,6 @@
 
 /* Command line configuration */
 #undef CONFIG_CMD_PCI
-#define CONFIG_CMD_REGINFO
 
 /* Network configuration */
 #define CONFIG_MCFFEC
diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h
index cf9d3b8e1b..4d250bf2a1 100644
--- a/include/configs/M5475EVB.h
+++ b/include/configs/M5475EVB.h
@@ -27,7 +27,6 @@
 
 /* Command line configuration */
 #define CONFIG_CMD_PCI
-#define CONFIG_CMD_REGINFO
 
 #define CONFIG_SLTTMR
 
diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h
index 934c9d8903..6ed73656d3 100644
--- a/include/configs/M5485EVB.h
+++ b/include/configs/M5485EVB.h
@@ -27,7 +27,6 @@
 
 /* Command line configuration */
 #define CONFIG_CMD_PCI
-#define CONFIG_CMD_REGINFO
 
 #define CONFIG_SLTTMR
 
diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h
index 15bb0e9d6a..7b36e51081 100644
--- a/include/configs/MCR3000.h
+++ b/include/configs/MCR3000.h
@@ -153,6 +153,5 @@
 #define BOOTFLAG_WARM			0x02
 
 /* Misc Settings */
-#define CONFIG_CMD_REGINFO
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 470bb72fcb..e760f25342 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -588,7 +588,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h
index 029aa572ce..f78678ecd5 100644
--- a/include/configs/MPC8541CDS.h
+++ b/include/configs/MPC8541CDS.h
@@ -342,7 +342,6 @@ extern unsigned long get_clock_freq(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index ffa8796407..4761539b83 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -348,7 +348,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 43e05516ab..8ed411b7e8 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -461,7 +461,6 @@ extern unsigned long get_clock_freq(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h
index 96a125c323..ece7fcd498 100644
--- a/include/configs/MPC8555CDS.h
+++ b/include/configs/MPC8555CDS.h
@@ -340,7 +340,6 @@ extern unsigned long get_clock_freq(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 8d026addb3..8efff50593 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -354,7 +354,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h
index 3734055bd3..705ce71613 100644
--- a/include/configs/MPC8568MDS.h
+++ b/include/configs/MPC8568MDS.h
@@ -355,7 +355,6 @@ extern unsigned long get_clock_freq(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h
index eb7db20b7f..907ab22fdb 100644
--- a/include/configs/MPC8569MDS.h
+++ b/include/configs/MPC8569MDS.h
@@ -448,7 +448,6 @@ extern unsigned long get_clock_freq(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index d8e0dfd807..f042071d21 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -547,7 +547,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h
index 1db3a633ef..391626c6f1 100644
--- a/include/configs/MPC8610HPCD.h
+++ b/include/configs/MPC8610HPCD.h
@@ -262,8 +262,6 @@
 
 #define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
 
-#define CONFIG_CMD_REGINFO
-
 #define CONFIG_ULI526X
 #ifdef CONFIG_ULI526X
 #endif
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index e87b11180a..e222001323 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -587,7 +587,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 0dc062a094..ee1b7dd196 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -723,7 +723,6 @@ extern unsigned long get_sdram_size(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #undef CONFIG_WATCHDOG			/* watchdog disabled */
 
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index 2ee6c6442f..62730ccaf7 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -592,7 +592,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/P1023RDB.h b/include/configs/P1023RDB.h
index 719043d5a1..684073ae5d 100644
--- a/include/configs/P1023RDB.h
+++ b/include/configs/P1023RDB.h
@@ -241,7 +241,6 @@ extern unsigned long get_clock_freq(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h
index 2e3a8c1184..e4ff640860 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -778,7 +778,6 @@ unsigned long get_board_ddr_clk(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index 025e7de8d0..2599ba21e9 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -789,7 +789,6 @@ unsigned long get_board_ddr_clk(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h
index 86f7880ff1..ba91934876 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -657,7 +657,6 @@ unsigned long get_board_ddr_clk(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 350dacaa38..45b103cbe5 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -770,7 +770,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 9edf19081c..d4bdeee650 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -743,7 +743,6 @@ unsigned long get_board_ddr_clk(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 0e70aa83ea..f9c7af5364 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -689,7 +689,6 @@ unsigned long get_board_ddr_clk(void);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index ed3b0f7202..f925ca73ef 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -56,8 +56,6 @@
 
 #define CONFIG_DDR_ECC
 
-#define CONFIG_CMD_REGINFO
-
 /* High Level Configuration Options */
 #define CONFIG_SYS_BOOK3E_HV		/* Category E.HV supported */
 #define CONFIG_MP			/* support multiple processors */
diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h
index a79dabef61..76220f2652 100644
--- a/include/configs/TQM834x.h
+++ b/include/configs/TQM834x.h
@@ -273,7 +273,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index 9a7aa81196..df9c1a0c43 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -420,7 +420,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 /*
  * USB
diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h
index 61989d6bab..61f0d7a938 100644
--- a/include/configs/astro_mcf5373l.h
+++ b/include/configs/astro_mcf5373l.h
@@ -59,7 +59,6 @@
 
 /* Define which commands should be available at u-boot command prompt */
 
-#define CONFIG_CMD_REGINFO
 #define CONFIG_CMDLINE_EDITING
 
 #define CONFIG_MCFRTC
diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h
index 072650dfae..2142db31da 100644
--- a/include/configs/controlcenterd.h
+++ b/include/configs/controlcenterd.h
@@ -339,9 +339,6 @@
 #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
 
 #ifndef CONFIG_TRAILBLAZER
-
-#define CONFIG_CMD_REGINFO
-
 /*
  * Board initialisation callbacks
  */
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 92e6ee0033..2b71d2a7d7 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -592,7 +592,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/cyrus.h b/include/configs/cyrus.h
index 6079540bc9..e1ae14b6e3 100644
--- a/include/configs/cyrus.h
+++ b/include/configs/cyrus.h
@@ -410,7 +410,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index 11c842d952..712e11725b 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -49,7 +49,6 @@
 /* Enable that for switching of boot partitions */
 /* Disabled by default as some sub-commands can brick eMMC */
 /*#define CONFIG_SUPPORT_EMMC_BOOT */
-#define CONFIG_CMD_REGINFO	/* Register dump		*/
 #define CONFIG_CMD_TFTP
 
 /* Partition table support */
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index a72a57c904..ce7a730469 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -812,7 +812,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 /*
  * USB
diff --git a/include/configs/p1_twr.h b/include/configs/p1_twr.h
index dffb15aea9..da1bf8d914 100644
--- a/include/configs/p1_twr.h
+++ b/include/configs/p1_twr.h
@@ -383,7 +383,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 /*
  * USB
diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h
index c26810723e..a793b9721f 100644
--- a/include/configs/qemu-ppce500.h
+++ b/include/configs/qemu-ppce500.h
@@ -10,8 +10,6 @@
 #ifndef __QEMU_PPCE500_H
 #define __QEMU_PPCE500_H
 
-#define CONFIG_CMD_REGINFO
-
 #undef CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_TEXT_BASE	0xf01000 /* 15 MB */
 
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index c328e43dd6..a9431cbd18 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -51,7 +51,6 @@
 /* PWM */
 #define CONFIG_PWM			1
 
-#define CONFIG_CMD_REGINFO
 #define CONFIG_CMD_ONENAND
 
 /* USB Composite download gadget - g_dnl */
diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h
index e872e7f810..dbd0ec9eed 100644
--- a/include/configs/sbc8548.h
+++ b/include/configs/sbc8548.h
@@ -511,7 +511,6 @@
 /*
  * Command line configuration.
  */
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/sbc8641d.h b/include/configs/sbc8641d.h
index 33b6d1fb93..3b4bfd430c 100644
--- a/include/configs/sbc8641d.h
+++ b/include/configs/sbc8641d.h
@@ -451,8 +451,6 @@
 #define CONFIG_LOADS_ECHO	1	/* echo on for serial download */
 #define CONFIG_SYS_LOADS_BAUD_CHANGE	1	/* allow baudrate change */
 
-#define CONFIG_CMD_REGINFO
-
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
 #endif
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index ab75504188..c1aace7a80 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -61,7 +61,6 @@
  ***********************************************************/
 #undef CONFIG_CMD_NAND
 
-#define CONFIG_CMD_REGINFO
 #define CONFIG_CMD_ONENAND
 #define CONFIG_CMD_MTDPARTS
 
diff --git a/include/configs/socrates.h b/include/configs/socrates.h
index bfd4e5fe3f..af726c7b7a 100644
--- a/include/configs/socrates.h
+++ b/include/configs/socrates.h
@@ -280,7 +280,6 @@
  * Command line configuration.
  */
 #define CONFIG_CMD_SDRAM
-#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
diff --git a/include/configs/t4qds.h b/include/configs/t4qds.h
index 6d8c78f76b..509a00c468 100644
--- a/include/configs/t4qds.h
+++ b/include/configs/t4qds.h
@@ -10,8 +10,6 @@
 #ifndef __T4QDS_H
 #define __T4QDS_H
 
-#define CONFIG_CMD_REGINFO
-
 /* High Level Configuration Options */
 #define CONFIG_SYS_BOOK3E_HV		/* Category E.HV supported */
 #define CONFIG_MP			/* support multiple processors */
diff --git a/include/configs/vct.h b/include/configs/vct.h
index 7b04e65d70..9792c46bc3 100644
--- a/include/configs/vct.h
+++ b/include/configs/vct.h
@@ -252,7 +252,6 @@ int vct_gpio_get(int pin);
  * (NOR/OneNAND) usage and Linux kernel booting.
  */
 #if defined(CONFIG_VCT_SMALL_IMAGE)
-#undef CONFIG_CMD_REGINFO
 #undef CONFIG_CMD_STRINGS
 #undef CONFIG_CMD_TERMINAL
 
diff --git a/include/configs/xilinx-ppc.h b/include/configs/xilinx-ppc.h
index e8a0c1c33d..a924c6eb17 100644
--- a/include/configs/xilinx-ppc.h
+++ b/include/configs/xilinx-ppc.h
@@ -24,7 +24,6 @@
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024)
 
 /*Cmd*/
-#define CONFIG_CMD_REGINFO
 #undef CONFIG_CMD_MTDPARTS
 
 /*Misc*/
diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h
index 07f26544fd..2c1575c23f 100644
--- a/include/configs/xpedite517x.h
+++ b/include/configs/xpedite517x.h
@@ -489,7 +489,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_CMD_PCA953X_INFO
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_PCI_ENUM
-#define CONFIG_CMD_REGINFO
 
 /*
  * Miscellaneous configurable options
diff --git a/include/configs/xpedite520x.h b/include/configs/xpedite520x.h
index 2645006b37..267d8f7a98 100644
--- a/include/configs/xpedite520x.h
+++ b/include/configs/xpedite520x.h
@@ -292,7 +292,6 @@
 #define CONFIG_CMD_PCA953X_INFO
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_PCI_ENUM
-#define CONFIG_CMD_REGINFO
 
 /*
  * Miscellaneous configurable options
diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h
index abbaeaad10..03b1734ab6 100644
--- a/include/configs/xpedite537x.h
+++ b/include/configs/xpedite537x.h
@@ -342,7 +342,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_CMD_PCA953X_INFO
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_PCI_ENUM
-#define CONFIG_CMD_REGINFO
 
 /*
  * Miscellaneous configurable options
diff --git a/include/configs/xpedite550x.h b/include/configs/xpedite550x.h
index 254fc12cf6..2dbec9fd8c 100644
--- a/include/configs/xpedite550x.h
+++ b/include/configs/xpedite550x.h
@@ -341,7 +341,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_CMD_PCA953X_INFO
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_PCI_ENUM
-#define CONFIG_CMD_REGINFO
 
 /*
  * Miscellaneous configurable options
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index e261d02455..46e4aba0db 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -309,7 +309,6 @@ CONFIG_CMD_PCI_ENUM
 CONFIG_CMD_PCMCIA
 CONFIG_CMD_PORTIO
 CONFIG_CMD_READ
-CONFIG_CMD_REGINFO
 CONFIG_CMD_REISER
 CONFIG_CMD_SANDBOX
 CONFIG_CMD_SAVES
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 08/14] powerpc, 8xx: Simplifying check_CPU()
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (6 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 07/14] Convert CONFIG_CMD_REGINFO to Kconfig Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 09/14] powerpc, 8xx: Move cache function into C files Christophe Leroy
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

All complex case have been removed and we now only support
MPC866 and MPC885 families.

So check_CPU() can be made a lot simpler.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/cpu.c | 39 +++++++--------------------------------
 1 file changed, 7 insertions(+), 32 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 74e6c6d02c..1e0ea28a91 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -34,19 +34,11 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static char *cpu_warning = "\n         " \
-	"*** Warning: CPU Core has Silicon Bugs -- Check the Errata ***";
-
 static int check_CPU(long clock, uint pvr, uint immr)
 {
-	char *id_str =
-	NULL;
 	immap_t __iomem *immap = (immap_t __iomem *)(immr & 0xFFFF0000);
-	uint k, m;
+	uint k;
 	char buf[32];
-	char pre = 'X';
-	char *mid = "xx";
-	char *suf;
 
 	/* the highest 16 bits should be 0x0050 for a 860 */
 
@@ -55,8 +47,6 @@ static int check_CPU(long clock, uint pvr, uint immr)
 
 	k = (immr << 16) |
 	    in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]);
-	m = 0;
-	suf = "";
 
 	/*
 	 * Some boards use sockets so different CPUs can be used.
@@ -65,32 +55,20 @@ static int check_CPU(long clock, uint pvr, uint immr)
 	switch (k) {
 		/* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */
 	case 0x08010004:		/* Rev. A.0 */
-		suf = "A";
-		/* fall through */
+		printf("MPC866xxxZPnnA");
+		break;
 	case 0x08000003:		/* Rev. 0.3 */
-		pre = 'M'; m = 1;
-		if (id_str == NULL)
-			id_str =
-		"PC866x"; /* Unknown chip from MPC866 family */
+		printf("MPC866xxxZPnn");
 		break;
-	case 0x09000000:
-		pre = 'M'; mid = suf = ""; m = 1;
-		if (id_str == NULL)
-			id_str = "PC885"; /* 870/875/880/885 */
+	case 0x09000000:		/* 870/875/880/885 */
+		puts("MPC885ZPnn");
 		break;
 
 	default:
-		suf = NULL;
+		printf("unknown MPC86x (0x%08x)", k);
 		break;
 	}
 
-	if (id_str == NULL)
-		id_str = "PC86x";	/* Unknown 86x chip */
-	if (suf)
-		printf("%c%s%sZPnn%s", pre, id_str, mid, suf);
-	else
-		printf("unknown M%s (0x%08x)", id_str, k);
-
 	printf(" at %s MHz: ", strmhz(buf, clock));
 
 	print_size(checkicache(), " I-Cache ");
@@ -102,9 +80,6 @@ static int check_CPU(long clock, uint pvr, uint immr)
 	if (in_be32(&immap->im_cpm.cp_fec.fec_addr_low) == 0x12345678)
 		printf(" FEC present");
 
-	if (!m)
-		puts(cpu_warning);
-
 	putc('\n');
 
 	return 0;
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 09/14] powerpc, 8xx: Move cache function into C files
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (7 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 08/14] powerpc, 8xx: Simplifying check_CPU() Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 10/14] powerpc, 8xx: move get_immr() into C Christophe Leroy
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

Avoid unnecessary assembly functions when they can easily be written
in C.

Also remove dc_read() as it is nowhere referenced

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/Makefile |  1 +
 arch/powerpc/cpu/mpc8xx/cache.c  | 49 +++++++++++++++++++++++++++++++++++
 arch/powerpc/cpu/mpc8xx/start.S  | 56 ----------------------------------------
 3 files changed, 50 insertions(+), 56 deletions(-)
 create mode 100644 arch/powerpc/cpu/mpc8xx/cache.c

diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile
index b40bffb047..40f38923ec 100644
--- a/arch/powerpc/cpu/mpc8xx/Makefile
+++ b/arch/powerpc/cpu/mpc8xx/Makefile
@@ -14,3 +14,4 @@ obj-$(CONFIG_CMD_IMMAP) += immap.o
 obj-y	+= interrupts.o
 obj-$(CONFIG_CMD_REGINFO) += reginfo.o
 obj-y	+= speed.o
+obj-y	+= cache.o
diff --git a/arch/powerpc/cpu/mpc8xx/cache.c b/arch/powerpc/cpu/mpc8xx/cache.c
new file mode 100644
index 0000000000..f8cd5f5e33
--- /dev/null
+++ b/arch/powerpc/cpu/mpc8xx/cache.c
@@ -0,0 +1,49 @@
+/*
+ * (C) Copyright 2017
+ * Christophe Leroy, CS Systemes d'Information, christophe.leroy at c-s.fr
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/processor.h>
+#include <asm/ppc.h>
+#include <asm/io.h>
+#include <asm/mmu.h>
+
+int icache_status(void)
+{
+	return !!(mfspr(IC_CST) & IDC_ENABLED);
+}
+
+void icache_enable(void)
+{
+	sync();
+	mtspr(IC_CST, IDC_INVALL);
+	mtspr(IC_CST, IDC_ENABLE);
+}
+
+void icache_disable(void)
+{
+	sync();
+	mtspr(IC_CST, IDC_DISABLE);
+}
+
+int dcache_status(void)
+{
+	return !!(mfspr(IC_CST) & IDC_ENABLED);
+}
+
+void dcache_enable(void)
+{
+	mtspr(MD_CTR, MD_RESETVAL);	/* Set cache mode with MMU off */
+	mtspr(DC_CST, IDC_INVALL);
+	mtspr(DC_CST, IDC_ENABLE);
+}
+
+void dcache_disable(void)
+{
+	sync();
+	mtspr(DC_CST, IDC_DISABLE);
+	mtspr(DC_CST, IDC_INVALL);
+}
diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S
index b00696fc75..cd3b29425f 100644
--- a/arch/powerpc/cpu/mpc8xx/start.S
+++ b/arch/powerpc/cpu/mpc8xx/start.S
@@ -305,62 +305,6 @@ int_return:
 	SYNC
 	rfi
 
-/* Cache functions.
-*/
-	.globl	icache_enable
-icache_enable:
-	SYNC
-	lis	r3, IDC_INVALL at h
-	mtspr	IC_CST, r3
-	lis	r3, IDC_ENABLE at h
-	mtspr	IC_CST, r3
-	blr
-
-	.globl	icache_disable
-icache_disable:
-	SYNC
-	lis	r3, IDC_DISABLE at h
-	mtspr	IC_CST, r3
-	blr
-
-	.globl	icache_status
-icache_status:
-	mfspr	r3, IC_CST
-	srwi	r3, r3, 31	/* >>31 => select bit 0 */
-	blr
-
-	.globl	dcache_enable
-dcache_enable:
-	lis	r3, 0x0400		/* Set cache mode with MMU off */
-	mtspr	MD_CTR, r3
-
-	lis	r3, IDC_INVALL at h
-	mtspr	DC_CST, r3
-	lis	r3, IDC_ENABLE at h
-	mtspr	DC_CST, r3
-	blr
-
-	.globl	dcache_disable
-dcache_disable:
-	SYNC
-	lis	r3, IDC_DISABLE at h
-	mtspr	DC_CST, r3
-	lis	r3, IDC_INVALL at h
-	mtspr	DC_CST, r3
-	blr
-
-	.globl	dcache_status
-dcache_status:
-	mfspr	r3, DC_CST
-	srwi	r3, r3, 31	/* >>31 => select bit 0 */
-	blr
-
-	.globl	dc_read
-dc_read:
-	mtspr	DC_ADR, r3
-	mfspr	r3, DC_DAT
-	blr
-
 /*
  * unsigned int get_immr (unsigned int mask)
  *
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 10/14] powerpc, 8xx: move get_immr() into C
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (8 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 09/14] powerpc, 8xx: Move cache function into C files Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 11/14] powerpc, 8xx: move cache helper " Christophe Leroy
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

Avoid unnecessary assembly functions when they can easily be written
in C.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/start.S | 15 ---------------
 arch/powerpc/include/asm/ppc.h  |  9 ++++++++-
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S
index cd3b29425f..fbdc82a079 100644
--- a/arch/powerpc/cpu/mpc8xx/start.S
+++ b/arch/powerpc/cpu/mpc8xx/start.S
@@ -305,21 +305,6 @@ int_return:
 	SYNC
 	rfi
 
-/*
- * unsigned int get_immr (unsigned int mask)
- *
- * return (mask ? (IMMR & mask) : IMMR);
- */
-	.globl	get_immr
-get_immr:
-	mr	r4,r3		/* save mask */
-	mfspr	r3, IMMR	/* IMMR */
-	cmpwi	0,r4,0		/* mask != 0 ? */
-	beq	4f
-	and	r3,r3,r4	/* IMMR & mask */
-4:
-	blr
-
 	.globl get_pvr
 get_pvr:
 	mfspr	r3, PVR
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index 4013ddaa74..1f650a7fb3 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -38,8 +38,15 @@
 #include <asm/arch/immap_lsch2.h>
 #endif
 
+#include <asm/processor.h>
+
 #if defined(CONFIG_8xx)
-uint get_immr(uint);
+static inline uint get_immr(uint mask)
+{
+	uint immr = mfspr(SPRN_IMMR);
+
+	return mask ? (immr & mask) : immr;
+}
 #endif
 uint get_pvr(void);
 uint get_svr(void);
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 11/14] powerpc, 8xx: move cache helper into C
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (9 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 10/14] powerpc, 8xx: move get_immr() into C Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 12/14] powerpc: move get_pvr() and get_svr() " Christophe Leroy
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

Avoid unnecessary assembly functions when they can easily be written
in C.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/start.S  | 32 --------------------------------
 arch/powerpc/include/asm/cache.h | 32 ++++++++++++++++++++++++++++++++
 arch/powerpc/include/asm/ppc.h   |  6 ------
 3 files changed, 32 insertions(+), 38 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S
index fbdc82a079..4c25d3765b 100644
--- a/arch/powerpc/cpu/mpc8xx/start.S
+++ b/arch/powerpc/cpu/mpc8xx/start.S
@@ -310,38 +310,6 @@ get_pvr:
 	mfspr	r3, PVR
 	blr
 
-
-	.globl wr_ic_cst
-wr_ic_cst:
-	mtspr	IC_CST, r3
-	blr
-
-	.globl rd_ic_cst
-rd_ic_cst:
-	mfspr	r3, IC_CST
-	blr
-
-	.globl wr_ic_adr
-wr_ic_adr:
-	mtspr	IC_ADR, r3
-	blr
-
-
-	.globl wr_dc_cst
-wr_dc_cst:
-	mtspr	DC_CST, r3
-	blr
-
-	.globl rd_dc_cst
-rd_dc_cst:
-	mfspr	r3, DC_CST
-	blr
-
-	.globl wr_dc_adr
-wr_dc_adr:
-	mtspr	DC_ADR, r3
-	blr
-
 /*------------------------------------------------------------------------------*/
 
 /*
diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h
index d3a83910b6..0801d2c367 100644
--- a/arch/powerpc/include/asm/cache.h
+++ b/arch/powerpc/include/asm/cache.h
@@ -107,6 +107,38 @@ void disable_cpc_sram(void);
 
 #define DC_DFWT		0x40000000	/* Data cache is forced write through */
 #define DC_LES		0x20000000	/* Caches are little endian mode */
+
+#if !defined(__ASSEMBLY__)
+static inline uint rd_ic_cst(void)
+{
+	return mfspr(IC_CST);
+}
+
+static inline void wr_ic_cst(uint val)
+{
+	mtspr(IC_CST, val);
+}
+
+static inline void wr_ic_adr(uint val)
+{
+	mtspr(IC_ADR, val);
+}
+
+static inline uint rd_dc_cst(void)
+{
+	return mfspr(DC_CST);
+}
+
+static inline void wr_dc_cst(uint val)
+{
+	mtspr(DC_CST, val);
+}
+
+static inline void wr_dc_adr(uint val)
+{
+	mtspr(DC_ADR, val);
+}
+#endif
 #endif /* CONFIG_8xx */
 
 #endif
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index 1f650a7fb3..c41dc1fee0 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -50,12 +50,6 @@ static inline uint get_immr(uint mask)
 #endif
 uint get_pvr(void);
 uint get_svr(void);
-uint rd_ic_cst(void);
-void wr_ic_cst(uint);
-void wr_ic_adr(uint);
-uint rd_dc_cst(void);
-void wr_dc_cst(uint);
-void wr_dc_adr(uint);
 
 #if defined(CONFIG_MPC85xx)	|| \
 	defined(CONFIG_MPC86xx)	|| \
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 12/14] powerpc: move get_pvr() and get_svr() into C
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (10 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 11/14] powerpc, 8xx: move cache helper " Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 13/14] powerpc, 8xx: fix missing function declarations Christophe Leroy
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

Avoid unnecessary assembly functions when they can easily be written
in C.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc83xx/start.S | 10 ----------
 arch/powerpc/cpu/mpc85xx/start.S | 10 ----------
 arch/powerpc/cpu/mpc86xx/start.S | 10 ----------
 arch/powerpc/cpu/mpc8xx/start.S  |  5 -----
 arch/powerpc/include/asm/ppc.h   | 11 +++++++++--
 5 files changed, 9 insertions(+), 37 deletions(-)

diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
index 2fed4a1fec..d99ae27a65 100644
--- a/arch/powerpc/cpu/mpc83xx/start.S
+++ b/arch/powerpc/cpu/mpc83xx/start.S
@@ -116,16 +116,6 @@ disable_addr_trans:
 	mtspr	SRR1, r3
 	rfi
 
-	.globl get_svr
-get_svr:
-	mfspr	r3, SVR
-	blr
-
-	.globl get_pvr
-get_pvr:
-	mfspr	r3, PVR
-	blr
-
 	.globl	ppcDWstore
 ppcDWstore:
 	lfd	1, 0(r4)
diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S
index 63fdffddb1..f03e1a0bfe 100644
--- a/arch/powerpc/cpu/mpc85xx/start.S
+++ b/arch/powerpc/cpu/mpc85xx/start.S
@@ -1427,16 +1427,6 @@ dcache_status:
 	andi.	r3,r3,L1CSR0_DCE
 	blr
 
-	.globl get_pvr
-get_pvr:
-	mfspr	r3,PVR
-	blr
-
-	.globl get_svr
-get_svr:
-	mfspr	r3,SVR
-	blr
-
 /*------------------------------------------------------------------------------- */
 /* Function:	 in8 */
 /* Description:	 Input 8 bits */
diff --git a/arch/powerpc/cpu/mpc86xx/start.S b/arch/powerpc/cpu/mpc86xx/start.S
index ec5f4a756a..b9e544d23c 100644
--- a/arch/powerpc/cpu/mpc86xx/start.S
+++ b/arch/powerpc/cpu/mpc86xx/start.S
@@ -545,16 +545,6 @@ int_return:
 dc_read:
 	blr
 
-	.globl get_pvr
-get_pvr:
-	mfspr	r3, PVR
-	blr
-
-	.globl get_svr
-get_svr:
-	mfspr	r3, SVR
-	blr
-
 
 /*
  * Function:	in8
diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S
index 4c25d3765b..202ea81ae4 100644
--- a/arch/powerpc/cpu/mpc8xx/start.S
+++ b/arch/powerpc/cpu/mpc8xx/start.S
@@ -305,11 +305,6 @@ int_return:
 	SYNC
 	rfi
 
-	.globl get_pvr
-get_pvr:
-	mfspr	r3, PVR
-	blr
-
 /*------------------------------------------------------------------------------*/
 
 /*
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index c41dc1fee0..e8650e4388 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -48,8 +48,15 @@ static inline uint get_immr(uint mask)
 	return mask ? (immr & mask) : immr;
 }
 #endif
-uint get_pvr(void);
-uint get_svr(void);
+static inline uint get_pvr(void)
+{
+	return mfspr(PVR);
+}
+
+static inline uint get_svr(void)
+{
+	return mfspr(SVR);
+}
 
 #if defined(CONFIG_MPC85xx)	|| \
 	defined(CONFIG_MPC86xx)	|| \
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 13/14] powerpc, 8xx: fix missing function declarations.
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (11 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 12/14] powerpc: move get_pvr() and get_svr() " Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12  9:43 ` [U-Boot] [PATCH 14/14] powerpc: Remove 8260 remainders Christophe Leroy
  2017-07-12 19:56 ` [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Tom Rini
  14 siblings, 0 replies; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

Add missing .h and add missing declarations in .h
Declare local functions as static

Based on warnings reported by 'make C=2'

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/immap.c | 13 +++++++------
 arch/powerpc/cpu/mpc8xx/traps.c |  2 +-
 arch/powerpc/include/asm/ppc.h  |  5 +++++
 arch/powerpc/lib/bootm.c        |  2 ++
 arch/powerpc/lib/interrupts.c   |  3 ---
 drivers/net/mpc8xx_fec.c        |  1 +
 6 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
index 6da085325d..2284979dd6 100644
--- a/arch/powerpc/cpu/mpc8xx/immap.c
+++ b/arch/powerpc/cpu/mpc8xx/immap.c
@@ -19,7 +19,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
@@ -36,7 +36,8 @@ int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
+		       char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	memctl8xx_t __iomem *memctl = &immap->im_memctl;
@@ -58,7 +59,7 @@ int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	car8xx_t __iomem *car = &immap->im_clkrst;
@@ -119,7 +120,7 @@ static void binary(char *label, uint value, int nbits)
 #define PC_NBITS	12
 #define PD_NBITS	13
 
-int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	iop8xx_t __iomem *iop = &immap->im_ioport;
@@ -172,7 +173,7 @@ int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * this needs a clean up for smaller tighter code
  * use *uint and set the address based on cmd + port
  */
-int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	uint rcode = 0;
 	iopin_t iopin;
@@ -328,7 +329,7 @@ static void prbrg(int n, uint val)
 	putc('\n');
 }
 
-int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	cpm8xx_t __iomem *cp = &immap->im_cpm;
diff --git a/arch/powerpc/cpu/mpc8xx/traps.c b/arch/powerpc/cpu/mpc8xx/traps.c
index ebf4e412c9..23646adadd 100644
--- a/arch/powerpc/cpu/mpc8xx/traps.c
+++ b/arch/powerpc/cpu/mpc8xx/traps.c
@@ -52,7 +52,7 @@ static void print_backtrace(unsigned long *sp)
 	printf("\n");
 }
 
-void show_regs(struct pt_regs *regs)
+static void show_regs(struct pt_regs *regs)
 {
 	int i;
 
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index e8650e4388..a640c7320d 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -122,6 +122,11 @@ static inline void set_msr(unsigned long msr)
 void mpc8xxx_reginfo(void);
 #endif
 
+void cpu_init_f(immap_t __iomem *immr);
+int interrupt_init_cpu(unsigned *);
+void timer_interrupt_cpu(struct pt_regs *);
+unsigned long search_exception_table(unsigned long addr);
+
 #endif /* !__ASSEMBLY__ */
 
 #ifdef CONFIG_PPC
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 42a6afbc31..0e204027af 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -18,6 +18,8 @@
 #include <environment.h>
 #include <asm/byteorder.h>
 #include <asm/mp.h>
+#include <bootm.h>
+#include <vxworks.h>
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
index ccba829710..46fa18c63f 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -28,9 +28,6 @@ void __board_show_activity (ulong dummy)
 #define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2)
 #endif
 
-extern int interrupt_init_cpu (unsigned *);
-extern void timer_interrupt_cpu (struct pt_regs *);
-
 static unsigned decrementer_count; /* count value for 1e6/HZ microseconds */
 
 static __inline__ unsigned long get_dec (void)
diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c
index e525d3b593..71fe984a5d 100644
--- a/drivers/net/mpc8xx_fec.c
+++ b/drivers/net/mpc8xx_fec.c
@@ -10,6 +10,7 @@
 #include <commproc.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <asm/io.h>
 
 #include <phy.h>
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 14/14] powerpc: Remove 8260 remainders
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (12 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 13/14] powerpc, 8xx: fix missing function declarations Christophe Leroy
@ 2017-07-12  9:43 ` Christophe Leroy
  2017-07-12 19:56 ` [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Tom Rini
  14 siblings, 0 replies; 28+ messages in thread
From: Christophe Leroy @ 2017-07-12  9:43 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 MAINTAINERS                          |  6 ------
 arch/powerpc/include/asm/processor.h | 14 --------------
 drivers/i2c/soft_i2c.c               |  4 ----
 drivers/serial/serial.c              |  3 ---
 include/ioports.h                    |  7 ++-----
 5 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1e8d7d9bb6..1778a76736 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -324,12 +324,6 @@ S:	Maintained
 T:	git git://git.denx.de/u-boot-mpc8xx.git
 F:	arch/powerpc/cpu/mpc8xx/
 
-POWERPC MPC82XX
-M:	Wolfgang Denk <wd@denx.de>
-S:	Maintained
-T:	git git://git.denx.de/u-boot-mpc82xx.git
-F:	arch/powerpc/cpu/mpc82*/
-
 POWERPC MPC83XX
 M:	Mario Six <mario.six@gdsys.cc>
 S:	Maintained
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 30ac4f8c10..baf38f8441 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -978,18 +978,6 @@
 #define PVR_850		PVR_821
 #define PVR_860		PVR_821
 #define PVR_7400	0x000C0000
-#define PVR_8240	0x00810100
-
-/*
- * PowerQUICC II family processors report different PVR values depending
- * on silicon process (HiP3, HiP4, HiP7, etc.)
- */
-#define PVR_8260	PVR_8240
-#define PVR_8260_HIP3	0x00810101
-#define PVR_8260_HIP4	0x80811014
-#define PVR_8260_HIP7	0x80822011
-#define PVR_8260_HIP7R1 0x80822013
-#define PVR_8260_HIP7RA	0x80822014
 
 /*
  * MPC 52xx
@@ -1345,8 +1333,6 @@ void ll_puts(const char *);
 void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
 
 int prt_83xx_rsr(void);
-int prt_8260_rsr(void);
-int prt_8260_clks(void);
 
 #endif /* ndef ASSEMBLY*/
 
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index a21e4a2627..4fd5551a22 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -17,10 +17,6 @@
  */
 
 #include <common.h>
-#ifdef	CONFIG_MPC8260			/* only valid for MPC8260 */
-#include <ioports.h>
-#include <asm/io.h>
-#endif
 #if defined(CONFIG_AT91FAMILY)
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 87542f92df..cc4bdcb834 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -133,9 +133,6 @@ serial_initfunc(marvell_serial_initialize);
 serial_initfunc(max3100_serial_initialize);
 serial_initfunc(mcf_serial_initialize);
 serial_initfunc(ml2_serial_initialize);
-serial_initfunc(mpc5xx_serial_initialize);
-serial_initfunc(mpc8260_scc_serial_initialize);
-serial_initfunc(mpc8260_smc_serial_initialize);
 serial_initfunc(mpc85xx_serial_initialize);
 serial_initfunc(mpc8xx_serial_initialize);
 serial_initfunc(mxc_serial_initialize);
diff --git a/include/ioports.h b/include/ioports.h
index 1134ea5208..1cd3ceb37a 100644
--- a/include/ioports.h
+++ b/include/ioports.h
@@ -1,14 +1,12 @@
 /*
- * definitions for MPC8260 I/O Ports
- *
- * (in addition to those provided in <asm/immap_8260.h>)
+ * definitions for MPC8xxx I/O Ports
  *
  * Murray.Jensen at cmst.csiro.au, 20-Oct-00
  */
 
 /*
  * this structure mirrors the layout of the five port registers in
- * the internal memory map - see iop8260_t in <asm/immap_8260.h>
+ * the internal memory map
  */
 typedef struct {
     unsigned int pdir;		/* Port Data Direction Register (35-3) */
@@ -46,7 +44,6 @@ typedef struct {
 
 /*
  * a table that contains configuration information for all 32 pins
- * of all four MPC8260 I/O ports.
  *
  * NOTE: in the second dimension of this table, index 0 refers to pin 31
  * and index 31 refers to pin 0. this made the code in the table look more
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 01/14] powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
  2017-07-12  9:43 ` [U-Boot] [PATCH 01/14] powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk() Christophe Leroy
@ 2017-07-12 12:52   ` Wolfgang Denk
  2017-07-13 13:12     ` Christophe LEROY
  0 siblings, 1 reply; 28+ messages in thread
From: Wolfgang Denk @ 2017-07-12 12:52 UTC (permalink / raw)
  To: u-boot

Dear Christophe,

In message <59ac182501e89d3b9ee1dc7c31ce358ff33c0877.1499629706.git.christophe.leroy@c-s.fr> you wrote:
> divider is calculated based on SCCR_DFBRG, with:
> SCCR_DFBRG 00 => divider 1  = 1 << 0
> SCCR_DFBRG 01 => divider 4  = 1 << 2
> SCCR_DFBRG 10 => divider 16 = 1 << 4
> SCCR_DFBRG 11 => divider 64 = 1 << 6
> 
> This can be easily converted to a single shift operation:
> divider = 1 << (SCCR_DFBRG * 2)

Agreed, but...

> -	switch ((sccr & SCCR_DFBRG11) >> 11) {
...
> +	uint divider = 1 << ((sccr & SCCR_DFBRG11) >> 10);

The code would be easier to read / understand if you made the
calculation obvious, i. e.

	uint divider = 1 << (((sccr & SCCR_DFBRG11) >> 11) * 2);

The compiler generates the same code, so there is no size effect.

Reviewed-by: Wolfgang Denk <wd@denx.de>


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
Man is the best computer we can put aboard a spacecraft ...  and  the
only one that can be mass produced with unskilled labor.
                                                  - Wernher von Braun

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 02/14] powerpc: get rid of addr_probe()
  2017-07-12  9:43 ` [U-Boot] [PATCH 02/14] powerpc: get rid of addr_probe() Christophe Leroy
@ 2017-07-12 12:56   ` Wolfgang Denk
  0 siblings, 0 replies; 28+ messages in thread
From: Wolfgang Denk @ 2017-07-12 12:56 UTC (permalink / raw)
  To: u-boot

Dear Christophe Leroy,

In message <6783d2c1b0bdbdb18cddd0973fefec604c173843.1499629706.git.christophe.leroy@c-s.fr> you wrote:
> This function has never been used, at least since the beginning
> of the git repository
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

Reviewed-by: Wolfgang Denk <wd@denx.de>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 04/14] power, timer: reset TBL before TBU
  2017-07-12  9:43 ` [U-Boot] [PATCH 04/14] power, timer: reset TBL before TBU Christophe Leroy
@ 2017-07-12 13:00   ` Wolfgang Denk
  0 siblings, 0 replies; 28+ messages in thread
From: Wolfgang Denk @ 2017-07-12 13:00 UTC (permalink / raw)
  To: u-boot

Dear Christophe Leroy,

In message <ce88a7347bdc84fa4658e0ddbd3214d887d6a658.1499629706.git.christophe.leroy@c-s.fr> you wrote:
> In order to avoid TBU increment due to TBL reaching its max
> and wrapping, reset TBL before resetting TBU
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
>  arch/powerpc/lib/time.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Reviewed-by: Wolfgang Denk <wd@denx.de>

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
How many seconds are there in a year? If I tell you there are 3.155 x
10^7, you won't even try to remember it. On the other hand, who could
forget that, to within half a percent, pi seconds is a nanocentury.
                                                - Tom Duff, Bell Labs

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 05/14] powerpc: move set_msr() and get_msr() into .h
  2017-07-12  9:43 ` [U-Boot] [PATCH 05/14] powerpc: move set_msr() and get_msr() into .h Christophe Leroy
@ 2017-07-12 13:03   ` Wolfgang Denk
  0 siblings, 0 replies; 28+ messages in thread
From: Wolfgang Denk @ 2017-07-12 13:03 UTC (permalink / raw)
  To: u-boot

Dear Christophe Leroy,

In message <f25d62de0489e338a091e2c4993146e2f0cbc9a5.1499629706.git.christophe.leroy@c-s.fr> you wrote:
> set_msr() and get_msr() are defined and used twice.
> This patch moves them into ppc.h
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
>  arch/powerpc/include/asm/ppc.h | 14 ++++++++++++++
>  arch/powerpc/lib/interrupts.c  | 14 --------------
>  arch/powerpc/lib/kgdb.c        | 14 --------------
>  3 files changed, 14 insertions(+), 28 deletions(-)
> 
Reviewed-by: Wolfgang Denk <wd@denx.de>

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
"Stupidity, like virtue, is its own reward"     - William E. Davidsen

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo
  2017-07-12  9:43 ` [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo Christophe Leroy
@ 2017-07-12 13:07   ` Wolfgang Denk
  2017-07-12 14:28     ` Christophe LEROY
  0 siblings, 1 reply; 28+ messages in thread
From: Wolfgang Denk @ 2017-07-12 13:07 UTC (permalink / raw)
  To: u-boot

Dear Christophe Leroy,

In message <a0ecab632c81feb7b40679076a6165ac7050d9b8.1499629706.git.christophe.leroy@c-s.fr> you wrote:
> reginfo command is calling mpc8xx_reginfo(), mpc85xx_reginfo()
> or mpc86xx_reginfo() based on CONFIG_ symbol.
> As those 3 functions can't me defined at the same time, let's
> rename them mpc8xxx_reginfo() to avoid the #ifdefs

This is indeed a tempting idea, but MPC8xx is a totally different
thing than MPC8xxxx, so the chosen name is misleading and should be
avoided.

> Lets all remove the #ifdefs around the U_BOOT_CMD as this
> file is only compiled when CONFIG_CMD_REGINFO is defined

Has this change been tested / verified against all other boards /
architectures?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
I will also, for an appropriate fee, certify that  your  keyboard  is
object-oriented,  and  that  the bits on your hard disk are template-
compatible.            - Jeffrey S. Haemer in <411akr$3ga@cygnus.com>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 07/14] Convert CONFIG_CMD_REGINFO to Kconfig
  2017-07-12  9:43 ` [U-Boot] [PATCH 07/14] Convert CONFIG_CMD_REGINFO to Kconfig Christophe Leroy
@ 2017-07-12 13:11   ` Wolfgang Denk
  0 siblings, 0 replies; 28+ messages in thread
From: Wolfgang Denk @ 2017-07-12 13:11 UTC (permalink / raw)
  To: u-boot

Dear Christophe Leroy,

In message <2fb524f1d8748bbc74a9a466ef1c798cecfdee27.1499629706.git.christophe.leroy@c-s.fr> you wrote:

In cases like here...

> --- a/include/configs/B4860QDS.h
> +++ b/include/configs/B4860QDS.h
> @@ -702,7 +702,6 @@ unsigned long get_board_ddr_clk(void);
>  /*
>   * Command line configuration.
>   */
> -#define CONFIG_CMD_REGINFO
>  
>  #ifdef CONFIG_PCI
>  #define CONFIG_CMD_PCI

or here:

> diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
> index 59b2252e6f..ef8a5e7550 100644
> --- a/include/configs/BSC9131RDB.h
> +++ b/include/configs/BSC9131RDB.h
> @@ -293,7 +293,6 @@ extern unsigned long get_sdram_size(void);
>  /*
>   * Command line configuration.
>   */
> -#define CONFIG_CMD_REGINFO
>  
>  /*
>   * Miscellaneous configurable options

or here:

> diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
> index 407e499de1..99f821a020 100644
> --- a/include/configs/BSC9132QDS.h
> +++ b/include/configs/BSC9132QDS.h
> @@ -520,7 +520,6 @@ combinations. this should be removed later
>  /*
>   * Command line configuration.
>   */
> -#define CONFIG_CMD_REGINFO
>  
>  /*
>   * Miscellaneous configurable options

or here:

> diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
> index 398d0e0550..332a9b3437 100644
> --- a/include/configs/C29XPCIE.h
> +++ b/include/configs/C29XPCIE.h
> @@ -436,7 +436,6 @@
>  /*
>   * Command line configuration.
>   */
> -#define CONFIG_CMD_REGINFO
>  
>  /*
>   * Miscellaneous configurable options

...and so on you should also remove the now useless comments, please!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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
HEALTH WARNING: Care Should Be Taken When Lifting This Product, Since
Its Mass, and Thus Its Weight, Is Dependent on Its Velocity  Relative
to the User.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo
  2017-07-12 13:07   ` Wolfgang Denk
@ 2017-07-12 14:28     ` Christophe LEROY
  2017-07-12 14:53       ` Wolfgang Denk
  0 siblings, 1 reply; 28+ messages in thread
From: Christophe LEROY @ 2017-07-12 14:28 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang,

Le 12/07/2017 à 15:07, Wolfgang Denk a écrit :
> Dear Christophe Leroy,
> 
> In message <a0ecab632c81feb7b40679076a6165ac7050d9b8.1499629706.git.christophe.leroy@c-s.fr> you wrote:
>> reginfo command is calling mpc8xx_reginfo(), mpc85xx_reginfo()
>> or mpc86xx_reginfo() based on CONFIG_ symbol.
>> As those 3 functions can't me defined at the same time, let's
>> rename them mpc8xxx_reginfo() to avoid the #ifdefs
> 
> This is indeed a tempting idea, but MPC8xx is a totally different
> thing than MPC8xxxx, so the chosen name is misleading and should be
> avoided.

Oh ? Ok. I thought it would be a possible name because for instance in 
the Linux Kernel, the watchdog driver is named that way and used also 
for the 8xx and so was also the SPI driver before its name was change to 
fsl_spi.
Isn't the 8xx an 81xx indeed ?

Any suggestion for a good name ? Would fsl_reginfo() be a good name ?


> 
>> Lets all remove the #ifdefs around the U_BOOT_CMD as this
>> file is only compiled when CONFIG_CMD_REGINFO is defined
> 
> Has this change been tested / verified against all other boards /
> architectures?

Travis-CI is not working at the time being, but what would be the issue ?

In the Makefile, it is defined as
obj-$(CONFIG_CMD_REGINFO) += reginfo.o, so if CONFIG_CMD_REGINFO is not 
defined, this file won't be compiled at all, will it ?

Regards
Christophe

> 
> Best regards,
> 
> Wolfgang Denk
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo
  2017-07-12 14:28     ` Christophe LEROY
@ 2017-07-12 14:53       ` Wolfgang Denk
  2017-07-12 19:56         ` Tom Rini
  0 siblings, 1 reply; 28+ messages in thread
From: Wolfgang Denk @ 2017-07-12 14:53 UTC (permalink / raw)
  To: u-boot

Dear Christophe,

In message <194b25e4-81fc-52cf-aeef-61ce6f4679a7@c-s.fr> you wrote:
> 
> Oh ? Ok. I thought it would be a possible name because for instance in 
> the Linux Kernel, the watchdog driver is named that way and used also 
> for the 8xx and so was also the SPI driver before its name was change to 
> fsl_spi.

There are always bad examples ;-)

> Isn't the 8xx an 81xx indeed ?

I have never seen this naming used; google does not know about it
either.

> Any suggestion for a good name ? Would fsl_reginfo() be a good name ?

FSL does not even exist any more...


Soory, I was never good in naming things...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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, I'm not going to explain it. If you  can't  figure  it  out,  you
didn't want to know anyway... :-)
                   - Larry Wall in <1991Aug7.180856.2854@netlabs.com>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc
  2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
                   ` (13 preceding siblings ...)
  2017-07-12  9:43 ` [U-Boot] [PATCH 14/14] powerpc: Remove 8260 remainders Christophe Leroy
@ 2017-07-12 19:56 ` Tom Rini
  2017-07-13 13:12   ` Christophe LEROY
  14 siblings, 1 reply; 28+ messages in thread
From: Tom Rini @ 2017-07-12 19:56 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 12, 2017 at 11:43:16AM +0200, Christophe Leroy wrote:

> This serie makes some cleanup in the powerpc area
> following the reintroduction of the 8xx.
> 
> No travis verification done, travis is timing out
> 
> Christophe Leroy (14):
>   powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
>   powerpc: get rid of addr_probe()
>   powerpc, timer: Does 8xx specific actions in 8xx cpu_init
>   power, timer: reset TBL before TBU
>   powerpc: move set_msr() and get_msr() into .h
>   powerpc: Remove unneccessary #ifdefs in reginfo
>   Convert CONFIG_CMD_REGINFO to Kconfig
>   powerpc, 8xx: Simplifying check_CPU()
>   powerpc, 8xx: Move cache function into C files
>   powerpc, 8xx: move get_immr() into C
>   powerpc, 8xx: move cache helper into C
>   powerpc: move get_pvr() and get_svr() into C
>   powerpc, 8xx: fix missing function declarations.
>   powerpc: Remove 8260 remainders

In general, please always have at least a simple one-line commit
message, that's missing in a few places.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170712/8f9a0df7/attachment.sig>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo
  2017-07-12 14:53       ` Wolfgang Denk
@ 2017-07-12 19:56         ` Tom Rini
  2017-07-13 13:15           ` Christophe LEROY
  0 siblings, 1 reply; 28+ messages in thread
From: Tom Rini @ 2017-07-12 19:56 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 12, 2017 at 04:53:26PM +0200, Wolfgang Denk wrote:
> Dear Christophe,
> 
> In message <194b25e4-81fc-52cf-aeef-61ce6f4679a7@c-s.fr> you wrote:
> > 
> > Oh ? Ok. I thought it would be a possible name because for instance in 
> > the Linux Kernel, the watchdog driver is named that way and used also 
> > for the 8xx and so was also the SPI driver before its name was change to 
> > fsl_spi.
> 
> There are always bad examples ;-)
> 
> > Isn't the 8xx an 81xx indeed ?
> 
> I have never seen this naming used; google does not know about it
> either.
> 
> > Any suggestion for a good name ? Would fsl_reginfo() be a good name ?
> 
> FSL does not even exist any more...
> 
> 
> Soory, I was never good in naming things...

FSL doesn't exist, and I'm terrible at naming things as well, but I
think fsl_reginfo makes enough namespace sense, we have a lot of fsl_xxx
in arch/powerpc and qcom_ might start confusing folks more than helping
:)

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170712/0ec30ffb/attachment.sig>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 01/14] powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
  2017-07-12 12:52   ` Wolfgang Denk
@ 2017-07-13 13:12     ` Christophe LEROY
  0 siblings, 0 replies; 28+ messages in thread
From: Christophe LEROY @ 2017-07-13 13:12 UTC (permalink / raw)
  To: u-boot



Le 12/07/2017 à 14:52, Wolfgang Denk a écrit :
> Dear Christophe,
> 
> In message <59ac182501e89d3b9ee1dc7c31ce358ff33c0877.1499629706.git.christophe.leroy@c-s.fr> you wrote:
>> divider is calculated based on SCCR_DFBRG, with:
>> SCCR_DFBRG 00 => divider 1  = 1 << 0
>> SCCR_DFBRG 01 => divider 4  = 1 << 2
>> SCCR_DFBRG 10 => divider 16 = 1 << 4
>> SCCR_DFBRG 11 => divider 64 = 1 << 6
>>
>> This can be easily converted to a single shift operation:
>> divider = 1 << (SCCR_DFBRG * 2)
> 
> Agreed, but...
> 
>> -	switch ((sccr & SCCR_DFBRG11) >> 11) {
> ...
>> +	uint divider = 1 << ((sccr & SCCR_DFBRG11) >> 10);
> 
> The code would be easier to read / understand if you made the
> calculation obvious, i. e.
> 
> 	uint divider = 1 << (((sccr & SCCR_DFBRG11) >> 11) * 2);
> 
> The compiler generates the same code, so there is no size effect.

Ok, done in v2

Christophe
> 
> Reviewed-by: Wolfgang Denk <wd@denx.de>
> 
> 
> Best regards,
> 
> Wolfgang Denk
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc
  2017-07-12 19:56 ` [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Tom Rini
@ 2017-07-13 13:12   ` Christophe LEROY
  0 siblings, 0 replies; 28+ messages in thread
From: Christophe LEROY @ 2017-07-13 13:12 UTC (permalink / raw)
  To: u-boot



Le 12/07/2017 à 21:56, Tom Rini a écrit :
> On Wed, Jul 12, 2017 at 11:43:16AM +0200, Christophe Leroy wrote:
> 
>> This serie makes some cleanup in the powerpc area
>> following the reintroduction of the 8xx.
>>
>> No travis verification done, travis is timing out
>>
>> Christophe Leroy (14):
>>    powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
>>    powerpc: get rid of addr_probe()
>>    powerpc, timer: Does 8xx specific actions in 8xx cpu_init
>>    power, timer: reset TBL before TBU
>>    powerpc: move set_msr() and get_msr() into .h
>>    powerpc: Remove unneccessary #ifdefs in reginfo
>>    Convert CONFIG_CMD_REGINFO to Kconfig
>>    powerpc, 8xx: Simplifying check_CPU()
>>    powerpc, 8xx: Move cache function into C files
>>    powerpc, 8xx: move get_immr() into C
>>    powerpc, 8xx: move cache helper into C
>>    powerpc: move get_pvr() and get_svr() into C
>>    powerpc, 8xx: fix missing function declarations.
>>    powerpc: Remove 8260 remainders
> 
> In general, please always have at least a simple one-line commit
> message, that's missing in a few places.  Thanks!
> 

Ok, done, thanks

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo
  2017-07-12 19:56         ` Tom Rini
@ 2017-07-13 13:15           ` Christophe LEROY
  0 siblings, 0 replies; 28+ messages in thread
From: Christophe LEROY @ 2017-07-13 13:15 UTC (permalink / raw)
  To: u-boot



Le 12/07/2017 à 21:56, Tom Rini a écrit :
> On Wed, Jul 12, 2017 at 04:53:26PM +0200, Wolfgang Denk wrote:
>> Dear Christophe,
>>
>> In message <194b25e4-81fc-52cf-aeef-61ce6f4679a7@c-s.fr> you wrote:
>>>
>>> Oh ? Ok. I thought it would be a possible name because for instance in
>>> the Linux Kernel, the watchdog driver is named that way and used also
>>> for the 8xx and so was also the SPI driver before its name was change to
>>> fsl_spi.
>>
>> There are always bad examples ;-)
>>
>>> Isn't the 8xx an 81xx indeed ?
>>
>> I have never seen this naming used; google does not know about it
>> either.
>>
>>> Any suggestion for a good name ? Would fsl_reginfo() be a good name ?
>>
>> FSL does not even exist any more...
>>
>>
>> Soory, I was never good in naming things...
> 
> FSL doesn't exist, and I'm terrible at naming things as well, but I
> think fsl_reginfo makes enough namespace sense, we have a lot of fsl_xxx
> in arch/powerpc and qcom_ might start confusing folks more than helping
> :)
> 


Finally I called in print_reginfo() as it has indeed no dependency with 
any target type or arch. Should someone want to implement it for another 
arch like an ARM CPU, he could do by just defining print_reginfo() and 
maybe moving the declaration from asm/ppc.h to a more generic place.

Christophe

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2017-07-13 13:15 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12  9:43 [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Christophe Leroy
2017-07-12  9:43 ` [U-Boot] [PATCH 01/14] powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk() Christophe Leroy
2017-07-12 12:52   ` Wolfgang Denk
2017-07-13 13:12     ` Christophe LEROY
2017-07-12  9:43 ` [U-Boot] [PATCH 02/14] powerpc: get rid of addr_probe() Christophe Leroy
2017-07-12 12:56   ` Wolfgang Denk
2017-07-12  9:43 ` [U-Boot] [PATCH 03/14] powerpc, timer: Does 8xx specific actions in 8xx cpu_init Christophe Leroy
2017-07-12  9:43 ` [U-Boot] [PATCH 04/14] power, timer: reset TBL before TBU Christophe Leroy
2017-07-12 13:00   ` Wolfgang Denk
2017-07-12  9:43 ` [U-Boot] [PATCH 05/14] powerpc: move set_msr() and get_msr() into .h Christophe Leroy
2017-07-12 13:03   ` Wolfgang Denk
2017-07-12  9:43 ` [U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo Christophe Leroy
2017-07-12 13:07   ` Wolfgang Denk
2017-07-12 14:28     ` Christophe LEROY
2017-07-12 14:53       ` Wolfgang Denk
2017-07-12 19:56         ` Tom Rini
2017-07-13 13:15           ` Christophe LEROY
2017-07-12  9:43 ` [U-Boot] [PATCH 07/14] Convert CONFIG_CMD_REGINFO to Kconfig Christophe Leroy
2017-07-12 13:11   ` Wolfgang Denk
2017-07-12  9:43 ` [U-Boot] [PATCH 08/14] powerpc, 8xx: Simplifying check_CPU() Christophe Leroy
2017-07-12  9:43 ` [U-Boot] [PATCH 09/14] powerpc, 8xx: Move cache function into C files Christophe Leroy
2017-07-12  9:43 ` [U-Boot] [PATCH 10/14] powerpc, 8xx: move get_immr() into C Christophe Leroy
2017-07-12  9:43 ` [U-Boot] [PATCH 11/14] powerpc, 8xx: move cache helper " Christophe Leroy
2017-07-12  9:43 ` [U-Boot] [PATCH 12/14] powerpc: move get_pvr() and get_svr() " Christophe Leroy
2017-07-12  9:43 ` [U-Boot] [PATCH 13/14] powerpc, 8xx: fix missing function declarations Christophe Leroy
2017-07-12  9:43 ` [U-Boot] [PATCH 14/14] powerpc: Remove 8260 remainders Christophe Leroy
2017-07-12 19:56 ` [U-Boot] [PATCH 00/14] Cleanup for 8xx and other misc powerpc Tom Rini
2017-07-13 13:12   ` Christophe LEROY

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.