From 06f60ae3e454e15a410a0d4e96769bf938af8fcb Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Thu, 6 Dec 2012 13:33:17 +0000 Subject: powerpc/mpc83xx: add support for new SPL This adds arch support for PPC mpc83xx to boot "minimal" (4K) SPLs using the new infrastructure. Existing nand_spl targets are updated to deal with the name change from nand_init.c to spl_minimal.c (as in theory this isn't limited to NAND anymore). Signed-off-by: Scott Wood Signed-off-by: Kim Phillips --- arch/powerpc/lib/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index 844fe8636d..86cf02ace4 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -47,7 +47,8 @@ endif endif ifdef MINIMAL -COBJS-y += cache.o +COBJS-y += cache.o time.o +SOBJS-y += ticks.o else SOBJS-y += ppcstring.o -- cgit From 1206c18403ff25814673a4dbfa071ae06bbefaef Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 13 Dec 2012 20:48:44 +0000 Subject: ppc: Move brg_clk to arch_global_data Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass --- arch/powerpc/lib/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 6a7bf4b6c2..b1069a6c0e 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -581,7 +581,7 @@ void board_init_f(ulong bootflag) bd->bi_busfreq = gd->bus_clk; /* Bus Freq, in Hz */ #if defined(CONFIG_CPM2) bd->bi_cpmfreq = gd->cpm_clk; - bd->bi_brgfreq = gd->brg_clk; + bd->bi_brgfreq = gd->arch.brg_clk; bd->bi_sccfreq = gd->scc_clk; bd->bi_vco = gd->vco_out; #endif /* CONFIG_CPM2 */ -- cgit From 748cd0591a9fe9eb23f20748bcb23035cd5ff517 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 13 Dec 2012 20:48:46 +0000 Subject: ppc: Move clock fields to arch_global_data Move vco_out, cpm_clk, scc_clk, brg_clk into arch_global_data and tidy up. Leave pci_clk on its own since this should really depend only on CONFIG_PCI and not any particular chip type. Signed-off-by: Simon Glass --- arch/powerpc/lib/board.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index b1069a6c0e..988039f337 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -580,10 +580,10 @@ void board_init_f(ulong bootflag) bd->bi_intfreq = gd->cpu_clk; /* Internal Freq, in Hz */ bd->bi_busfreq = gd->bus_clk; /* Bus Freq, in Hz */ #if defined(CONFIG_CPM2) - bd->bi_cpmfreq = gd->cpm_clk; + bd->bi_cpmfreq = gd->arch.cpm_clk; bd->bi_brgfreq = gd->arch.brg_clk; - bd->bi_sccfreq = gd->scc_clk; - bd->bi_vco = gd->vco_out; + bd->bi_sccfreq = gd->arch.scc_clk; + bd->bi_vco = gd->arch.vco_out; #endif /* CONFIG_CPM2 */ #if defined(CONFIG_MPC512X) bd->bi_ipsfreq = gd->ips_clk; -- cgit From 67ac13b1b9b6ca00893714fbc8cbf556bab6fd59 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 13 Dec 2012 20:48:48 +0000 Subject: ppc: Move lbc_clk and cpu to arch_global_data Move these fields into arch_global_data and tidy up. Signed-off-by: Simon Glass [trini: Update for bsc9132qds.c, b4860qds.c] Signed-off-by: Tom Rini --- arch/powerpc/lib/board.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 988039f337..22bd713d62 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -649,10 +649,11 @@ void board_init_r(gd_t *id, ulong dest_addr) #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) /* - * The gd->cpu pointer is set to an address in flash before relocation. - * We need to update it to point to the same CPU entry in RAM. + * The gd->arch.cpu pointer is set to an address in flash before + * relocation. We need to update it to point to the same CPU entry + * in RAM. */ - gd->cpu += dest_addr - CONFIG_SYS_MONITOR_BASE; + gd->arch.cpu += dest_addr - CONFIG_SYS_MONITOR_BASE; /* * If we didn't know the cpu mask & # cores, we can save them of -- cgit From b28774966c933780e891998b472528ba0724b8e0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 13 Dec 2012 20:48:53 +0000 Subject: ppc: Move mpc5xxx clocks to arch_global_data Move ipb_clk and pci_clk into arch_global_data and tidy up. Signed-off-by: Simon Glass --- arch/powerpc/lib/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 22bd713d62..63118a3828 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -589,7 +589,7 @@ void board_init_f(ulong bootflag) bd->bi_ipsfreq = gd->ips_clk; #endif /* CONFIG_MPC512X */ #if defined(CONFIG_MPC5xxx) - bd->bi_ipbfreq = gd->ipb_clk; + bd->bi_ipbfreq = gd->arch.ipb_clk; bd->bi_pcifreq = gd->pci_clk; #endif /* CONFIG_MPC5xxx */ bd->bi_baudrate = gd->baudrate; /* Console Baudrate */ -- cgit From fefb098b187caab34edc72df141125925c9bba62 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 13 Dec 2012 20:48:54 +0000 Subject: ppc: Move mpc512x clocks to arch_global_data Move ips_clk and csb_clk into arch_global_data and tidy up. Signed-off-by: Simon Glass --- arch/powerpc/lib/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 63118a3828..31904686b7 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -586,7 +586,7 @@ void board_init_f(ulong bootflag) bd->bi_vco = gd->arch.vco_out; #endif /* CONFIG_CPM2 */ #if defined(CONFIG_MPC512X) - bd->bi_ipsfreq = gd->ips_clk; + bd->bi_ipsfreq = gd->arch.ips_clk; #endif /* CONFIG_MPC512X */ #if defined(CONFIG_MPC5xxx) bd->bi_ipbfreq = gd->arch.ipb_clk; -- cgit From 1c356135fa1fd2c2f6d775ba1b2f86e4823d8338 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 13 Dec 2012 20:48:55 +0000 Subject: ppc: Move mpc8220 clocks to arch_global_data Move these fields into arch_global_data and tidy up. The bExtUart field does not appear to be used, so punt it. Signed-off-by: Simon Glass --- arch/powerpc/lib/board.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 31904686b7..12270a4533 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -556,11 +556,11 @@ void board_init_f(ulong bootflag) #endif #if defined(CONFIG_MPC8220) bd->bi_mbar_base = CONFIG_SYS_MBAR; /* base of internal registers */ - bd->bi_inpfreq = gd->inp_clk; + bd->bi_inpfreq = gd->arch.inp_clk; bd->bi_pcifreq = gd->pci_clk; - bd->bi_vcofreq = gd->vco_clk; - bd->bi_pevfreq = gd->pev_clk; - bd->bi_flbfreq = gd->flb_clk; + bd->bi_vcofreq = gd->arch.vco_clk; + bd->bi_pevfreq = gd->arch.pev_clk; + bd->bi_flbfreq = gd->arch.flb_clk; /* store bootparam to sram (backward compatible), here? */ { @@ -568,10 +568,10 @@ void board_init_f(ulong bootflag) *sram++ = gd->ram_size; *sram++ = gd->bus_clk; - *sram++ = gd->inp_clk; + *sram++ = gd->arch.inp_clk; *sram++ = gd->cpu_clk; - *sram++ = gd->vco_clk; - *sram++ = gd->flb_clk; + *sram++ = gd->arch.vco_clk; + *sram++ = gd->arch.flb_clk; *sram++ = 0xb8c3ba11; /* boot signature */ } #endif -- cgit From 12e06fe03fdcd9cb9e9805ff78d1027377a1416d Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Wed, 16 Jan 2013 13:59:04 +0000 Subject: treewide: include libfdt_env.h before fdt.h and, if including libfdt.h which includes libfdt_env.h in the correct order, don't include fdt.h before libfdt.h. this is needed to get the fdt type definitions set from the project environment before fdt.h uses them. Signed-off-by: Kim Phillips Cc: Jerry Van Baren --- arch/powerpc/lib/bootm.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 7088293a36..33d013fcea 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -36,7 +36,6 @@ #include #if defined(CONFIG_OF_LIBFDT) -#include #include #include -- cgit From 58864ddc7276ca7403ddbb716da5853638f37519 Mon Sep 17 00:00:00 2001 From: Gerald Van Baren Date: Thu, 7 Feb 2013 19:49:54 -0500 Subject: Clean up libfdt.h includes The libfdt.h file is the definition file for libfdt. It is unnecessary to include other fdt header files (the necessary ones are pulled in by libfdt.h). Signed-off-by: Gerald Van Baren Acked-by: Simon Glass Acked-by: Stefan Roese --- arch/powerpc/lib/bootm.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 33d013fcea..0119a7b6eb 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -38,7 +38,6 @@ #if defined(CONFIG_OF_LIBFDT) #include #include - #endif #ifdef CONFIG_SYS_INIT_RAM_LOCK -- cgit