board_f: Drop board_type parameter from initdram()
authorSimon Glass <sjg@chromium.org>
Fri, 31 Mar 2017 14:40:24 +0000 (08:40 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 5 Apr 2017 17:58:44 +0000 (13:58 -0400)
It looks like only cm5200 and tqm8xx use this feature, so we don't really
need it in generic code. Drop it and have the users access gd->board_type
directly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
140 files changed:
arch/arm/cpu/armv8/fsl-layerscape/cpu.c
arch/mips/mach-ath79/dram.c
arch/mips/mach-pic32/cpu.c
arch/powerpc/cpu/mpc5xxx/spl_boot.c
arch/powerpc/cpu/mpc85xx/cpu.c
arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c
arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c
arch/powerpc/cpu/ppc4xx/sdram.c
arch/powerpc/cpu/ppc4xx/spl_boot.c
board/Arcturus/ucp1020/spl.c
board/BuS/eb_cpu5282/eb_cpu5282.c
board/a3m071/a3m071.c
board/a4m072/a4m072.c
board/amcc/acadia/memory.c
board/amcc/bamboo/bamboo.c
board/amcc/bubinga/bubinga.c
board/amcc/sequoia/sdram.c
board/amcc/walnut/walnut.c
board/amcc/yosemite/yosemite.c
board/astro/mcf5373l/mcf5373l.c
board/canmb/canmb.c
board/cm5200/cm5200.c
board/cobra5272/cobra5272.c
board/davedenx/aria/aria.c
board/dbau1x00/dbau1x00.c
board/esd/mecp5123/mecp5123.c
board/esd/pmc440/sdram.c
board/esd/vme8349/vme8349.c
board/freescale/b4860qds/ddr.c
board/freescale/b4860qds/spl.c
board/freescale/c29xpcie/spl.c
board/freescale/corenet_ds/ddr.c
board/freescale/ls1021aqds/ddr.c
board/freescale/ls1021aqds/ls1021aqds.c
board/freescale/ls1043aqds/ddr.c
board/freescale/ls1043aqds/ls1043aqds.c
board/freescale/ls1043ardb/ddr.c
board/freescale/ls1046aqds/ddr.c
board/freescale/ls1046aqds/ls1046aqds.c
board/freescale/ls1046ardb/ddr.c
board/freescale/ls2080a/ddr.c
board/freescale/ls2080aqds/ddr.c
board/freescale/ls2080ardb/ddr.c
board/freescale/m5208evbe/m5208evbe.c
board/freescale/m52277evb/m52277evb.c
board/freescale/m5235evb/m5235evb.c
board/freescale/m5249evb/m5249evb.c
board/freescale/m5253demo/m5253demo.c
board/freescale/m5253evbe/m5253evbe.c
board/freescale/m5272c3/m5272c3.c
board/freescale/m5275evb/m5275evb.c
board/freescale/m5282evb/m5282evb.c
board/freescale/m53017evb/m53017evb.c
board/freescale/m5329evb/m5329evb.c
board/freescale/m5373evb/m5373evb.c
board/freescale/m54418twr/m54418twr.c
board/freescale/m54451evb/m54451evb.c
board/freescale/m54455evb/m54455evb.c
board/freescale/m547xevb/m547xevb.c
board/freescale/m548xevb/m548xevb.c
board/freescale/mpc5121ads/mpc5121ads.c
board/freescale/mpc8308rdb/sdram.c
board/freescale/mpc8313erdb/mpc8313erdb.c
board/freescale/mpc8313erdb/sdram.c
board/freescale/mpc8315erdb/mpc8315erdb.c
board/freescale/mpc8315erdb/sdram.c
board/freescale/mpc8323erdb/mpc8323erdb.c
board/freescale/mpc832xemds/mpc832xemds.c
board/freescale/mpc8349emds/mpc8349emds.c
board/freescale/mpc8349itx/mpc8349itx.c
board/freescale/mpc837xemds/mpc837xemds.c
board/freescale/mpc837xerdb/mpc837xerdb.c
board/freescale/mpc8610hpcd/mpc8610hpcd.c
board/freescale/mpc8641hpcn/mpc8641hpcn.c
board/freescale/p1010rdb/spl.c
board/freescale/p1022ds/spl.c
board/freescale/p1_p2_rdb_pc/spl.c
board/freescale/p2041rdb/ddr.c
board/freescale/t102xqds/ddr.c
board/freescale/t102xqds/spl.c
board/freescale/t102xrdb/ddr.c
board/freescale/t102xrdb/spl.c
board/freescale/t1040qds/ddr.c
board/freescale/t104xrdb/ddr.c
board/freescale/t104xrdb/spl.c
board/freescale/t208xqds/ddr.c
board/freescale/t208xqds/spl.c
board/freescale/t208xrdb/ddr.c
board/freescale/t208xrdb/spl.c
board/freescale/t4qds/ddr.c
board/freescale/t4qds/spl.c
board/freescale/t4rdb/ddr.c
board/freescale/t4rdb/spl.c
board/gaisler/gr_cpci_ax2000/gr_cpci_ax2000.c
board/gaisler/gr_ep2s60/gr_ep2s60.c
board/gaisler/gr_xc3s_1500/gr_xc3s_1500.c
board/gaisler/grsim/grsim.c
board/gaisler/grsim_leon2/grsim_leon2.c
board/gdsys/mpc8308/sdram.c
board/ids/ids8313/ids8313.c
board/ifm/ac14xx/ac14xx.c
board/ifm/o2dnt2/o2dnt2.c
board/imgtec/boston/ddr.c
board/imgtec/malta/malta.c
board/imgtec/xilfpga/xilfpga.c
board/inka4x0/inka4x0.c
board/intercontrol/digsy_mtc/digsy_mtc.c
board/ipek01/ipek01.c
board/jupiter/jupiter.c
board/keymile/km82xx/km82xx.c
board/keymile/km83xx/km83xx.c
board/keymile/kmp204x/ddr.c
board/liebherr/lwmon5/sdram.c
board/micronas/vct/vct.c
board/motionpro/motionpro.c
board/mpc8308_p1m/sdram.c
board/mpl/mip405/mip405.c
board/mpl/pati/pati.c
board/mpl/pip405/pip405.c
board/munices/munices.c
board/pb1x00/pb1x00.c
board/pdm360ng/pdm360ng.c
board/phytec/pcm030/pcm030.c
board/qemu-mips/qemu-mips.c
board/sbc8349/sbc8349.c
board/sbc8641d/sbc8641d.c
board/sysam/amcore/amcore.c
board/tqc/tqm5200/tqm5200.c
board/tqc/tqm834x/tqm834x.c
board/tqc/tqm8xx/tqm8xx.c
board/v38b/v38b.c
board/varisys/cyrus/ddr.c
board/ve8313/ve8313.c
board/xes/xpedite1000/xpedite1000.c
board/xes/xpedite517x/xpedite517x.c
board/xilinx/ppc405-generic/xilinx_ppc405_generic.c
board/xilinx/ppc440-generic/xilinx_ppc440_generic.c
common/board_f.c
include/asm-generic/global_data.h
include/common.h

index cebbb0f..d260e5d 100644 (file)
@@ -874,7 +874,7 @@ void update_early_mmu_table(void)
 
 __weak int dram_init(void)
 {
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 #if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
        /* This will break-before-make MMU for DDR */
        update_early_mmu_table();
index c29e98c..5ef43a0 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/addrspace.h>
 #include <mach/ddr.h>
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        ddr_tap_tuning();
        return get_ram_size((void *)KSEG1, SZ_256M);
index ac33391..f15b58d 100644 (file)
@@ -110,7 +110,7 @@ static void ddr2_pmd_ungate(void)
 }
 
 /* initialize the DDR2 Controller and DDR2 PHY */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        ddr2_pmd_ungate();
        ddr2_phy_init();
index e182dfb..23d2010 100644 (file)
@@ -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(0);
+       initdram();
 
        /* Clear bss */
        memset(__bss_start, '\0', __bss_end - __bss_start);
index cc30fa6..192634d 100644 (file)
@@ -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)
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
 #if defined(CONFIG_SPD_EEPROM) || defined(CONFIG_DDR_SPD) || \
        defined(CONFIG_ARCH_QEMU_E500)
@@ -411,7 +411,7 @@ phys_size_t initdram(int board_type)
 #endif
 }
 #else /* CONFIG_SYS_RAMBOOT */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size = 0;
 
index 7202c3f..3b79efb 100644 (file)
@@ -414,7 +414,7 @@ static unsigned char spd_read(uchar chip, uint addr)
  *              banks appropriately. If Auto Memory Configuration is
  *              not used, it is assumed that no DIMM is plugged
  *-----------------------------------------------------------------------------*/
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        unsigned char iic0_dimm_addr[] = SPD_EEPROM_ADDRESS;
        unsigned long dimm_populated[MAXDIMMS] = {SDRAM_NONE, SDRAM_NONE};
@@ -2855,7 +2855,7 @@ static void test(void)
  *             time parameters.
  *             Configures the PPC405EX(r) and PPC460EX/GT
  *---------------------------------------------------------------------------*/
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        unsigned long val;
 
index 455136c..3b072b7 100644 (file)
@@ -998,7 +998,7 @@ static void program_ddr0_44(unsigned long dimm_ranks[],
  *              banks appropriately. If Auto Memory Configuration is
  *              not used, it is assumed that no DIMM is plugged
  *-----------------------------------------------------------------------------*/
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        unsigned char const iic0_dimm_addr[] = SPD_EEPROM_ADDRESS;
        unsigned long dimm_ranks[MAXDIMMS];
index cd63456..2d80571 100644 (file)
@@ -148,7 +148,7 @@ static ulong compute_rtr(ulong speed, ulong rows, ulong refresh)
 /*
  * Autodetect onboard SDRAM on 405 platforms
  */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        ulong speed;
        ulong sdtr1;
@@ -349,7 +349,7 @@ static void sdram_tr1_set(int ram_address, int* tr1_value)
  *      so this should be extended for other future boards
  *      using this routine!
  */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        int i;
        int tr1_bank1;
index 318f23b..f3aa46c 100644 (file)
@@ -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(0);
+       initdram();
 
        /* Clear bss */
        memset(__bss_start, '\0', __bss_end - __bss_start);
index 3a775be..8a7fa1d 100644 (file)
@@ -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
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("Tertiary program loader running in sram...");
 #else
index b1740ee..2927524 100644 (file)
@@ -35,7 +35,7 @@ int checkboard (void)
        return 0;
 }
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        int size, i;
 
index 55d0bc8..b11ff98 100644 (file)
@@ -76,7 +76,7 @@ static void sdram_start(int hi_addr)
  * use of CONFIG_SYS_SDRAM_BASE. The code does not work if
  * CONFIG_SYS_SDRAM_BASE is something else than 0x00000000.
  */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index 20d8b80..88d4942 100644 (file)
@@ -71,7 +71,7 @@ static void sdram_start (int hi_addr)
  *            is something else than 0x00000000.
  */
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
        uint svr, pvr;
index 9673118..841bcfa 100644 (file)
@@ -41,7 +41,7 @@ static void cram_bcr_write(u32 wr_val)
        return;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        int i;
        u32 val;
index 2838f9a..ae69f5a 100644 (file)
@@ -436,7 +436,7 @@ int checkboard(void)
 }
 
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        return spd_sdram();
 }
index 9043de6..e356717 100644 (file)
@@ -52,10 +52,10 @@ int checkboard(void)
 }
 
 /* -------------------------------------------------------------------------
-  initdram(int board_type) reads EEPROM via I2c. EEPROM contains all of
+  initdram() reads EEPROM via I2c. EEPROM contains all of
   the necessary info for SDRAM controller configuration
    ------------------------------------------------------------------------- */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return spd_sdram();
 }
index 67640d7..bb5c5ee 100644 (file)
@@ -31,7 +31,7 @@ extern void denali_core_search_data_eye(void);
  * initdram -- 440EPx's DDR controller is a DENALI Core
  *
  ************************************************************************/
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
 #if !defined(CONFIG_SYS_RAMBOOT)
        ulong speed = get_bus_freq(0);
index c948209..ca933d7 100644 (file)
@@ -71,10 +71,10 @@ int checkboard(void)
 }
 
 /*
- * initdram(int board_type) reads EEPROM via I2c. EEPROM contains all of
+ * initdram() reads EEPROM via I2c. EEPROM contains all of
  * the necessary info for SDRAM controller configuration
  */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return spd_sdram();
 }
index 56b5191..f61978c 100644 (file)
@@ -286,7 +286,7 @@ void sdram_tr1_set(int ram_address, int* tr1_value)
        *tr1_value = (first_good + last_bad) / 2;
 }
 
-phys_size_t initdram(int board)
+phys_size_t initdram(void)
 {
        register uint reg;
        int tr1_bank1, tr1_bank2;
index 7ec7cb3..70fcd61 100644 (file)
@@ -27,7 +27,7 @@ int checkboard(void)
        return 0;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
 #if !defined(CONFIG_MONITOR_IS_IN_RAM)
        sdram_t *sdp = (sdram_t *)(MMAP_SDRAM);
index 15c934d..ba9930d 100644 (file)
@@ -65,7 +65,7 @@ static void sdram_start (int hi_addr)
  *            is something else than 0x00000000.
  */
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index fce998d..2ac9fd9 100644 (file)
@@ -97,14 +97,14 @@ static mem_conf_t* get_mem_config(int board_type)
 /*
  * Initalize SDRAM - configure SDRAM controller, detect memory size.
  */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
 #ifndef CONFIG_SYS_RAMBOOT
        ulong test1, test2;
        mem_conf_t *mem_conf;
 
-       mem_conf = get_mem_config(board_type);
+       mem_conf = get_mem_config(gd->board_type);
 
        /* configure SDRAM start/end for detection */
        *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x0000001e; /* 2G at 0x0 */
index 0f3bcc5..9d4554d 100644 (file)
@@ -16,7 +16,7 @@ int checkboard (void)
        return 0;
 };
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        volatile sdramctrl_t *sdp = (sdramctrl_t *) (MMAP_SDRAM);
 
index 1b6c40f..709c65b 100644 (file)
@@ -18,7 +18,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        return fixed_sdram(NULL, NULL, 0);
 }
index 75e6f0e..cf2f880 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/mipsregs.h>
 #include <asm/io.h>
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        /* Sdram is setup by assembler code */
        /* If memory could be changed, we should return the true value here */
index 656f0fa..b8eb32b 100644 (file)
@@ -62,7 +62,7 @@ int board_early_init_f(void)
        return 0;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return get_ram_size(0, fixed_sdram(NULL, NULL, 0));
 }
index e7f8115..82ee289 100644 (file)
@@ -105,7 +105,7 @@ int initdram_by_rb(int rows, int banks)
        return 0;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t size;
        int n;
index f8f1834..bf6ee7a 100644 (file)
@@ -28,7 +28,7 @@
 
 void ddr_enable_ecc(unsigned int dram_size);
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize = 0;
index 99cd884..d070104 100644 (file)
@@ -176,7 +176,7 @@ found:
        popts->cpo_sample = 0x3e;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 35b812c..17e2ba8 100644 (file)
@@ -108,7 +108,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        puts("\n\n");
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
 #ifdef CONFIG_SPL_NAND_BOOT
        nand_boot();
index 6613216..785c859 100644 (file)
@@ -67,7 +67,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("TPL\n");
index 9c1a4c2..75de247 100644 (file)
@@ -260,7 +260,7 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 2f66ba9..99a4984 100644 (file)
@@ -164,7 +164,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 79078d2..57314e2 100644 (file)
@@ -162,7 +162,7 @@ int dram_init(void)
         * before accessing DDR SPD.
         */
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
        return 0;
 }
index c740062..817c91a 100644 (file)
@@ -108,7 +108,7 @@ found:
 #endif
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 6507c09..755aef3 100644 (file)
@@ -153,7 +153,7 @@ int dram_init(void)
         * before accessing DDR SPD.
         */
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 #if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
        /* This will break-before-make MMU for DDR */
        update_early_mmu_table();
index f90b85d..b5c5b2e 100644 (file)
@@ -170,7 +170,7 @@ int fsl_ddr_get_dimm_params(dimm_params_t *pdimm,
 }
 #endif
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index dc4d689..6a5cbbf 100644 (file)
@@ -92,7 +92,7 @@ found:
        popts->cpo_sample = 0x70;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index af3f70a..f30dd23 100644 (file)
@@ -149,7 +149,7 @@ int dram_init(void)
         * before accessing DDR SPD.
         */
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 #if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
        /* This will break-before-make MMU for DDR */
        update_early_mmu_table();
index efe2ba6..1e99538 100644 (file)
@@ -96,7 +96,7 @@ found:
        popts->cpo_sample = 0x70;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 5ed9e14..0bff922 100644 (file)
@@ -158,7 +158,7 @@ int fsl_ddr_get_dimm_params(dimm_params_t *pdimm,
        return 0;
 }
 #endif
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 0408c0f..bd32c54 100644 (file)
@@ -155,7 +155,7 @@ found:
        }
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 2851d5b..b00e575 100644 (file)
@@ -158,7 +158,7 @@ found:
        }
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 1df128b..6122750 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        u32 dramsize, i;
index a1127e5..571e1a6 100644 (file)
@@ -21,7 +21,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        u32 dramsize;
 
index 68c1631..7aa0edf 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        gpio_t *gpio = (gpio_t *)(MMAP_GPIO);
index 7ae842c..b854429 100644 (file)
@@ -29,7 +29,8 @@ int checkboard (void) {
 };
 
 
-phys_size_t initdram (int board_type) {
+phys_size_t initdram(void)
+{
        unsigned long   junk = 0xa5a59696;
 
        /*
index 7e516bf..fef2ca6 100644 (file)
@@ -20,7 +20,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        u32 dramsize = 0;
 
index 15ff755..3f4cdfb 100644 (file)
@@ -19,7 +19,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        /*
         * Check to see if the SDRAM has already been initialized
index 3ed4a7d..9fab24e 100644 (file)
@@ -18,7 +18,8 @@ int checkboard (void) {
        return 0;
        };
 
-phys_size_t initdram (int board_type) {
+phys_size_t initdram(void)
+{
        sdramctrl_t * sdp = (sdramctrl_t *)(MMAP_SDRAM);
 
        out_be16(&sdp->sdram_sdtr, 0xf539);
index 16083d1..00ce582 100644 (file)
@@ -23,7 +23,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        sdramctrl_t *sdp = (sdramctrl_t *)(MMAP_SDRAM);
        gpio_t *gpio_reg = (gpio_t *)(MMAP_GPIO);
index 39f12fb..19e5695 100644 (file)
@@ -16,7 +16,7 @@ int checkboard (void)
        return 0;
 }
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        u32 dramsize, i, dramclk;
 
index dbe886b..821e663 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        u32 dramsize, i;
index 1f77adf..c4613a4 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        u32 dramsize, i;
index bfcc4b2..f1ddee1 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
        u32 dramsize, i;
index 5375d16..c3bee18 100644 (file)
@@ -25,7 +25,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        u32 dramsize;
 
index d2ad42c..a4d11b6 100644 (file)
@@ -26,7 +26,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        u32 dramsize;
 #ifdef CONFIG_CF_SBF
index 76b4322..3bdcc33 100644 (file)
@@ -22,7 +22,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        u32 dramsize;
 #ifdef CONFIG_CF_SBF
index 1e3cb61..e84a5ac 100644 (file)
@@ -23,7 +23,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        siu_t *siu = (siu_t *) (MMAP_SIU);
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
index 0536155..06f9a5e 100644 (file)
@@ -23,7 +23,7 @@ int checkboard(void)
        return 0;
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        siu_t *siu = (siu_t *) (MMAP_SIU);
        sdram_t *sdram = (sdram_t *)(MMAP_SDRAM);
index 7c44282..e134091 100644 (file)
@@ -95,7 +95,7 @@ int is_micron(void){
        return(ismicron);
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        u32 msize = 0;
        /*
index 89b665e..ed1e84e 100644 (file)
@@ -65,7 +65,7 @@ static long fixed_sdram(void)
        return get_ram_size(CONFIG_SYS_DDR_SDRAM_BASE, msize);
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize;
index 693dff6..e3a5941 100644 (file)
@@ -134,7 +134,7 @@ void board_init_f(ulong bootflag)
                     CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
        puts("NAND boot... ");
        timer_init();
-       initdram(0);
+       initdram();
        relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC_SP, (gd_t *)gd,
                      CONFIG_SYS_NAND_U_BOOT_RELOC);
 }
index 6282c3d..ce6fce5 100644 (file)
@@ -97,7 +97,7 @@ static long fixed_sdram(void)
        return msize;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile fsl_lbc_t *lbc = &im->im_lbc;
index 1da6e21..7779b6d 100644 (file)
@@ -222,7 +222,7 @@ void board_init_f(ulong bootflag)
                     CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
        puts("NAND boot... ");
        timer_init();
-       initdram(0);
+       initdram();
        relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC + 0x10000, (gd_t *)gd,
                      CONFIG_SYS_NAND_U_BOOT_RELOC);
 }
index 6c94312..fd8968c 100644 (file)
@@ -92,7 +92,7 @@ static long fixed_sdram(void)
 }
 #endif /* CONFIG_SYS_RAMBOOT */
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        u32 msize;
index 0a0152a..f9f9a41 100644 (file)
@@ -68,7 +68,7 @@ const qe_iop_conf_t qe_iop_conf_tab[] = {
 
 int fixed_sdram(void);
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index adf4254..d66ad33 100644 (file)
@@ -88,7 +88,7 @@ int board_early_init_r(void)
 
 int fixed_sdram(void);
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index 02b5040..3bcfe03 100644 (file)
@@ -46,7 +46,7 @@ int board_early_init_f (void)
 
 #define ns2clk(ns) (ns / (1000000000 / CONFIG_8349_CLKIN) + 1)
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        phys_size_t msize = 0;
index 22a1d99..01eac02 100644 (file)
@@ -116,7 +116,7 @@ volatile static struct pci_controller hose[] = {
 };
 #endif                         /* CONFIG_PCI */
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index 045841d..0463940 100644 (file)
@@ -216,7 +216,7 @@ extern void ddr_enable_ecc(unsigned int dram_size);
 #endif
 int fixed_sdram(void);
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index 07c0599..d817785 100644 (file)
@@ -60,7 +60,7 @@ void ddr_enable_ecc(unsigned int dram_size);
 #endif
 int fixed_sdram(void);
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
index 95e398c..7668226 100644 (file)
@@ -116,8 +116,7 @@ int checkboard(void)
 }
 
 
-phys_size_t
-initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size = 0;
 
index 94633b5..1076442 100644 (file)
@@ -37,8 +37,7 @@ int checkboard(void)
        return 0;
 }
 
-phys_size_t
-initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size = 0;
 
index 05c76f2..05da1da 100644 (file)
@@ -94,7 +94,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("\nTertiary program loader running in sram...");
 #else
index ef38551..77ed257 100644 (file)
@@ -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
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("Tertiary program loader running in sram...");
 #else
index 2af5576..3357702 100644 (file)
@@ -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
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("Tertiary program loader running in sram...");
 #else
index b2493e1..b07bd98 100644 (file)
@@ -116,7 +116,7 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size = 0;
 
index b6b1191..507929b 100644 (file)
@@ -169,7 +169,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 3e96b33..a1481e9 100644 (file)
@@ -142,7 +142,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index e666578..56f98ac 100644 (file)
@@ -229,7 +229,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index b70c2c5..f70a337 100644 (file)
@@ -129,7 +129,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index cb58d1e..a5d3e54 100644 (file)
@@ -117,7 +117,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 302f19b..4a09cae 100644 (file)
@@ -120,7 +120,7 @@ void board_mem_sleep_setup(void)
 }
 #endif
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 4402e0f..076641c 100644 (file)
@@ -125,7 +125,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        puts("\n\n");
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index d6e4554..044ac18 100644 (file)
@@ -104,7 +104,7 @@ found:
        popts->cpo_sample = 0x64;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 334f508..caa4de3 100644 (file)
@@ -128,7 +128,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index 3487261..bcb536a 100644 (file)
@@ -97,7 +97,7 @@ found:
        popts->cpo_sample = 0x54;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index aa8e928..44be70b 100644 (file)
@@ -98,7 +98,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index 842073b..24b1872 100644 (file)
@@ -112,7 +112,7 @@ found:
        popts->cpo_sample = 0x63;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 5e946dc..bda0003 100644 (file)
@@ -133,7 +133,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
 #ifdef CONFIG_SPL_MMC_BOOT
        mmc_boot();
index 7b05821..8596ccd 100644 (file)
@@ -105,7 +105,7 @@ found:
        popts->cpo_sample = 0x64;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index a32e34e..d3a86e6 100644 (file)
@@ -91,7 +91,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        i2c_init_all();
 
-       gd->ram_size = initdram(0);
+       gd->ram_size = initdram();
 
        mmc_boot();
 }
index d26212e..ecdc7e7 100644 (file)
@@ -10,7 +10,7 @@
 #include <config.h>
 #include <asm/leon.h>
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return 1;
 }
index 98fb45f..66fe5a5 100644 (file)
@@ -10,7 +10,7 @@
 #include <config.h>
 #include <asm/leon.h>
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return 1;
 }
index 32fbbe2..1725459 100644 (file)
@@ -9,7 +9,7 @@
 #include <config.h>
 #include <asm/leon.h>
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return 1;
 }
index fd73920..fa09737 100644 (file)
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <asm/leon.h>
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return 1;
 }
index 882b0a4..12df6bd 100644 (file)
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <asm/leon.h>
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return 1;
 }
index 0fce8cf..b7b31fb 100644 (file)
@@ -66,7 +66,7 @@ static long fixed_sdram(void)
        return get_ram_size(CONFIG_SYS_DDR_SDRAM_BASE, msize);
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize;
index e7838dc..b40e4b3 100644 (file)
@@ -119,7 +119,7 @@ static int setup_sdram(void)
        return msize;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        fsl_lbc_t *lbc = &im->im_lbc;
index 75bf1bb..b107dd1 100644 (file)
@@ -310,7 +310,7 @@ u32 sdram_init_seq[] = {
        /* EMPTY, optional, we don't do it */
 };
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return fixed_sdram(NULL, sdram_init_seq, ARRAY_SIZE(sdram_init_seq));
 }
index 4fc6809..7452d2b 100644 (file)
@@ -66,7 +66,7 @@ static void sdram_start(int hi_addr)
  *            use of CONFIG_SYS_SDRAM_BASE. The code does not work if
  *            CONFIG_SYS_SDRAM_BASE is something else than 0x00000000.
  */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        struct mpc5xxx_mmap_ctl *mmap_ctl =
                (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR;
index ceffef6..c841bf0 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "boston-regs.h"
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        u32 ddrconf0 = __raw_readl((uint32_t *)BOSTON_PLAT_DDRCONF0);
 
index 4955043..c269d0a 100644 (file)
@@ -83,7 +83,7 @@ static enum sys_con malta_sys_con(void)
        }
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return CONFIG_SYS_MEM_SIZE;
 }
index 77a1952..dc0a088 100644 (file)
@@ -12,7 +12,7 @@
 #include <common.h>
 
 /* initialize the DDR Controller and PHY */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        /* MIG IP block is smart and doesn't need SW
         * to do any init */
index 0a32f0e..47c3955 100644 (file)
@@ -77,7 +77,7 @@ static void sdram_start (int hi_addr)
  *           is something else than 0x00000000.
  */
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        volatile struct mpc5xxx_mmap_ctl *mm =
                (struct mpc5xxx_mmap_ctl *) CONFIG_SYS_MBAR;
index 05d673d..9bada94 100644 (file)
@@ -79,7 +79,7 @@ static void sdram_start(int hi_addr)
  *            CONFIG_SYS_SDRAM_BASE is something other than 0x00000000.
  */
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index 2e62355..ab94c65 100644 (file)
@@ -80,7 +80,7 @@ static void sdram_start (int hi_addr)
  *           CONFIG_SYS_SDRAM_BASE is something else than 0x00000000.
  */
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        struct mpc5xxx_mmap_ctl *mmap_ctl =
                (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR;
index d56902b..ae569d0 100644 (file)
@@ -76,7 +76,7 @@ static void sdram_start (int hi_addr)
  *            is something else than 0x00000000.
  */
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index c2a7a5f..12fd05d 100644 (file)
@@ -289,7 +289,7 @@ static long probe_sdram(memctl8260_t *memctl)
 #endif /* CONFIG_SYS_SDRAM_LIST */
 
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
        memctl8260_t *memctl = &immap->im_memctl;
index 154f974..111a8a7 100644 (file)
@@ -328,7 +328,7 @@ static int fixed_sdram(void)
        return msize;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize = 0;
index 77af184..98fb1ad 100644 (file)
@@ -48,7 +48,7 @@ void fsl_ddr_board_options(memctl_options_t *popts,
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR_ODT_75ohm;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size = 0;
 
index bcb3449..1932e06 100644 (file)
@@ -145,7 +145,7 @@ static void program_ecc(u32 start_address,
  * initdram -- 440EPx's DDR controller is a DENALI Core
  *
  ************************************************************************/
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        /* CL=4 */
        mtsdram(DDR0_02, 0x00000000);
index 0745cee..f4a6521 100644 (file)
@@ -59,7 +59,7 @@ void _machine_restart(void)
  * SDRAM is already configured by the bootstrap code, only return the
  * auto-detected size here
  */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
                            CONFIG_SYS_MBYTES_SDRAM << 20);
index 7fa81b8..3e2fe65 100644 (file)
@@ -116,7 +116,7 @@ static void sdram_start(int hi_addr)
 /*
  * Initalize SDRAM - configure SDRAM controller, detect memory size.
  */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
 #ifndef CONFIG_SYS_RAMBOOT
index da36f63..96d60c9 100644 (file)
@@ -61,7 +61,7 @@ static long fixed_sdram(void)
        return get_ram_size(CONFIG_SYS_DDR_SDRAM_BASE, msize);
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize;
index 8b9892b..e2961d1 100644 (file)
@@ -615,14 +615,14 @@ int checkboard (void)
 /* ------------------------------------------------------------------------- */
 /* ------------------------------------------------------------------------- */
 /*
-  initdram(int board_type) reads EEPROM via I2c. EEPROM contains all of
+  initdram() reads EEPROM via I2c. EEPROM contains all of
   the necessary info for SDRAM controller configuration
 */
 /* ------------------------------------------------------------------------- */
 /* ------------------------------------------------------------------------- */
 static int test_dram (unsigned long ramsize);
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
 
        unsigned long bank_reg[4], tmp, bank_size;
index ddc2108..951010a 100644 (file)
@@ -133,7 +133,7 @@ extern int mem_test (unsigned long start, unsigned long ramsize, int quiet);
 /*
  * Get RAM size.
  */
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        unsigned char board_rev;
        unsigned long reg;
index 1bd2fbf..07b30ed 100644 (file)
@@ -605,14 +605,14 @@ int checkboard (void)
 /* ------------------------------------------------------------------------- */
 /* ------------------------------------------------------------------------- */
 /*
-  initdram(int board_type) reads EEPROM via I2c. EEPROM contains all of
+  initdram() reads EEPROM via I2c. EEPROM contains all of
   the necessary info for SDRAM controller configuration
 */
 /* ------------------------------------------------------------------------- */
 /* ------------------------------------------------------------------------- */
 static int test_dram (unsigned long ramsize);
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        unsigned long bank_reg[4], tmp, bank_size;
        int i, ds;
index 8f292ea..b88160c 100644 (file)
@@ -58,7 +58,7 @@ static void sdram_start (int hi_addr)
  *            is something else than 0x00000000.
  */
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index eb92914..baa5723 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/mipsregs.h>
 #include <asm/io.h>
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        /* Sdram is setup by assembler code */
        /* If memory could be changed, we should return the true value here */
index d91d427..ef19daf 100644 (file)
@@ -48,7 +48,7 @@ sdram_conf_t mddrc_config[] = {
        },
 };
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        int i;
        u32 msize = 0;
index 8a9de0d..470bd70 100644 (file)
@@ -73,7 +73,7 @@ static void sdram_start(int hi_addr)
  *     is something else than 0x00000000.
  */
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        volatile struct mpc5xxx_mmap_ctl *mm =
                (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR;
index 563044e..3cdc91c 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/io.h>
 #include <netdev.h>
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        /* Sdram is setup by assembler code */
        /* If memory could be changed, we should return the true value here */
index 72786d2..b20de4c 100644 (file)
@@ -35,7 +35,7 @@ int board_early_init_f (void)
 
 #define ns2clk(ns) (ns / (1000000000 / CONFIG_8349_CLKIN) + 1)
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
        u32 msize = 0;
index 6bdf1a2..a541d25 100644 (file)
@@ -37,7 +37,7 @@ int checkboard (void)
        return 0;
 }
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        long dram_size = 0;
 
index 77b5000..b7f6380 100644 (file)
@@ -49,7 +49,7 @@ void fudelay(int usec)
                asm volatile ("nop");
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        u32 dramsize, RC;
 
index fef9d2b..1e843d5 100644 (file)
@@ -133,7 +133,7 @@ static void sdram_start (int hi_addr)
  *           is something else than 0x00000000.
  */
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index eca218c..a05ae2a 100644 (file)
@@ -66,7 +66,7 @@ int board_early_init_r (void) {
 /**************************************************************************
  * DRAM initalization and size detection
  */
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        long bank_size;
        long size;
index 6d17830..9935730 100644 (file)
@@ -126,13 +126,14 @@ int checkboard (void)
 
 /* ------------------------------------------------------------------------- */
 
-phys_size_t initdram (int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
        volatile memctl8xx_t *memctl = &immap->im_memctl;
        long int size8, size9, size10;
        long int size_b0 = 0;
        long int size_b1 = 0;
+       int board_type = gd->board_type;
 
        upmconfig (UPMA, (uint *) sdram_table,
                           sizeof (sdram_table) / sizeof (uint));
index a337729..20490a3 100644 (file)
@@ -56,7 +56,7 @@ static void sdram_start(int hi_addr)
 #endif /* !CONFIG_SYS_RAMBOOT */
 
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        ulong dramsize = 0;
        ulong dramsize2 = 0;
index bb1d29a..da6f5ad 100644 (file)
@@ -168,7 +168,7 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size;
 
index 7f24a30..5349a58 100644 (file)
@@ -88,7 +88,7 @@ static long fixed_sdram(void)
        return msize;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile fsl_lbc_t *lbc = &im->im_lbc;
index 3b8a668..ff64483 100644 (file)
@@ -116,7 +116,7 @@ int checkboard(void)
        return 0;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return spd_sdram();
 }
index 0028870..9ec99a1 100644 (file)
@@ -56,7 +56,7 @@ int board_early_init_r(void)
        return 0;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        phys_size_t dram_size = fsl_ddr_sdram();
 
index 3729f07..dfdd3f2 100644 (file)
@@ -21,7 +21,7 @@ int checkboard(void)
        return 0;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return get_ram_size(XPAR_DDR2_SDRAM_MEM_BASEADDR,
                            CONFIG_SYS_SDRAM_SIZE_MB * 1024 * 1024);
index d823352..67fd668 100644 (file)
@@ -17,7 +17,7 @@ int checkboard(void)
        return 0;
 }
 
-phys_size_t initdram(int board_type)
+phys_size_t initdram(void)
 {
        return get_ram_size(XPAR_DDR2_SDRAM_MEM_BASEADDR,
                            CONFIG_SYS_SDRAM_SIZE_MB * 1024 * 1024);
index e98f319..106fd34 100644 (file)
@@ -180,13 +180,7 @@ static int announce_dram_init(void)
 #if defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_M68K)
 static int init_func_ram(void)
 {
-#ifdef CONFIG_BOARD_TYPES
-       int board_type = gd->board_type;
-#else
-       int board_type = 0;     /* use dummy arg */
-#endif
-
-       gd->ram_size = initdram(board_type);
+       gd->ram_size = initdram();
 
        if (gd->ram_size > 0)
                return 0;
index 5b356dd..1a77c98 100644 (file)
@@ -110,6 +110,12 @@ typedef struct global_data {
 } gd_t;
 #endif
 
+#ifdef CONFIG_BOARD_TYPES
+#define gd_board_type()                gd->board_type
+#else
+#define gd_board_type()                0
+#endif
+
 /*
  * Global Data Flags - the top 16 bits are reserved for arch-specific flags
  */
index 35e2b15..bbdb943 100644 (file)
@@ -209,7 +209,7 @@ int timer_init(void);
 int    cpu_init(void);
 
 /* */
-phys_size_t initdram (int);
+phys_size_t initdram(void);
 
 #include <display_options.h>