All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code
@ 2017-03-28 19:42 Simon Glass
  2017-04-06 16:25 ` [U-Boot] [U-Boot, " Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2017-03-28 19:42 UTC (permalink / raw)
  To: u-boot

This function is called just before checkcpu() on MPX83xx. Move it to the
code for that arch.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/powerpc/cpu/mpc83xx/cpu.c       | 5 +++++
 arch/powerpc/cpu/mpc83xx/cpu_init.c  | 1 +
 arch/powerpc/include/asm/processor.h | 2 ++
 common/board_f.c                     | 3 ---
 include/common.h                     | 2 --
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index c87f0fdd29..cb82621ec4 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -33,6 +33,7 @@ int checkcpu(void)
 	u32 pvr = get_pvr();
 	u32 spridr;
 	char buf[32];
+	int ret;
 	int i;
 
 	const struct cpu_type {
@@ -61,6 +62,10 @@ int checkcpu(void)
 
 	immr = (immap_t *)CONFIG_SYS_IMMR;
 
+	ret = prt_83xx_rsr();
+	if (ret)
+		return ret;
+
 	puts("CPU:   ");
 
 	switch (pvr & 0xffff0000) {
diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index 3a0916bdbf..2a9db0c51b 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -8,6 +8,7 @@
 #include <mpc83xx.h>
 #include <ioports.h>
 #include <asm/io.h>
+#include <asm/processor.h>
 #ifdef CONFIG_USB_EHCI_FSL
 #include <usb/ehci-ci.h>
 #endif
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 81bae6f008..c032726df1 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -1354,6 +1354,8 @@ void ll_puts(const char *);
 /* In misc.c */
 void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
 
+int prt_83xx_rsr(void);
+
 #endif /* ndef ASSEMBLY*/
 
 #ifdef CONFIG_MACH_SPECIFIC
diff --git a/common/board_f.c b/common/board_f.c
index cbd9f67709..74cdef0ddb 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -864,9 +864,6 @@ static const init_fnc_t init_sequence_f[] = {
 	prt_8260_rsr,
 	prt_8260_clks,
 #endif /* CONFIG_MPC8260 */
-#if defined(CONFIG_MPC83xx)
-	prt_83xx_rsr,
-#endif
 #if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH)
 	checkcpu,
 #endif
diff --git a/include/common.h b/include/common.h
index 684083510b..6f08110b74 100644
--- a/include/common.h
+++ b/include/common.h
@@ -715,8 +715,6 @@ ulong cpu_init_f(void);
 int	cpu_init_r    (void);
 #if defined(CONFIG_MPC8260)
 int	prt_8260_rsr  (void);
-#elif defined(CONFIG_MPC83xx)
-int	prt_83xx_rsr  (void);
 #endif
 
 /* $(CPU)/interrupts.c */
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [U-Boot, 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code
  2017-03-28 19:42 [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code Simon Glass
@ 2017-04-06 16:25 ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-04-06 16:25 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 01:42:04PM -0600, Simon Glass wrote:

> This function is called just before checkcpu() on MPX83xx. Move it to the
> code for that arch.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, 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/20170406/a414fac2/attachment.sig>

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

* [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code
  2017-03-28 16:27 ` [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() " Simon Glass
@ 2017-03-29  5:19   ` Stefan Roese
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2017-03-29  5:19 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> This function is called just before checkcpu() on MPX83xx. Move it to the
> code for that arch.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() " Simon Glass
@ 2017-03-28 16:27 ` Simon Glass
  2017-03-29  5:19   ` Stefan Roese
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

This function is called just before checkcpu() on MPX83xx. Move it to the
code for that arch.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/powerpc/cpu/mpc83xx/cpu.c       | 5 +++++
 arch/powerpc/cpu/mpc83xx/cpu_init.c  | 1 +
 arch/powerpc/include/asm/processor.h | 2 ++
 common/board_f.c                     | 3 ---
 include/common.h                     | 2 --
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index c87f0fdd29..cb82621ec4 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -33,6 +33,7 @@ int checkcpu(void)
 	u32 pvr = get_pvr();
 	u32 spridr;
 	char buf[32];
+	int ret;
 	int i;
 
 	const struct cpu_type {
@@ -61,6 +62,10 @@ int checkcpu(void)
 
 	immr = (immap_t *)CONFIG_SYS_IMMR;
 
+	ret = prt_83xx_rsr();
+	if (ret)
+		return ret;
+
 	puts("CPU:   ");
 
 	switch (pvr & 0xffff0000) {
diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index 3a0916bdbf..2a9db0c51b 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -8,6 +8,7 @@
 #include <mpc83xx.h>
 #include <ioports.h>
 #include <asm/io.h>
+#include <asm/processor.h>
 #ifdef CONFIG_USB_EHCI_FSL
 #include <usb/ehci-ci.h>
 #endif
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 81bae6f008..c032726df1 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -1354,6 +1354,8 @@ void ll_puts(const char *);
 /* In misc.c */
 void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
 
+int prt_83xx_rsr(void);
+
 #endif /* ndef ASSEMBLY*/
 
 #ifdef CONFIG_MACH_SPECIFIC
diff --git a/common/board_f.c b/common/board_f.c
index cbd9f67709..74cdef0ddb 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -864,9 +864,6 @@ static const init_fnc_t init_sequence_f[] = {
 	prt_8260_rsr,
 	prt_8260_clks,
 #endif /* CONFIG_MPC8260 */
-#if defined(CONFIG_MPC83xx)
-	prt_83xx_rsr,
-#endif
 #if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH)
 	checkcpu,
 #endif
diff --git a/include/common.h b/include/common.h
index 684083510b..6f08110b74 100644
--- a/include/common.h
+++ b/include/common.h
@@ -715,8 +715,6 @@ ulong cpu_init_f(void);
 int	cpu_init_r    (void);
 #if defined(CONFIG_MPC8260)
 int	prt_8260_rsr  (void);
-#elif defined(CONFIG_MPC83xx)
-int	prt_83xx_rsr  (void);
 #endif
 
 /* $(CPU)/interrupts.c */
-- 
2.12.2.564.g063fe858b8-goog

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

end of thread, other threads:[~2017-04-06 16:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 19:42 [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code Simon Glass
2017-04-06 16:25 ` [U-Boot] [U-Boot, " Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() " Simon Glass
2017-03-28 16:27 ` [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() " Simon Glass
2017-03-29  5:19   ` Stefan Roese

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.