Clean up board_f sequence a little more
Subsystems (6)
v2 cover Clean up board_f sequence a little more
This series continues the effort to remove #ifdefs from the board_f init sequence. It follows on from the first series.
With both series applied the number of references to CONFIG in board_f.c drops from 178 to 137:
strings common/board_f.c |grep -c CONFIG
Changes in v2:
- Add new patch to rename initdram() to fsl_initdram()
- Avoid changing fsl armv8 boards fsl_initdram() function
- Add a dummy function for arc
- Remove initdram from some comments as well
- Rebase to master
Simon Glass (2):
arm: freescale: Rename initdram() to fsl_initdram()
board_f: Rename initdram() to dram_init()
arch/arc/lib/cpu.c | 6 ++++++ arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 3 ++- arch/mips/mach-ath79/dram.c | 2 +- arch/mips/mach-pic32/cpu.c | 2 +- arch/mips/mach-pic32/include/mach/ddr.h | 2 +- arch/powerpc/cpu/mpc5xxx/spl_boot.c | 4 ++-- arch/powerpc/cpu/mpc85xx/cpu.c | 4 ++-- arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c | 10 +++++----- arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c | 8 ++++---- arch/powerpc/cpu/ppc4xx/sdram.c | 4 ++-- arch/powerpc/cpu/ppc4xx/spl_boot.c | 2 +- arch/xtensa/cpu/cpu.c | 5 +++++ board/Arcturus/ucp1020/spl.c | 2 +- board/BuS/eb_cpu5282/eb_cpu5282.c | 2 +- board/a3m071/a3m071.c | 4 ++-- board/a4m072/a4m072.c | 4 ++-- board/amcc/acadia/memory.c | 2 +- board/amcc/bamboo/bamboo.c | 2 +- board/amcc/bubinga/bubinga.c | 4 ++-- board/amcc/sequoia/sdram.c | 4 ++-- board/amcc/walnut/walnut.c | 4 ++-- board/amcc/yosemite/yosemite.c | 4 ++-- board/astro/mcf5373l/mcf5373l.c | 2 +- board/canmb/canmb.c | 4 ++-- board/cm5200/cm5200.c | 2 +- board/cobra5272/cobra5272.c | 2 +- board/davedenx/aria/aria.c | 2 +- board/dbau1x00/dbau1x00.c | 2 +- board/esd/mecp5123/mecp5123.c | 2 +- board/esd/pmc440/sdram.c | 4 ++-- board/esd/vme8349/vme8349.c | 2 +- board/freescale/b4860qds/ddr.c | 2 +- board/freescale/b4860qds/spl.c | 2 +- board/freescale/c29xpcie/spl.c | 2 +- board/freescale/corenet_ds/ddr.c | 2 +- board/freescale/ls1021aqds/ddr.c | 2 +- board/freescale/ls1021aqds/ls1021aqds.c | 2 +- board/freescale/ls1043aqds/ddr.c | 2 +- board/freescale/ls1043aqds/ls1043aqds.c | 3 ++- board/freescale/ls1043ardb/ddr.c | 2 +- board/freescale/ls1046aqds/ddr.c | 2 +- board/freescale/ls1046aqds/ls1046aqds.c | 3 ++- board/freescale/ls1046ardb/ddr.c | 2 +- board/freescale/ls2080a/ddr.c | 3 ++- board/freescale/ls2080aqds/ddr.c | 2 +- board/freescale/ls2080ardb/ddr.c | 2 +- board/freescale/m5208evbe/m5208evbe.c | 2 +- board/freescale/m52277evb/m52277evb.c | 2 +- board/freescale/m5235evb/m5235evb.c | 2 +- board/freescale/m5249evb/m5249evb.c | 2 +- board/freescale/m5253demo/m5253demo.c | 2 +- board/freescale/m5253evbe/m5253evbe.c | 2 +- board/freescale/m5272c3/m5272c3.c | 2 +- board/freescale/m5275evb/m5275evb.c | 2 +- board/freescale/m5282evb/m5282evb.c | 2 +- board/freescale/m53017evb/m53017evb.c | 2 +- board/freescale/m5329evb/m5329evb.c | 2 +- board/freescale/m5373evb/m5373evb.c | 2 +- board/freescale/m54418twr/m54418twr.c | 2 +- board/freescale/m54451evb/m54451evb.c | 2 +- board/freescale/m54455evb/m54455evb.c | 2 +- board/freescale/m547xevb/m547xevb.c | 2 +- board/freescale/m548xevb/m548xevb.c | 2 +- board/freescale/mpc5121ads/mpc5121ads.c | 2 +- board/freescale/mpc8308rdb/sdram.c | 2 +- board/freescale/mpc8313erdb/mpc8313erdb.c | 2 +- board/freescale/mpc8313erdb/sdram.c | 2 +- board/freescale/mpc8315erdb/mpc8315erdb.c | 2 +- board/freescale/mpc8315erdb/sdram.c | 2 +- board/freescale/mpc8323erdb/mpc8323erdb.c | 2 +- board/freescale/mpc832xemds/mpc832xemds.c | 2 +- board/freescale/mpc8349emds/mpc8349emds.c | 2 +- board/freescale/mpc8349itx/mpc8349itx.c | 2 +- board/freescale/mpc837xemds/mpc837xemds.c | 2 +- board/freescale/mpc837xerdb/mpc837xerdb.c | 2 +- board/freescale/mpc8610hpcd/mpc8610hpcd.c | 2 +- board/freescale/mpc8641hpcn/mpc8641hpcn.c | 2 +- board/freescale/p1010rdb/spl.c | 2 +- board/freescale/p1022ds/spl.c | 2 +- board/freescale/p1_p2_rdb_pc/spl.c | 2 +- board/freescale/p2041rdb/ddr.c | 2 +- board/freescale/t102xqds/ddr.c | 2 +- board/freescale/t102xqds/spl.c | 2 +- board/freescale/t102xrdb/ddr.c | 2 +- board/freescale/t102xrdb/spl.c | 2 +- board/freescale/t1040qds/ddr.c | 2 +- board/freescale/t104xrdb/ddr.c | 2 +- board/freescale/t104xrdb/spl.c | 2 +- board/freescale/t208xqds/ddr.c | 2 +- board/freescale/t208xqds/spl.c | 2 +- board/freescale/t208xrdb/ddr.c | 2 +- board/freescale/t208xrdb/spl.c | 2 +- board/freescale/t4qds/ddr.c | 2 +- board/freescale/t4qds/spl.c | 2 +- board/freescale/t4rdb/ddr.c | 2 +- board/freescale/t4rdb/spl.c | 2 +- board/gaisler/gr_cpci_ax2000/gr_cpci_ax2000.c | 2 +- board/gaisler/gr_ep2s60/gr_ep2s60.c | 2 +- board/gaisler/gr_xc3s_1500/gr_xc3s_1500.c | 2 +- board/gaisler/grsim/grsim.c | 2 +- board/gaisler/grsim_leon2/grsim_leon2.c | 2 +- board/gdsys/mpc8308/sdram.c | 2 +- board/ids/ids8313/ids8313.c | 2 +- board/ifm/ac14xx/ac14xx.c | 2 +- board/ifm/o2dnt2/o2dnt2.c | 4 ++-- board/imgtec/boston/ddr.c | 2 +- board/imgtec/malta/malta.c | 2 +- board/imgtec/xilfpga/xilfpga.c | 2 +- board/inka4x0/inka4x0.c | 4 ++-- board/intercontrol/digsy_mtc/digsy_mtc.c | 4 ++-- board/ipek01/ipek01.c | 4 ++-- board/jupiter/jupiter.c | 4 ++-- board/keymile/km82xx/km82xx.c | 2 +- board/keymile/km83xx/km83xx.c | 2 +- board/keymile/kmp204x/ddr.c | 2 +- board/liebherr/lwmon5/sdram.c | 4 ++-- board/micronas/vct/vct.c | 2 +- board/motionpro/motionpro.c | 2 +- board/mpc8308_p1m/sdram.c | 2 +- board/mpl/mip405/mip405.c | 4 ++-- board/mpl/pati/pati.c | 2 +- board/mpl/pip405/pip405.c | 4 ++-- board/munices/munices.c | 4 ++-- board/pb1x00/pb1x00.c | 2 +- board/pdm360ng/pdm360ng.c | 2 +- board/phytec/pcm030/pcm030.c | 4 ++-- board/qemu-mips/qemu-mips.c | 2 +- board/sbc8349/sbc8349.c | 2 +- board/sbc8641d/sbc8641d.c | 2 +- board/sysam/amcore/amcore.c | 4 ++-- board/tqc/tqm5200/tqm5200.c | 4 ++-- board/tqc/tqm834x/tqm834x.c | 2 +- board/tqc/tqm8xx/tqm8xx.c | 2 +- board/v38b/v38b.c | 2 +- board/varisys/cyrus/ddr.c | 2 +- board/ve8313/ve8313.c | 2 +- board/xes/xpedite1000/xpedite1000.c | 2 +- board/xes/xpedite517x/xpedite517x.c | 2 +- board/xilinx/ppc405-generic/xilinx_ppc405_generic.c | 2 +- board/xilinx/ppc440-generic/xilinx_ppc440_generic.c | 2 +- common/board_f.c | 15 --------------- doc/README.mpc85xx | 2 +- drivers/ddr/fsl/main.c | 4 ++-- include/common.h | 3 --- include/fsl_ddr_sdram.h | 8 ++++++++ 145 files changed, 194 insertions(+), 189 deletions(-)
Signature · 1 line
2.12.2.715.g7642488e1d-goog
PATCH v2 1/2 arm: freescale: Rename initdram() to fsl_initdram()
This function name shadows a global name but is in fact different. This is very confusing. Rename it to help with the following refactoring.
---
Changes in v2:
- Add new patch to rename initdram() to fsl_initdram()
arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 3 ++- board/freescale/ls1021aqds/ddr.c | 2 +- board/freescale/ls1021aqds/ls1021aqds.c | 2 +- board/freescale/ls1043aqds/ddr.c | 2 +- board/freescale/ls1043aqds/ls1043aqds.c | 3 ++- board/freescale/ls1043ardb/ddr.c | 2 +- board/freescale/ls1046aqds/ddr.c | 2 +- board/freescale/ls1046aqds/ls1046aqds.c | 3 ++- board/freescale/ls1046ardb/ddr.c | 2 +- board/freescale/ls2080a/ddr.c | 3 ++- board/freescale/ls2080aqds/ddr.c | 2 +- board/freescale/ls2080ardb/ddr.c | 2 +- include/fsl_ddr_sdram.h | 8 ++++++++ 13 files changed, 24 insertions(+), 12 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/cpu.c +2 -1
@@ -5,6 +5,7 @@*/ #include <common.h> +#include <fsl_ddr_sdram.h> #include <asm/io.h> #include <linux/errno.h> #include <asm/system.h>
@@ -876,7 +877,7 @@ void update_early_mmu_table(void)__weak int dram_init (void ) { -initdram (); +fsl_initdram ();#if !defined(CONFIG_SPL ) || defined(CONFIG_SPL_BUILD )/* This will break-before-make MMU for DDR */ update_early_mmu_table ();
board/freescale/ls1021aqds/ddr.c +1 -1
@@ -164,7 +164,7 @@ void board_mem_sleep_setup(void) }#endif -int initdram (void ) +int fsl_initdram (void ) {phys_size_t dram_size;
board/freescale/ls1021aqds/ls1021aqds.c +1 -1
@@ -162,7 +162,7 @@ int dram_init(void)* before accessing DDR SPD. */ select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT ); -return initdram (); +return fsl_initdram (); }#ifdef CONFIG_FSL_ESDHC
board/freescale/ls1043aqds/ddr.c +1 -1
@@ -108,7 +108,7 @@ found:#endif } -int initdram (void ) +int fsl_initdram (void ) {phys_size_t dram_size;
board/freescale/ls1043aqds/ls1043aqds.c +2 -1
@@ -7,6 +7,7 @@#include <common.h> #include <i2c.h> #include <fdt_support.h> +#include <fsl_ddr_sdram.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/fsl_serdes.h>
@@ -153,7 +154,7 @@ int dram_init(void)* before accessing DDR SPD. */ select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT ); -initdram (); +fsl_initdram ();#if !defined(CONFIG_SPL ) || defined(CONFIG_SPL_BUILD )/* This will break-before-make MMU for DDR */ update_early_mmu_table ();
board/freescale/ls1043ardb/ddr.c +1 -1
@@ -170,7 +170,7 @@ int fsl_ddr_get_dimm_params(dimm_params_t *pdimm, }#endif -int initdram (void ) +int fsl_initdram (void ) {phys_size_t dram_size;
board/freescale/ls1046aqds/ddr.c +1 -1
@@ -92,7 +92,7 @@ found: popts->cpo_sample =0x70 ; } -int initdram (void ) +int fsl_initdram (void ) {phys_size_t dram_size;
board/freescale/ls1046aqds/ls1046aqds.c +2 -1
@@ -7,6 +7,7 @@#include <common.h> #include <i2c.h> #include <fdt_support.h> +#include <fsl_ddr_sdram.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/fsl_serdes.h>
@@ -149,7 +150,7 @@ int dram_init(void)* before accessing DDR SPD. */ select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT ); -initdram (); +fsl_initdram ();#if !defined(CONFIG_SPL ) || defined(CONFIG_SPL_BUILD )/* This will break-before-make MMU for DDR */ update_early_mmu_table ();
board/freescale/ls1046ardb/ddr.c +1 -1
@@ -96,7 +96,7 @@ found: popts->cpo_sample =0x70 ; } -int initdram (void ) +int fsl_initdram (void ) {phys_size_t dram_size;
board/freescale/ls2080a/ddr.c +2 -1
@@ -158,7 +158,8 @@ int fsl_ddr_get_dimm_params(dimm_params_t *pdimm, return 0; }#endif -int initdram (void ) + +int fsl_initdram (void ) {puts ("Initializing DDR...." );
board/freescale/ls2080aqds/ddr.c +1 -1
@@ -155,7 +155,7 @@ found: } } -int initdram (void ) +int fsl_initdram (void ) {#if defined(CONFIG_SPL ) && !defined(CONFIG_SPL_BUILD ) gd->ram_size =fsl_ddr_sdram_size ();
board/freescale/ls2080ardb/ddr.c +1 -1
@@ -158,7 +158,7 @@ found: } } -int initdram (void ) +int fsl_initdram (void ) {#if defined(CONFIG_SPL ) && !defined(CONFIG_SPL_BUILD ) gd->ram_size =fsl_ddr_sdram_size ();
include/fsl_ddr_sdram.h +8 -0
@@ -477,4 +477,12 @@ typedef struct fixed_ddr_parm{int max_freq; fsl_ddr_cfg_regs_t *ddr_settings; } fixed_ddr_parm_t; + +/** +* fsl_initdram() - Set up the SDRAM +* +* @return 0 if OK, -ve on error +*/ +int fsl_initdram (void ); +#endif
Signature · 1 line
2.12.2.715.g7642488e1d-goog
PATCH v2 1/2 arm: freescale: Rename initdram() to fsl_initdram()
Quoted 4 lines · Simon Glass
This function name shadows a global name but is in fact different. This is very confusing. Rename it to help with the following refactoring.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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/20170414/ba236802/attachment.sig>
PATCH v2 2/2 board_f: Rename initdram() to dram_init()
In reply to Simon GlassThis allows us to use the same DRAM init function on all archs. Add a dummy function for arc, which does not use DRAM init here.
---
Changes in v2:
- Avoid changing fsl armv8 boards fsl_initdram() function
- Add a dummy function for arc
- Remove initdram from some comments as well
- Rebase to master
arch/arc/lib/cpu.c | 6 ++++++ arch/mips/mach-ath79/dram.c | 2 +- arch/mips/mach-pic32/cpu.c | 2 +- arch/mips/mach-pic32/include/mach/ddr.h | 2 +- arch/powerpc/cpu/mpc5xxx/spl_boot.c | 4 ++-- arch/powerpc/cpu/mpc85xx/cpu.c | 4 ++-- arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c | 10 +++++----- arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c | 8 ++++---- arch/powerpc/cpu/ppc4xx/sdram.c | 4 ++-- arch/powerpc/cpu/ppc4xx/spl_boot.c | 2 +- arch/xtensa/cpu/cpu.c | 5 +++++ board/Arcturus/ucp1020/spl.c | 2 +- board/BuS/eb_cpu5282/eb_cpu5282.c | 2 +- board/a3m071/a3m071.c | 4 ++-- board/a4m072/a4m072.c | 4 ++-- board/amcc/acadia/memory.c | 2 +- board/amcc/bamboo/bamboo.c | 2 +- board/amcc/bubinga/bubinga.c | 4 ++-- board/amcc/sequoia/sdram.c | 4 ++-- board/amcc/walnut/walnut.c | 4 ++-- board/amcc/yosemite/yosemite.c | 4 ++-- board/astro/mcf5373l/mcf5373l.c | 2 +- board/canmb/canmb.c | 4 ++-- board/cm5200/cm5200.c | 2 +- board/cobra5272/cobra5272.c | 2 +- board/davedenx/aria/aria.c | 2 +- board/dbau1x00/dbau1x00.c | 2 +- board/esd/mecp5123/mecp5123.c | 2 +- board/esd/pmc440/sdram.c | 4 ++-- board/esd/vme8349/vme8349.c | 2 +- board/freescale/b4860qds/ddr.c | 2 +- board/freescale/b4860qds/spl.c | 2 +- board/freescale/c29xpcie/spl.c | 2 +- board/freescale/corenet_ds/ddr.c | 2 +- board/freescale/m5208evbe/m5208evbe.c | 2 +- board/freescale/m52277evb/m52277evb.c | 2 +- board/freescale/m5235evb/m5235evb.c | 2 +- board/freescale/m5249evb/m5249evb.c | 2 +- board/freescale/m5253demo/m5253demo.c | 2 +- board/freescale/m5253evbe/m5253evbe.c | 2 +- board/freescale/m5272c3/m5272c3.c | 2 +- board/freescale/m5275evb/m5275evb.c | 2 +- board/freescale/m5282evb/m5282evb.c | 2 +- board/freescale/m53017evb/m53017evb.c | 2 +- board/freescale/m5329evb/m5329evb.c | 2 +- board/freescale/m5373evb/m5373evb.c | 2 +- board/freescale/m54418twr/m54418twr.c | 2 +- board/freescale/m54451evb/m54451evb.c | 2 +- board/freescale/m54455evb/m54455evb.c | 2 +- board/freescale/m547xevb/m547xevb.c | 2 +- board/freescale/m548xevb/m548xevb.c | 2 +- board/freescale/mpc5121ads/mpc5121ads.c | 2 +- board/freescale/mpc8308rdb/sdram.c | 2 +- board/freescale/mpc8313erdb/mpc8313erdb.c | 2 +- board/freescale/mpc8313erdb/sdram.c | 2 +- board/freescale/mpc8315erdb/mpc8315erdb.c | 2 +- board/freescale/mpc8315erdb/sdram.c | 2 +- board/freescale/mpc8323erdb/mpc8323erdb.c | 2 +- board/freescale/mpc832xemds/mpc832xemds.c | 2 +- board/freescale/mpc8349emds/mpc8349emds.c | 2 +- board/freescale/mpc8349itx/mpc8349itx.c | 2 +- board/freescale/mpc837xemds/mpc837xemds.c | 2 +- board/freescale/mpc837xerdb/mpc837xerdb.c | 2 +- board/freescale/mpc8610hpcd/mpc8610hpcd.c | 2 +- board/freescale/mpc8641hpcn/mpc8641hpcn.c | 2 +- board/freescale/p1010rdb/spl.c | 2 +- board/freescale/p1022ds/spl.c | 2 +- board/freescale/p1_p2_rdb_pc/spl.c | 2 +- board/freescale/p2041rdb/ddr.c | 2 +- board/freescale/t102xqds/ddr.c | 2 +- board/freescale/t102xqds/spl.c | 2 +- board/freescale/t102xrdb/ddr.c | 2 +- board/freescale/t102xrdb/spl.c | 2 +- board/freescale/t1040qds/ddr.c | 2 +- board/freescale/t104xrdb/ddr.c | 2 +- board/freescale/t104xrdb/spl.c | 2 +- board/freescale/t208xqds/ddr.c | 2 +- board/freescale/t208xqds/spl.c | 2 +- board/freescale/t208xrdb/ddr.c | 2 +- board/freescale/t208xrdb/spl.c | 2 +- board/freescale/t4qds/ddr.c | 2 +- board/freescale/t4qds/spl.c | 2 +- board/freescale/t4rdb/ddr.c | 2 +- board/freescale/t4rdb/spl.c | 2 +- board/gaisler/gr_cpci_ax2000/gr_cpci_ax2000.c | 2 +- board/gaisler/gr_ep2s60/gr_ep2s60.c | 2 +- board/gaisler/gr_xc3s_1500/gr_xc3s_1500.c | 2 +- board/gaisler/grsim/grsim.c | 2 +- board/gaisler/grsim_leon2/grsim_leon2.c | 2 +- board/gdsys/mpc8308/sdram.c | 2 +- board/ids/ids8313/ids8313.c | 2 +- board/ifm/ac14xx/ac14xx.c | 2 +- board/ifm/o2dnt2/o2dnt2.c | 4 ++-- board/imgtec/boston/ddr.c | 2 +- board/imgtec/malta/malta.c | 2 +- board/imgtec/xilfpga/xilfpga.c | 2 +- board/inka4x0/inka4x0.c | 4 ++-- board/intercontrol/digsy_mtc/digsy_mtc.c | 4 ++-- board/ipek01/ipek01.c | 4 ++-- board/jupiter/jupiter.c | 4 ++-- board/keymile/km82xx/km82xx.c | 2 +- board/keymile/km83xx/km83xx.c | 2 +- board/keymile/kmp204x/ddr.c | 2 +- board/liebherr/lwmon5/sdram.c | 4 ++-- board/micronas/vct/vct.c | 2 +- board/motionpro/motionpro.c | 2 +- board/mpc8308_p1m/sdram.c | 2 +- board/mpl/mip405/mip405.c | 4 ++-- board/mpl/pati/pati.c | 2 +- board/mpl/pip405/pip405.c | 4 ++-- board/munices/munices.c | 4 ++-- board/pb1x00/pb1x00.c | 2 +- board/pdm360ng/pdm360ng.c | 2 +- board/phytec/pcm030/pcm030.c | 4 ++-- board/qemu-mips/qemu-mips.c | 2 +- board/sbc8349/sbc8349.c | 2 +- board/sbc8641d/sbc8641d.c | 2 +- board/sysam/amcore/amcore.c | 4 ++-- board/tqc/tqm5200/tqm5200.c | 4 ++-- board/tqc/tqm834x/tqm834x.c | 2 +- board/tqc/tqm8xx/tqm8xx.c | 2 +- board/v38b/v38b.c | 2 +- board/varisys/cyrus/ddr.c | 2 +- board/ve8313/ve8313.c | 2 +- board/xes/xpedite1000/xpedite1000.c | 2 +- board/xes/xpedite517x/xpedite517x.c | 2 +- board/xilinx/ppc405-generic/xilinx_ppc405_generic.c | 2 +- board/xilinx/ppc440-generic/xilinx_ppc440_generic.c | 2 +- common/board_f.c | 15 --------------- doc/README.mpc85xx | 2 +- drivers/ddr/fsl/main.c | 4 ++-- include/common.h | 3 --- 132 files changed, 170 insertions(+), 177 deletions(-)
arch/arc/lib/cpu.c +6 -0
@@ -28,3 +28,9 @@ int arch_early_init_r(void) gd->bd->bi_memsize =CONFIG_SYS_SDRAM_SIZE ;return 0 ; } + +/* This is a dummy function on arc */ +int dram_init (void ) +{ +return 0 ; +}
arch/mips/mach-ath79/dram.c +1 -1
@@ -11,7 +11,7 @@DECLARE_GLOBAL_DATA_PTR ; -int initdram (void ) +int dram_init (void ) {ddr_tap_tuning (); gd->ram_size =get_ram_size ((void *)KSEG1 ,SZ_256M );
arch/mips/mach-pic32/cpu.c +1 -1
@@ -110,7 +110,7 @@ static void ddr2_pmd_ungate(void) }/* initialize the DDR2 Controller and DDR2 PHY */ -int initdram (void ) +int dram_init (void ) {ddr2_pmd_ungate ();ddr2_phy_init ();
arch/mips/mach-pic32/include/mach/ddr.h +1 -1
@@ -8,7 +8,7 @@#ifndef __MICROCHIP_PIC32_DDR_H#define __MICROCHIP_PIC32_DDR_H -/* called by initdram() function */ +/* called by dram_init() function */ void ddr2_phy_init (void );void ddr2_ctrl_init (void );phys_size_t ddr2_calculate_size (void );
arch/powerpc/cpu/mpc5xxx/spl_boot.c +2 -2
@@ -32,7 +32,7 @@ void board_init_f(ulong bootflag)/* * On MPC5200, the initial RAM (and gd) is located in the internal * SRAM. So we can actually call the preloader console init code -* before calling initdram(). This makes serial output (printf) +* before calling dram_init(). This makes serial output (printf) * available very early, even before SDRAM init, which has been * an U-Boot priciple from day 1. */
@@ -62,7 +62,7 @@ void board_init_f(ulong bootflag)* First we need to initialize the SDRAM, so that the real * U-Boot or the OS (Linux) can be loaded */ -initdram (); +dram_init ();/* Clear bss */ memset (__bss_start,'\0' , __bss_end - __bss_start);
arch/powerpc/cpu/mpc85xx/cpu.c +2 -2
@@ -401,7 +401,7 @@ void mpc85xx_reginfo(void) #ifndef CONFIG_FSL_CORENET #if (defined(CONFIG_SYS_RAMBOOT) || defined(CONFIG_SPL)) && \ !defined(CONFIG_SYS_INIT_L2_ADDR) -int initdram(void) +int dram_init(void) { #if defined(CONFIG_SPD_EEPROM) || defined(CONFIG_DDR_SPD) || \ defined(CONFIG_ARCH_QEMU_E500)
@@ -413,7 +413,7 @@ int initdram(void) return 0; }#else /* CONFIG_SYS_RAMBOOT */ -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size =0 ;
arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c +5 -5
@@ -403,20 +403,20 @@ static unsigned char spd_read(uchar chip, uint addr) }/*-----------------------------------------------------------------------------+ -* initdram. Initializes the 440SP Memory Queue and DDR SDRAM controller. +* dram_init. Initializes the 440SP Memory Queue and DDR SDRAM controller. * Note: This routine runs from flash with a stack set up in the chip's * sram space. It is important that the routine does not require .sbss, .bss or * .data sections. It also cannot call routines that require these sections. *-----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------- -* Function: initdram +* Function: dram_init * Description: Configures SDRAM memory banks for DDR operation. * Auto Memory Configuration option reads the DDR SDRAM EEPROMs * via the IIC bus and then configures the DDR SDRAM memory * banks appropriately. If Auto Memory Configuration is * not used, it is assumed that no DIMM is plugged *-----------------------------------------------------------------------------*/ -int initdram (void ) +int dram_init (void ) {unsigned char iic0_dimm_addr[] =SPD_EEPROM_ADDRESS ;unsigned long dimm_populated[MAXDIMMS ] = {SDRAM_NONE ,SDRAM_NONE };
@@ -2855,13 +2855,13 @@ static void test(void)#else /* CONFIG_SPD_EEPROM */ /*----------------------------------------------------------------------------- -* Function: initdram +* Function: dram_init * Description: Configures the PPC4xx IBM DDR1/DDR2 SDRAM memory controller. * The configuration is performed using static, compile- * time parameters. * Configures the PPC405EX(r) and PPC460EX/GT *---------------------------------------------------------------------------*/ -int initdram (void ) +int dram_init (void ) {unsigned long val;
arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c +4 -4
@@ -987,20 +987,20 @@ static void program_ddr0_44(unsigned long dimm_ranks[], }/*-----------------------------------------------------------------------------+ -* initdram. Initializes the 440EPx/GPx DDR SDRAM controller. +* dram_init. Initializes the 440EPx/GPx DDR SDRAM controller. * Note: This routine runs from flash with a stack set up in the chip's * sram space. It is important that the routine does not require .sbss, .bss or * .data sections. It also cannot call routines that require these sections. *-----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------- -* Function: initdram +* Function: dram_init * Description: Configures SDRAM memory banks for DDR operation. * Auto Memory Configuration option reads the DDR SDRAM EEPROMs * via the IIC bus and then configures the DDR SDRAM memory * banks appropriately. If Auto Memory Configuration is * not used, it is assumed that no DIMM is plugged *-----------------------------------------------------------------------------*/ -int initdram (void ) +int dram_init (void ) {unsigned char const iic0_dimm_addr[] =SPD_EEPROM_ADDRESS ;unsigned long dimm_ranks[MAXDIMMS ];
@@ -1014,7 +1014,7 @@ int initdram(void)unsigned long cas_latency =0 ;/* to quiet initialization warning */ unsigned long dram_size; -debug ("\nEntering initdram()\n" ); +debug ("\nEntering dram_init()\n" );/*------------------------------------------------------------------ * Stop the DDR-SDRAM controller.
arch/powerpc/cpu/ppc4xx/sdram.c +2 -2
@@ -150,7 +150,7 @@ static ulong compute_rtr(ulong speed, ulong rows, ulong refresh)/* * Autodetect onboard SDRAM on 405 platforms */ -int initdram (void ) +int dram_init (void ) {ulong speed;ulong sdtr1;
@@ -353,7 +353,7 @@ static void sdram_tr1_set(int ram_address, int* tr1_value)* so this should be extended for other future boards * using this routine! */ -int initdram (void ) +int dram_init (void ) {int i;int tr1_bank1;
arch/powerpc/cpu/ppc4xx/spl_boot.c +1 -1
@@ -26,7 +26,7 @@ void board_init_f(ulong bootflag)* First we need to initialize the SDRAM, so that the real * U-Boot or the OS (Linux) can be loaded */ -initdram (); +dram_init ();/* Clear bss */ memset (__bss_start,'\0' , __bss_end - __bss_start);
arch/xtensa/cpu/cpu.c +5 -0
@@ -47,3 +47,8 @@ int arch_cpu_init(void) gd->ram_size =CONFIG_SYS_SDRAM_SIZE ;return 0 ; } + +int dram_init (void ) +{ +return 0 ; +}
board/Arcturus/ucp1020/spl.c +1 -1
@@ -110,7 +110,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE );#endif -initdram (); +dram_init ();#ifdef CONFIG_SPL_NAND_BOOT puts ("Tertiary program loader running in sram..." );#else
board/BuS/eb_cpu5282/eb_cpu5282.c +1 -1
@@ -35,7 +35,7 @@ int checkboard (void)return 0 ; } -int initdram (void ) +int dram_init (void ) {int size, i;
board/a3m071/a3m071.c +2 -2
@@ -72,11 +72,11 @@ static void sdram_start(int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make real use +* ATTENTION: Although partially referenced dram_init does NOT make real use * use of CONFIG_SYS_SDRAM_BASE. The code does not work if * CONFIG_SYS_SDRAM_BASE is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;ulong dramsize2 =0 ;
board/a4m072/a4m072.c +2 -2
@@ -68,12 +68,12 @@ static void sdram_start (int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make real use +* ATTENTION: Although partially referenced dram_init does NOT make real use * use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE * is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;uint svr, pvr;
board/amcc/acadia/memory.c +1 -1
@@ -43,7 +43,7 @@ static void cram_bcr_write(u32 wr_val)return ; } -int initdram (void ) +int dram_init (void ) {int i;u32 val;
board/amcc/bamboo/bamboo.c +1 -1
@@ -438,7 +438,7 @@ int checkboard(void) } -int initdram (void ) +int dram_init (void ) { gd->ram_size =spd_sdram ();
board/amcc/bubinga/bubinga.c +2 -2
@@ -54,10 +54,10 @@ int checkboard(void) }/* ------------------------------------------------------------------------- -initdram() reads EEPROM via I2c. EEPROM contains all of +dram_init() reads EEPROM via I2c. EEPROM contains all of the necessary info for SDRAM controller configuration ------------------------------------------------------------------------- */ -int initdram (void ) +int dram_init (void ) { gd->ram_size =spd_sdram ();
board/amcc/sequoia/sdram.c +2 -2
@@ -30,10 +30,10 @@ extern void denali_core_search_data_eye(void);/************************************************************************* * -* initdram -- 440EPx's DDR controller is a DENALI Core +* dram_init -- 440EPx's DDR controller is a DENALI Core * ************************************************************************/ -int initdram (void ) +int dram_init (void ) {#if !defined(CONFIG_SYS_RAMBOOT )ulong speed =get_bus_freq (0 );
board/amcc/walnut/walnut.c +2 -2
@@ -73,10 +73,10 @@ int checkboard(void) }/* -* initdram() reads EEPROM via I2c. EEPROM contains all of +* dram_init() reads EEPROM via I2c. EEPROM contains all of * the necessary info for SDRAM controller configuration */ -int initdram (void ) +int dram_init (void ) { gd->ram_size =spd_sdram ();
board/amcc/yosemite/yosemite.c +2 -2
@@ -205,7 +205,7 @@ int checkboard(void) }/************************************************************************* -* initdram -- doesn't use serial presence detect. +* dram_init -- doesn't use serial presence detect. * * Assumes: 256 MB, ECC, non-registered * PLB @ 133 MHz
@@ -286,7 +286,7 @@ void sdram_tr1_set(int ram_address, int* tr1_value) *tr1_value = (first_good + last_bad) /2 ; } -int initdram (void ) +int dram_init (void ) { registeruint reg;int tr1_bank1, tr1_bank2;
board/astro/mcf5373l/mcf5373l.c +1 -1
@@ -27,7 +27,7 @@ int checkboard(void)return 0 ; } -int initdram (void ) +int dram_init (void ) {#if !defined(CONFIG_MONITOR_IS_IN_RAM )sdram_t *sdp = (sdram_t *)(MMAP_SDRAM );
board/canmb/canmb.c +2 -2
@@ -62,12 +62,12 @@ static void sdram_start (int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make real use +* ATTENTION: Although partially referenced dram_init does NOT make real use * use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE * is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;ulong dramsize2 =0 ;
board/cm5200/cm5200.c +1 -1
@@ -97,7 +97,7 @@ static mem_conf_t* get_mem_config(int board_type)/* * Initalize SDRAM - configure SDRAM controller, detect memory size. */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;#ifndef CONFIG_SYS_RAMBOOT
board/cobra5272/cobra5272.c +1 -1
@@ -17,7 +17,7 @@ int checkboard (void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM );
board/davedenx/aria/aria.c +1 -1
@@ -18,7 +18,7 @@DECLARE_GLOBAL_DATA_PTR ; -int initdram (void ) +int dram_init (void ) { gd->ram_size =fixed_sdram (NULL ,NULL ,0 );
board/dbau1x00/dbau1x00.c +1 -1
@@ -13,7 +13,7 @@DECLARE_GLOBAL_DATA_PTR ; -int initdram (void ) +int dram_init (void ) {/* Sdram is setup by assembler code */ /* If memory could be changed, we should return the true value here */
board/esd/mecp5123/mecp5123.c +1 -1
@@ -62,7 +62,7 @@ int board_early_init_f(void)return 0 ; } -int initdram (void ) +int dram_init (void ) { gd->ram_size =get_ram_size (0 ,fixed_sdram (NULL ,NULL ,0 ));
board/esd/pmc440/sdram.c +2 -2
@@ -42,7 +42,7 @@ struct sdram_conf_s sdram_conf[] = { };/* -* initdram -- 440EPx's DDR controller is a DENALI Core +* dram_init -- 440EPx's DDR controller is a DENALI Core */ int initdram_by_rb (int rows,int banks) {
@@ -107,7 +107,7 @@ int initdram_by_rb(int rows, int banks)return 0 ; } -int initdram (void ) +int dram_init (void ) {phys_size_t size;int n;
board/esd/vme8349/vme8349.c +1 -1
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR;void ddr_enable_ecc (unsigned int dram_size); -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize =0 ;
board/freescale/b4860qds/ddr.c +1 -1
@@ -176,7 +176,7 @@ found: popts->cpo_sample =0x3e ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/b4860qds/spl.c +1 -1
@@ -108,7 +108,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)puts ("\n\n" ); -initdram (); +dram_init ();#ifdef CONFIG_SPL_NAND_BOOT nand_boot ();
board/freescale/c29xpcie/spl.c +1 -1
@@ -67,7 +67,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init_all (); -initdram (); +dram_init ();#ifdef CONFIG_SPL_NAND_BOOT puts ("TPL\n" );
board/freescale/corenet_ds/ddr.c +1 -1
@@ -260,7 +260,7 @@ found: popts->ddr_cdr1 =DDR_CDR1_DHC_EN ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/m5208evbe/m5208evbe.c +1 -1
@@ -22,7 +22,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {sdram_t *sdram = (sdram_t *)(MMAP_SDRAM );u32 dramsize, i;
board/freescale/m52277evb/m52277evb.c +1 -1
@@ -21,7 +21,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {u32 dramsize;
board/freescale/m5235evb/m5235evb.c +1 -1
@@ -22,7 +22,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {sdram_t *sdram = (sdram_t *)(MMAP_SDRAM );gpio_t *gpio = (gpio_t *)(MMAP_GPIO );
board/freescale/m5249evb/m5249evb.c +1 -1
@@ -31,7 +31,7 @@ int checkboard (void) { }; -int initdram (void ) +int dram_init (void ) {unsigned long junk =0xa5a59696 ;
board/freescale/m5253demo/m5253demo.c +1 -1
@@ -22,7 +22,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {u32 dramsize =0 ;
board/freescale/m5253evbe/m5253evbe.c +1 -1
@@ -21,7 +21,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {/* * Check to see if the SDRAM has already been initialized
board/freescale/m5272c3/m5272c3.c +1 -1
@@ -19,7 +19,7 @@ int checkboard (void) {return 0 ; }; -int initdram (void ) +int dram_init (void ) {sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM );
board/freescale/m5275evb/m5275evb.c +1 -1
@@ -25,7 +25,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {sdramctrl_t *sdp = (sdramctrl_t *)(MMAP_SDRAM );gpio_t *gpio_reg = (gpio_t *)(MMAP_GPIO );
board/freescale/m5282evb/m5282evb.c +1 -1
@@ -16,7 +16,7 @@ int checkboard (void)return 0 ; } -int initdram (void ) +int dram_init (void ) {u32 dramsize, i, dramclk;
board/freescale/m53017evb/m53017evb.c +1 -1
@@ -22,7 +22,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {sdram_t *sdram = (sdram_t *)(MMAP_SDRAM );u32 dramsize, i;
board/freescale/m5329evb/m5329evb.c +1 -1
@@ -22,7 +22,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {sdram_t *sdram = (sdram_t *)(MMAP_SDRAM );u32 dramsize, i;
board/freescale/m5373evb/m5373evb.c +1 -1
@@ -22,7 +22,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {sdram_t *sdram = (sdram_t *)(MMAP_SDRAM );u32 dramsize, i;
board/freescale/m54418twr/m54418twr.c +1 -1
@@ -25,7 +25,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {u32 dramsize;
board/freescale/m54451evb/m54451evb.c +1 -1
@@ -26,7 +26,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {u32 dramsize;#ifdef CONFIG_CF_SBF
board/freescale/m54455evb/m54455evb.c +1 -1
@@ -22,7 +22,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {u32 dramsize;#ifdef CONFIG_CF_SBF
board/freescale/m547xevb/m547xevb.c +1 -1
@@ -23,7 +23,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {siu_t *siu = (siu_t *) (MMAP_SIU );sdram_t *sdram = (sdram_t *)(MMAP_SDRAM );
board/freescale/m548xevb/m548xevb.c +1 -1
@@ -23,7 +23,7 @@ int checkboard(void)return 0 ; }; -int initdram (void ) +int dram_init (void ) {siu_t *siu = (siu_t *) (MMAP_SIU );sdram_t *sdram = (sdram_t *)(MMAP_SDRAM );
board/freescale/mpc5121ads/mpc5121ads.c +1 -1
@@ -95,7 +95,7 @@ int is_micron(void){return (ismicron); } -int initdram (void ) +int dram_init (void ) {u32 msize =0 ;/*
board/freescale/mpc8308rdb/sdram.c +1 -1
@@ -65,7 +65,7 @@ static long fixed_sdram(void)return get_ram_size (CONFIG_SYS_DDR_SDRAM_BASE , msize); } -int initdram (void ) +int dram_init (void ) {immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize;
board/freescale/mpc8313erdb/mpc8313erdb.c +1 -1
@@ -134,7 +134,7 @@ void board_init_f(ulong bootflag) CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);puts ("NAND boot... " );timer_init (); -initdram (); +dram_init ();relocate_code (CONFIG_SYS_NAND_U_BOOT_RELOC_SP , (gd_t *)gd,CONFIG_SYS_NAND_U_BOOT_RELOC ); }
board/freescale/mpc8313erdb/sdram.c +1 -1
@@ -97,7 +97,7 @@ static long fixed_sdram(void)return msize; } -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR ;volatile fsl_lbc_t *lbc = &im->im_lbc;
board/freescale/mpc8315erdb/mpc8315erdb.c +1 -1
@@ -222,7 +222,7 @@ void board_init_f(ulong bootflag) CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);puts ("NAND boot... " );timer_init (); -initdram (); +dram_init ();relocate_code (CONFIG_SYS_NAND_U_BOOT_RELOC +0x10000 , (gd_t *)gd,CONFIG_SYS_NAND_U_BOOT_RELOC ); }
board/freescale/mpc8315erdb/sdram.c +1 -1
@@ -92,7 +92,7 @@ static long fixed_sdram(void) }#endif /* CONFIG_SYS_RAMBOOT */ -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR ;u32 msize;
board/freescale/mpc8323erdb/mpc8323erdb.c +1 -1
@@ -70,7 +70,7 @@ const qe_iop_conf_t qe_iop_conf_tab[] = {int fixed_sdram (void ); -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize =0 ;
board/freescale/mpc832xemds/mpc832xemds.c +1 -1
@@ -90,7 +90,7 @@ int board_early_init_r(void)int fixed_sdram (void ); -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize =0 ;
board/freescale/mpc8349emds/mpc8349emds.c +1 -1
@@ -48,7 +48,7 @@ int board_early_init_f (void)#define ns2clk (ns) (ns / (1000000000 / CONFIG_8349_CLKIN) + 1) -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;phys_size_t msize =0 ;
board/freescale/mpc8349itx/mpc8349itx.c +1 -1
@@ -118,7 +118,7 @@ volatile static struct pci_controller hose[] = { };#endif /* CONFIG_PCI */ -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize =0 ;
board/freescale/mpc837xemds/mpc837xemds.c +1 -1
@@ -218,7 +218,7 @@ extern void ddr_enable_ecc(unsigned int dram_size);#endif int fixed_sdram (void ); -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize =0 ;
board/freescale/mpc837xerdb/mpc837xerdb.c +1 -1
@@ -62,7 +62,7 @@ void ddr_enable_ecc(unsigned int dram_size);#endif int fixed_sdram (void ); -int initdram (void ) +int dram_init (void ) {immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize =0 ;
board/freescale/mpc8610hpcd/mpc8610hpcd.c +1 -1
@@ -118,7 +118,7 @@ int checkboard(void) } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size =0 ;
board/freescale/mpc8641hpcn/mpc8641hpcn.c +1 -1
@@ -39,7 +39,7 @@ int checkboard(void)return 0 ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size =0 ;
board/freescale/p1010rdb/spl.c +1 -1
@@ -94,7 +94,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init_all (); -initdram (); +dram_init ();#ifdef CONFIG_SPL_NAND_BOOT puts ("\nTertiary program loader running in sram..." );#else
board/freescale/p1022ds/spl.c +1 -1
@@ -111,7 +111,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE );#endif -initdram (); +dram_init ();#ifdef CONFIG_SPL_NAND_BOOT puts ("Tertiary program loader running in sram..." );#else
board/freescale/p1_p2_rdb_pc/spl.c +1 -1
@@ -108,7 +108,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE );#endif -initdram (); +dram_init ();#ifdef CONFIG_SPL_NAND_BOOT puts ("Tertiary program loader running in sram..." );#else
board/freescale/p2041rdb/ddr.c +1 -1
@@ -118,7 +118,7 @@ found: popts->ddr_cdr1 =DDR_CDR1_DHC_EN ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size =0 ;
board/freescale/t102xqds/ddr.c +1 -1
@@ -169,7 +169,7 @@ void board_mem_sleep_setup(void) }#endif -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/t102xqds/spl.c +1 -1
@@ -142,7 +142,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init_all (); -initdram (); +dram_init ();#ifdef CONFIG_SPL_MMC_BOOT mmc_boot ();
board/freescale/t102xrdb/ddr.c +1 -1
@@ -229,7 +229,7 @@ void board_mem_sleep_setup(void) }#endif -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/t102xrdb/spl.c +1 -1
@@ -129,7 +129,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init_all (); -initdram (); +dram_init ();#ifdef CONFIG_SPL_MMC_BOOT mmc_boot ();
board/freescale/t1040qds/ddr.c +1 -1
@@ -117,7 +117,7 @@ void board_mem_sleep_setup(void) }#endif -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/t104xrdb/ddr.c +1 -1
@@ -120,7 +120,7 @@ void board_mem_sleep_setup(void) }#endif -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/t104xrdb/spl.c +1 -1
@@ -125,7 +125,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)puts ("\n\n" ); -initdram (); +dram_init ();#ifdef CONFIG_SPL_MMC_BOOT mmc_boot ();
board/freescale/t208xqds/ddr.c +1 -1
@@ -104,7 +104,7 @@ found: popts->cpo_sample =0x64 ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/t208xqds/spl.c +1 -1
@@ -128,7 +128,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init_all (); -initdram (); +dram_init ();#ifdef CONFIG_SPL_MMC_BOOT mmc_boot ();
board/freescale/t208xrdb/ddr.c +1 -1
@@ -97,7 +97,7 @@ found: popts->cpo_sample =0x54 ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/t208xrdb/spl.c +1 -1
@@ -98,7 +98,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init_all (); -initdram (); +dram_init ();#ifdef CONFIG_SPL_MMC_BOOT mmc_boot ();
board/freescale/t4qds/ddr.c +1 -1
@@ -112,7 +112,7 @@ found: popts->cpo_sample =0x63 ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/t4qds/spl.c +1 -1
@@ -133,7 +133,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init_all (); -initdram (); +dram_init ();#ifdef CONFIG_SPL_MMC_BOOT mmc_boot ();
board/freescale/t4rdb/ddr.c +1 -1
@@ -105,7 +105,7 @@ found: popts->cpo_sample =0x64 ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/freescale/t4rdb/spl.c +1 -1
@@ -91,7 +91,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)i2c_init_all (); -initdram (); +dram_init ();mmc_boot (); }
board/gaisler/gr_cpci_ax2000/gr_cpci_ax2000.c +1 -1
@@ -10,7 +10,7 @@#include <config.h> #include <asm/leon.h> -int initdram (void ) +int dram_init (void ) {/* Does not set gd->ram_size here */
board/gaisler/gr_ep2s60/gr_ep2s60.c +1 -1
@@ -10,7 +10,7 @@#include <config.h> #include <asm/leon.h> -int initdram (void ) +int dram_init (void ) {/* Does not set gd->ram_size here */
board/gaisler/gr_xc3s_1500/gr_xc3s_1500.c +1 -1
@@ -9,7 +9,7 @@#include <config.h> #include <asm/leon.h> -int initdram (void ) +int dram_init (void ) {/* Does not set gd->ram_size here */
board/gaisler/grsim/grsim.c +1 -1
@@ -10,7 +10,7 @@#include <common.h> #include <asm/leon.h> -int initdram (void ) +int dram_init (void ) {/* Does not set gd->ram_size here */
board/gaisler/grsim_leon2/grsim_leon2.c +1 -1
@@ -10,7 +10,7 @@#include <common.h> #include <asm/leon.h> -int initdram (void ) +int dram_init (void ) {/* Does not set gd->ram_size here */
board/gdsys/mpc8308/sdram.c +1 -1
@@ -66,7 +66,7 @@ static long fixed_sdram(void)return get_ram_size (CONFIG_SYS_DDR_SDRAM_BASE , msize); } -int initdram (void ) +int dram_init (void ) {immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize;
board/ids/ids8313/ids8313.c +1 -1
@@ -119,7 +119,7 @@ static int setup_sdram(void)return msize; } -int initdram (void ) +int dram_init (void ) {immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;fsl_lbc_t *lbc = &im->im_lbc;
board/ifm/ac14xx/ac14xx.c +1 -1
@@ -310,7 +310,7 @@ u32 sdram_init_seq[] = {/* EMPTY, optional, we don't do it */ }; -int initdram (void ) +int dram_init (void ) { gd->ram_size =fixed_sdram (NULL , sdram_init_seq,ARRAY_SIZE (sdram_init_seq));
board/ifm/o2dnt2/o2dnt2.c +2 -2
@@ -62,11 +62,11 @@ static void sdram_start(int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make real use +* ATTENTION: Although partially referenced dram_init does NOT make real use * use of CONFIG_SYS_SDRAM_BASE. The code does not work if * CONFIG_SYS_SDRAM_BASE is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {struct mpc5xxx_mmap_ctl *mmap_ctl = (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR ;
board/imgtec/boston/ddr.c +1 -1
@@ -12,7 +12,7 @@DECLARE_GLOBAL_DATA_PTR ; -int initdram (void ) +int dram_init (void ) {u32 ddrconf0 =__raw_readl ((uint32_t *)BOSTON_PLAT_DDRCONF0 );
board/imgtec/malta/malta.c +1 -1
@@ -85,7 +85,7 @@ static enum sys_con malta_sys_con(void) } } -int initdram (void ) +int dram_init (void ) { gd->ram_size =CONFIG_SYS_MEM_SIZE ;
board/imgtec/xilfpga/xilfpga.c +1 -1
@@ -14,7 +14,7 @@DECLARE_GLOBAL_DATA_PTR ;/* initialize the DDR Controller and PHY */ -int initdram (void ) +int dram_init (void ) {/* MIG IP block is smart and doesn't need SW * to do any init */
board/inka4x0/inka4x0.c +2 -2
@@ -74,12 +74,12 @@ static void sdram_start (int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make real use +* ATTENTION: Although partially referenced dram_init does NOT make real use * use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE * is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {volatile struct mpc5xxx_mmap_ctl *mm = (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR ;
board/intercontrol/digsy_mtc/digsy_mtc.c +2 -2
@@ -74,12 +74,12 @@ static void sdram_start(int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make real use +* ATTENTION: Although partially referenced dram_init does NOT make real use * use of CONFIG_SYS_SDRAM_BASE. The code does not work if * CONFIG_SYS_SDRAM_BASE is something other than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;ulong dramsize2 =0 ;
board/ipek01/ipek01.c +2 -2
@@ -75,12 +75,12 @@ static void sdram_start (int hi_addr) }/* -* ATTENTION: Although partially referenced initdram does NOT make real +* ATTENTION: Although partially referenced dram_init does NOT make real * use of CONFIG_SYS_SDRAM_BASE. The code does not work if * CONFIG_SYS_SDRAM_BASE is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {struct mpc5xxx_mmap_ctl *mmap_ctl = (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR ;
board/jupiter/jupiter.c +2 -2
@@ -73,12 +73,12 @@ static void sdram_start (int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make real use +* ATTENTION: Although partially referenced dram_init does NOT make real use * use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE * is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;ulong dramsize2 =0 ;
board/keymile/km82xx/km82xx.c +1 -1
@@ -291,7 +291,7 @@ static long probe_sdram(memctl8260_t *memctl)#endif /* CONFIG_SYS_SDRAM_LIST */ -int initdram (void ) +int dram_init (void ) {immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;memctl8260_t *memctl = &immap->im_memctl;
board/keymile/km83xx/km83xx.c +1 -1
@@ -330,7 +330,7 @@ static int fixed_sdram(void)return msize; } -int initdram (void ) +int dram_init (void ) {immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize =0 ;
board/keymile/kmp204x/ddr.c +1 -1
@@ -50,7 +50,7 @@ void fsl_ddr_board_options(memctl_options_t *popts, popts->ddr_cdr1 =DDR_CDR1_DHC_EN | DDR_CDR_ODT_75ohm; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size =0 ;
board/liebherr/lwmon5/sdram.c +2 -2
@@ -144,10 +144,10 @@ static void program_ecc(u32 start_address,/************************************************************************* * -* initdram -- 440EPx's DDR controller is a DENALI Core +* dram_init -- 440EPx's DDR controller is a DENALI Core * ************************************************************************/ -int initdram (void ) +int dram_init (void ) {/* CL=4 */ mtsdram (DDR0_02 ,0x00000000 );
board/micronas/vct/vct.c +1 -1
@@ -61,7 +61,7 @@ void _machine_restart(void)* SDRAM is already configured by the bootstrap code, only return the * auto-detected size here */ -int initdram (void ) +int dram_init (void ) { gd->ram_size =get_ram_size ((long *)CONFIG_SYS_SDRAM_BASE ,CONFIG_SYS_MBYTES_SDRAM <<20 );
board/motionpro/motionpro.c +1 -1
@@ -118,7 +118,7 @@ static void sdram_start(int hi_addr)/* * Initalize SDRAM - configure SDRAM controller, detect memory size. */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;#ifndef CONFIG_SYS_RAMBOOT
board/mpc8308_p1m/sdram.c +1 -1
@@ -61,7 +61,7 @@ static long fixed_sdram(void)return get_ram_size (CONFIG_SYS_DDR_SDRAM_BASE , msize); } -int initdram (void ) +int dram_init (void ) {immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize;
board/mpl/mip405/mip405.c +2 -2
@@ -615,14 +615,14 @@ int checkboard (void)/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ /* -initdram() reads EEPROM via I2c. EEPROM contains all of +dram_init() reads EEPROM via I2c. EEPROM contains all of the necessary info for SDRAM controller configuration */ /* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ static int test_dram (unsigned long ramsize); -int initdram (void ) +int dram_init (void ) {unsigned long bank_reg[4 ], tmp, bank_size;
board/mpl/pati/pati.c +1 -1
@@ -135,7 +135,7 @@ extern int mem_test (unsigned long start, unsigned long ramsize, int quiet);/* * Get RAM size. */ -int initdram (void ) +int dram_init (void ) {unsigned char board_rev;unsigned long reg;
board/mpl/pip405/pip405.c +2 -2
@@ -605,14 +605,14 @@ int checkboard (void)/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ /* -initdram() reads EEPROM via I2c. EEPROM contains all of +dram_init() reads EEPROM via I2c. EEPROM contains all of the necessary info for SDRAM controller configuration */ /* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ static int test_dram (unsigned long ramsize); -int initdram (void ) +int dram_init (void ) {unsigned long bank_reg[4 ], tmp, bank_size;int i, ds;
board/munices/munices.c +2 -2
@@ -55,12 +55,12 @@ static void sdram_start (int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make real use +* ATTENTION: Although partially referenced dram_init does NOT make real use * use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE * is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;ulong dramsize2 =0 ;
board/pb1x00/pb1x00.c +1 -1
@@ -13,7 +13,7 @@DECLARE_GLOBAL_DATA_PTR ; -int initdram (void ) +int dram_init (void ) {/* Sdram is setup by assembler code */ /* If memory could be changed, we should return the true value here */
board/pdm360ng/pdm360ng.c +1 -1
@@ -48,7 +48,7 @@ sdram_conf_t mddrc_config[] = { }, }; -int initdram (void ) +int dram_init (void ) {int i;u32 msize =0 ;
board/phytec/pcm030/pcm030.c +2 -2
@@ -69,13 +69,13 @@ static void sdram_start(int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make +* ATTENTION: Although partially referenced dram_init does NOT make * real use of CONFIG_SYS_SDRAM_BASE. The code does not * work if CONFIG_SYS_SDRAM_BASE * is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {volatile struct mpc5xxx_mmap_ctl *mm = (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR ;
board/qemu-mips/qemu-mips.c +1 -1
@@ -13,7 +13,7 @@DECLARE_GLOBAL_DATA_PTR ; -int initdram (void ) +int dram_init (void ) {/* Sdram is setup by assembler code */ /* If memory could be changed, we should return the true value here */
board/sbc8349/sbc8349.c +1 -1
@@ -37,7 +37,7 @@ int board_early_init_f (void)#define ns2clk (ns) (ns / (1000000000 / CONFIG_8349_CLKIN) + 1) -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;u32 msize =0 ;
board/sbc8641d/sbc8641d.c +1 -1
@@ -39,7 +39,7 @@ int checkboard (void)return 0 ; } -int initdram (void ) +int dram_init (void ) {long dram_size =0 ;
board/sysam/amcore/amcore.c +2 -2
@@ -40,7 +40,7 @@ int checkboard(void) }/* -* in initdram we are here executing from flash +* in dram_init we are here executing from flash * case 1: * is with no ACR/flash cache enabled * nop = 40ns (scope measured)
@@ -51,7 +51,7 @@ void fudelay(int usec) asmvolatile ("nop" ); } -int initdram (void ) +int dram_init (void ) {u32 dramsize,RC ;
board/tqc/tqm5200/tqm5200.c +2 -2
@@ -128,12 +128,12 @@ static void sdram_start (int hi_addr)#endif /* -* ATTENTION: Although partially referenced initdram does NOT make real use +* ATTENTION: Although partially referenced dram_init does NOT make real use * use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE * is something else than 0x00000000. */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;ulong dramsize2 =0 ;
board/tqc/tqm834x/tqm834x.c +1 -1
@@ -66,7 +66,7 @@ int board_early_init_r (void) {/************************************************************************** * DRAM initalization and size detection */ -int initdram (void ) +int dram_init (void ) {long bank_size;long size;
board/tqc/tqm8xx/tqm8xx.c +1 -1
@@ -126,7 +126,7 @@ int checkboard (void)/* ------------------------------------------------------------------------- */ -int initdram (void ) +int dram_init (void ) {volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;volatile memctl8xx_t *memctl = &immap->im_memctl;
board/v38b/v38b.c +1 -1
@@ -57,7 +57,7 @@ static void sdram_start(int hi_addr)#endif /* !CONFIG_SYS_RAMBOOT */ -int initdram (void ) +int dram_init (void ) {ulong dramsize =0 ;ulong dramsize2 =0 ;
board/varisys/cyrus/ddr.c +1 -1
@@ -168,7 +168,7 @@ found: popts->ddr_cdr1 =DDR_CDR1_DHC_EN ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size;
board/ve8313/ve8313.c +1 -1
@@ -88,7 +88,7 @@ static long fixed_sdram(void)return msize; } -int initdram (void ) +int dram_init (void ) {volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR ;volatile fsl_lbc_t *lbc = &im->im_lbc;
board/xes/xpedite1000/xpedite1000.c +1 -1
@@ -116,7 +116,7 @@ int checkboard(void)return 0 ; } -int initdram (void ) +int dram_init (void ) { gd->ram_size =spd_sdram ();
board/xes/xpedite517x/xpedite517x.c +1 -1
@@ -58,7 +58,7 @@ int board_early_init_r(void)return 0 ; } -int initdram (void ) +int dram_init (void ) {phys_size_t dram_size =fsl_ddr_sdram ();
board/xilinx/ppc405-generic/xilinx_ppc405_generic.c +1 -1
@@ -23,7 +23,7 @@ int checkboard(void)return 0 ; } -int initdram (void ) +int dram_init (void ) { gd->ram_size =get_ram_size (XPAR_DDR2_SDRAM_MEM_BASEADDR ,CONFIG_SYS_SDRAM_SIZE_MB *1024 *1024 );
board/xilinx/ppc440-generic/xilinx_ppc440_generic.c +1 -1
@@ -19,7 +19,7 @@ int checkboard(void)return 0 ; } -int initdram (void ) +int dram_init (void ) { gd->ram_size =get_ram_size (XPAR_DDR2_SDRAM_MEM_BASEADDR ,CONFIG_SYS_SDRAM_SIZE_MB *1024 *1024 );
common/board_f.c +0 -15
@@ -151,13 +151,6 @@ static int announce_dram_init(void)return 0 ; } -#if defined(CONFIG_MIPS ) || defined(CONFIG_PPC ) || defined(CONFIG_M68K ) -static int init_func_ram (void ) -{ -return initdram (); -} -#endif -static int show_dram_config (void ) {unsigned long long size;
@@ -784,15 +777,7 @@ static const init_fnc_t init_sequence_f[] = { init_func_spi, #endif announce_dram_init, -/* TODO: unify all these dram functions? */ -#if defined(CONFIG_ARM ) || defined(CONFIG_X86 ) || defined(CONFIG_NDS32 ) || \ - defined(CONFIG_MICROBLAZE ) || defined(CONFIG_AVR32 ) || \ - defined(CONFIG_SH ) dram_init,/* configure available RAM banks */ -#endif -#if defined(CONFIG_MIPS ) || defined(CONFIG_PPC ) || defined(CONFIG_M68K ) - init_func_ram, -#endif #ifdef CONFIG_POST post_init_f, #endif
doc/README.mpc85xx +1 -1
@@ -156,7 +156,7 @@ B) !defined(CONFIG_SYS_RAMBOOT) i.e. NOR boot Disable : 15, 14 11) Create DDR's TLB entriy - Location : Board_init_f -> init_func_ram -> initdram + Location : Board_init_f -> dram_init TLB entry : Search free TLB entry 12) Update Flash's TLB entry
drivers/ddr/fsl/main.c +2 -2
@@ -786,7 +786,7 @@ phys_size_t __fsl_ddr_sdram(fsl_ddr_info_t *pinfo)print_size (total_memory," of memory\n" );printf (" This U-Boot only supports < 4G of DDR\n" );printf (" You could rebuild it with CONFIG_PHYS_64BIT\n" ); -printf (" " );/* re-align to match init_func_ram print */ +printf (" " );/* re-align to match init_dram print */ total_memory = CONFIG_MAX_MEM_MAPPED; }#endif
@@ -796,7 +796,7 @@ phys_size_t __fsl_ddr_sdram(fsl_ddr_info_t *pinfo)/* * fsl_ddr_sdram(void) -- this is the main function to be -* called by initdram() in the board file. +* called by dram_init() in the board file. * * It returns amount of memory configured in bytes. */
include/common.h +0 -3
@@ -225,9 +225,6 @@ void hang (void) __attribute__ ((noreturn));int timer_init (void );int cpu_init (void ); -/* */ -int initdram (void ); -#include <display_options.h> /* common/main.c */
Signature · 1 line
2.12.2.715.g7642488e1d-goog
PATCH v2 2/2 board_f: Rename initdram() to dram_init()
Quoted 4 lines · Simon Glass
This allows us to use the same DRAM init function on all archs. Add a dummy function for arc, which does not use DRAM init here.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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/20170414/5d824029/attachment.sig>