* [PATCH 0/2] ppc 85xx: remove early local bus initialisation
@ 2013-07-31 9:43 Renaud Barbier
2013-07-31 9:43 ` [PATCH 1/2] mpc85xx: remove " Renaud Barbier
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Renaud Barbier @ 2013-07-31 9:43 UTC (permalink / raw)
To: barebox
The local bus initialisation is moved from the cpu early
initialisation to the board specific code to avoid dependencies
on board definitions.
Renaud Barbier (2):
mpc85xx: remove local bus initialisation
P2020RDB: map boot flash.
arch/ppc/boards/freescale-p2020rdb/config.h | 4 ----
arch/ppc/boards/freescale-p2020rdb/p2020rdb.c | 4 ++++
arch/ppc/cpu-85xx/start.S | 1 -
arch/ppc/include/asm/fsl_lbc.h | 2 --
arch/ppc/mach-mpc85xx/Makefile | 1 -
arch/ppc/mach-mpc85xx/cpu_init.c | 5 +++--
arch/ppc/mach-mpc85xx/fsl_lbc.c | 17 -----------------
7 files changed, 7 insertions(+), 27 deletions(-)
delete mode 100644 arch/ppc/mach-mpc85xx/fsl_lbc.c
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] mpc85xx: remove local bus initialisation
2013-07-31 9:43 [PATCH 0/2] ppc 85xx: remove early local bus initialisation Renaud Barbier
@ 2013-07-31 9:43 ` Renaud Barbier
2013-07-31 9:43 ` [PATCH 2/2] P2020RDB: map boot flash Renaud Barbier
2013-08-05 10:09 ` [PATCH 0/2] ppc 85xx: remove early local bus initialisation Sascha Hauer
2 siblings, 0 replies; 4+ messages in thread
From: Renaud Barbier @ 2013-07-31 9:43 UTC (permalink / raw)
To: barebox
The early initialisation of chip select 0 (boot flash) is removed
from cpu initialisation. This removes the dependency on board
base address definition.
Consequently, cpu_init_f is not called in the start-up code but
added to the init call list as cpu_init_r. Also the file
arch/ppc/mach-mpc85xx/fsl_lbc.c is deleted.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
---
arch/ppc/cpu-85xx/start.S | 1 -
arch/ppc/include/asm/fsl_lbc.h | 2 --
arch/ppc/mach-mpc85xx/Makefile | 1 -
arch/ppc/mach-mpc85xx/cpu_init.c | 5 +++--
arch/ppc/mach-mpc85xx/fsl_lbc.c | 17 -----------------
5 files changed, 3 insertions(+), 23 deletions(-)
delete mode 100644 arch/ppc/mach-mpc85xx/fsl_lbc.c
diff --git a/arch/ppc/cpu-85xx/start.S b/arch/ppc/cpu-85xx/start.S
index c0e5ec0..5bcba5f 100644
--- a/arch/ppc/cpu-85xx/start.S
+++ b/arch/ppc/cpu-85xx/start.S
@@ -300,7 +300,6 @@ _start_cont:
mtmsr r3
isync
- bl cpu_init_f
bl initdram
b relocate_code
isync
diff --git a/arch/ppc/include/asm/fsl_lbc.h b/arch/ppc/include/asm/fsl_lbc.h
index 47205e7..58cd080 100644
--- a/arch/ppc/include/asm/fsl_lbc.h
+++ b/arch/ppc/include/asm/fsl_lbc.h
@@ -44,8 +44,6 @@
#ifndef __ASSEMBLY__
#include <asm/io.h>
-extern void fsl_init_early_memctl_regs(void);
-
/* LBC register offsets. */
#define FSL_LBC_BRX(x) ((x) * 8) /* bank register offsets. */
#define FSL_LBC_ORX(x) (4 + ((x) * 8)) /* option register offset. */
diff --git a/arch/ppc/mach-mpc85xx/Makefile b/arch/ppc/mach-mpc85xx/Makefile
index af9be29..cc412c5 100644
--- a/arch/ppc/mach-mpc85xx/Makefile
+++ b/arch/ppc/mach-mpc85xx/Makefile
@@ -1,7 +1,6 @@
obj-y += cpuid.o
obj-y += cpu.o
obj-y += cpu_init.o
-obj-y += fsl_lbc.o
obj-y += fsl_law.o
obj-y += speed.o
obj-y +=time.o
diff --git a/arch/ppc/mach-mpc85xx/cpu_init.c b/arch/ppc/mach-mpc85xx/cpu_init.c
index ec9763e..8372b7f 100644
--- a/arch/ppc/mach-mpc85xx/cpu_init.c
+++ b/arch/ppc/mach-mpc85xx/cpu_init.c
@@ -114,10 +114,11 @@ void cpu_init_early_f(void)
e500_init_tlbs();
}
-void cpu_init_f(void)
+static int cpu_init_r(void)
{
e500_disable_tlb(14);
e500_disable_tlb(15);
- fsl_init_early_memctl_regs();
+ return 0;
}
+core_initcall(cpu_init_r);
diff --git a/arch/ppc/mach-mpc85xx/fsl_lbc.c b/arch/ppc/mach-mpc85xx/fsl_lbc.c
deleted file mode 100644
index ac9ca74..0000000
--- a/arch/ppc/mach-mpc85xx/fsl_lbc.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright 2010-2011 Freescale Semiconductor, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * Version 2 as published by the Free Software Foundation.
- */
-
-#include <common.h>
-#include <asm/fsl_lbc.h>
-#include <mach/immap_85xx.h>
-
-void fsl_init_early_memctl_regs(void)
-{
- fsl_set_lbc_br(0, CFG_BR0_PRELIM);
- fsl_set_lbc_or(0, CFG_OR0_PRELIM);
-}
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] P2020RDB: map boot flash.
2013-07-31 9:43 [PATCH 0/2] ppc 85xx: remove early local bus initialisation Renaud Barbier
2013-07-31 9:43 ` [PATCH 1/2] mpc85xx: remove " Renaud Barbier
@ 2013-07-31 9:43 ` Renaud Barbier
2013-08-05 10:09 ` [PATCH 0/2] ppc 85xx: remove early local bus initialisation Sascha Hauer
2 siblings, 0 replies; 4+ messages in thread
From: Renaud Barbier @ 2013-07-31 9:43 UTC (permalink / raw)
To: barebox
The chip select 0 (boot flash) registers are updated by the board
specific code as it is not done by the cpu early initialisation
any more.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
---
arch/ppc/boards/freescale-p2020rdb/config.h | 4 ----
arch/ppc/boards/freescale-p2020rdb/p2020rdb.c | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/ppc/boards/freescale-p2020rdb/config.h b/arch/ppc/boards/freescale-p2020rdb/config.h
index 3b2bb5e..c6d3216 100644
--- a/arch/ppc/boards/freescale-p2020rdb/config.h
+++ b/arch/ppc/boards/freescale-p2020rdb/config.h
@@ -87,8 +87,4 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
/* Leave 256 bytes for global data */
#define CFG_INIT_SP_OFFSET (0x00004000 - 256)
-#define CFG_BR0_PRELIM (BR_PHYS_ADDR(CFG_FLASH_BASE_PHYS) | \
- BR_PS_16 | BR_V) /* NOR Base Address */
-#define CFG_OR0_PRELIM 0xff000ff7 /* NOR Options */
-
#endif /* __CONFIG_H */
diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
index 6426bd3..537565d 100644
--- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
+++ b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
@@ -235,6 +235,10 @@ static int board_init_r(void)
checkboard();
+ /* Map the whole boot flash */
+ fsl_set_lbc_br(0, BR_PHYS_ADDR(CFG_FLASH_BASE_PHYS) | BR_PS_16 | BR_V);
+ fsl_set_lbc_or(0, 0xff000ff7);
+
/* Flush d-cache and invalidate i-cache of any FLASH data */
flush_dcache();
invalidate_icache();
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] ppc 85xx: remove early local bus initialisation
2013-07-31 9:43 [PATCH 0/2] ppc 85xx: remove early local bus initialisation Renaud Barbier
2013-07-31 9:43 ` [PATCH 1/2] mpc85xx: remove " Renaud Barbier
2013-07-31 9:43 ` [PATCH 2/2] P2020RDB: map boot flash Renaud Barbier
@ 2013-08-05 10:09 ` Sascha Hauer
2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2013-08-05 10:09 UTC (permalink / raw)
To: Renaud Barbier; +Cc: barebox
On Wed, Jul 31, 2013 at 10:43:13AM +0100, Renaud Barbier wrote:
> The local bus initialisation is moved from the cpu early
> initialisation to the board specific code to avoid dependencies
> on board definitions.
>
> Renaud Barbier (2):
> mpc85xx: remove local bus initialisation
> P2020RDB: map boot flash.
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-05 10:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-31 9:43 [PATCH 0/2] ppc 85xx: remove early local bus initialisation Renaud Barbier
2013-07-31 9:43 ` [PATCH 1/2] mpc85xx: remove " Renaud Barbier
2013-07-31 9:43 ` [PATCH 2/2] P2020RDB: map boot flash Renaud Barbier
2013-08-05 10:09 ` [PATCH 0/2] ppc 85xx: remove early local bus initialisation Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox