From 9973e3c614721bbf169882ffc3be266a6611cd60 Mon Sep 17 00:00:00 2001 From: Becky Bruce Date: Mon, 9 Jun 2008 16:03:40 -0500 Subject: Change initdram() return type to phys_size_t This patch changes the return type of initdram() from long int to phys_size_t. This is required for a couple of reasons: long int limits the amount of dram to 2GB, and u-boot in general is moving over to phys_size_t to represent the size of physical memory. phys_size_t is defined as an unsigned long on almost all current platforms. This patch *only* changes the return type of the initdram function (in include/common.h, as well as in each board's implementation of initdram). It does not actually modify the code inside the function on any of the platforms; platforms which wish to support more than 2GB of DRAM will need to modify their initdram() function code. Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc MPC8641HPCN. Signed-off-by: Becky Bruce --- board/esd/adciop/adciop.c | 2 +- board/esd/apc405/apc405.c | 2 +- board/esd/ash405/ash405.c | 2 +- board/esd/cms700/cms700.c | 2 +- board/esd/cpci2dp/cpci2dp.c | 2 +- board/esd/cpci405/cpci405.c | 2 +- board/esd/cpci5200/cpci5200.c | 2 +- board/esd/cpci750/sdram_init.c | 2 +- board/esd/cpciiser4/cpciiser4.c | 2 +- board/esd/dasa_sim/dasa_sim.c | 2 +- board/esd/dp405/dp405.c | 2 +- board/esd/du405/du405.c | 2 +- board/esd/hh405/hh405.c | 2 +- board/esd/hub405/hub405.c | 2 +- board/esd/mecp5200/mecp5200.c | 2 +- board/esd/ocrtc/ocrtc.c | 2 +- board/esd/pci405/pci405.c | 2 +- board/esd/pf5200/pf5200.c | 2 +- board/esd/plu405/plu405.c | 2 +- board/esd/pmc405/pmc405.c | 2 +- board/esd/pmc440/sdram.c | 2 +- board/esd/tasreg/tasreg.c | 2 +- board/esd/voh405/voh405.c | 2 +- board/esd/vom405/vom405.c | 2 +- board/esd/wuh405/wuh405.c | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) (limited to 'board/esd') diff --git a/board/esd/adciop/adciop.c b/board/esd/adciop/adciop.c index 7a11a12cef..0f655b78a5 100644 --- a/board/esd/adciop/adciop.c +++ b/board/esd/adciop/adciop.c @@ -79,7 +79,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { return (16 * 1024 * 1024); } diff --git a/board/esd/apc405/apc405.c b/board/esd/apc405/apc405.c index 2cb743ef49..83657c8d5d 100644 --- a/board/esd/apc405/apc405.c +++ b/board/esd/apc405/apc405.c @@ -423,7 +423,7 @@ int checkboard (void) return 0; } -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/ash405/ash405.c b/board/esd/ash405/ash405.c index 8a5b03bced..25360a6565 100644 --- a/board/esd/ash405/ash405.c +++ b/board/esd/ash405/ash405.c @@ -207,7 +207,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/cms700/cms700.c b/board/esd/cms700/cms700.c index 3d4f2371d9..ba27c030b7 100644 --- a/board/esd/cms700/cms700.c +++ b/board/esd/cms700/cms700.c @@ -141,7 +141,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/cpci2dp/cpci2dp.c b/board/esd/cpci2dp/cpci2dp.c index 36bf329f81..54de0b8062 100644 --- a/board/esd/cpci2dp/cpci2dp.c +++ b/board/esd/cpci2dp/cpci2dp.c @@ -117,7 +117,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index 69cb8cef56..b856705ff9 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -495,7 +495,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/cpci5200/cpci5200.c b/board/esd/cpci5200/cpci5200.c index adb8597e1c..20130acfe8 100644 --- a/board/esd/cpci5200/cpci5200.c +++ b/board/esd/cpci5200/cpci5200.c @@ -84,7 +84,7 @@ static void sdram_start(int hi_addr) * is something else than 0x00000000. */ -long int initdram(int board_type) +phys_size_t initdram(int board_type) { ulong dramsize = 0; ulong test1, test2; diff --git a/board/esd/cpci750/sdram_init.c b/board/esd/cpci750/sdram_init.c index f43e83f491..a479f0f5f8 100644 --- a/board/esd/cpci750/sdram_init.c +++ b/board/esd/cpci750/sdram_init.c @@ -1602,7 +1602,7 @@ dram_size(long int *base, long int maxsize) /* ppcboot interface function to SDRAM init - this is where all the * controlling logic happens */ -long int +phys_size_t initdram(int board_type) { int s0 = 0, s1 = 0; diff --git a/board/esd/cpciiser4/cpciiser4.c b/board/esd/cpciiser4/cpciiser4.c index fcb8cbbe73..204117edf5 100644 --- a/board/esd/cpciiser4/cpciiser4.c +++ b/board/esd/cpciiser4/cpciiser4.c @@ -186,7 +186,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { return (16 * 1024 * 1024); } diff --git a/board/esd/dasa_sim/dasa_sim.c b/board/esd/dasa_sim/dasa_sim.c index 2f8ab1a478..fb0c77e566 100644 --- a/board/esd/dasa_sim/dasa_sim.c +++ b/board/esd/dasa_sim/dasa_sim.c @@ -206,7 +206,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { return (16 * 1024 * 1024); } diff --git a/board/esd/dp405/dp405.c b/board/esd/dp405/dp405.c index 240ab78aa7..bb3baa477e 100644 --- a/board/esd/dp405/dp405.c +++ b/board/esd/dp405/dp405.c @@ -122,7 +122,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/du405/du405.c b/board/esd/du405/du405.c index 69432138d3..78ae4ba67b 100644 --- a/board/esd/du405/du405.c +++ b/board/esd/du405/du405.c @@ -200,7 +200,7 @@ int checkboard (void) } -long int initdram (int board_type) +phys_size_t initdram (int board_type) { return (16 * 1024 * 1024); } diff --git a/board/esd/hh405/hh405.c b/board/esd/hh405/hh405.c index 279d9214e2..802491a313 100644 --- a/board/esd/hh405/hh405.c +++ b/board/esd/hh405/hh405.c @@ -644,7 +644,7 @@ int checkboard (void) } -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/hub405/hub405.c b/board/esd/hub405/hub405.c index 25c8068fde..03b87c9dfc 100644 --- a/board/esd/hub405/hub405.c +++ b/board/esd/hub405/hub405.c @@ -229,7 +229,7 @@ int checkboard (void) } -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/mecp5200/mecp5200.c b/board/esd/mecp5200/mecp5200.c index ea49f264ab..6d776b7a63 100644 --- a/board/esd/mecp5200/mecp5200.c +++ b/board/esd/mecp5200/mecp5200.c @@ -84,7 +84,7 @@ static void sdram_start(int hi_addr) * is something else than 0x00000000. */ -long int initdram(int board_type) +phys_size_t initdram(int board_type) { ulong dramsize = 0; ulong test1, test2; diff --git a/board/esd/ocrtc/ocrtc.c b/board/esd/ocrtc/ocrtc.c index 261b8a54d0..7b0edd5958 100644 --- a/board/esd/ocrtc/ocrtc.c +++ b/board/esd/ocrtc/ocrtc.c @@ -101,7 +101,7 @@ int checkboard (void) } -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c index c4ab072009..f740d595be 100644 --- a/board/esd/pci405/pci405.c +++ b/board/esd/pci405/pci405.c @@ -358,7 +358,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/pf5200/pf5200.c b/board/esd/pf5200/pf5200.c index 48b80bfc5f..7970f8988f 100644 --- a/board/esd/pf5200/pf5200.c +++ b/board/esd/pf5200/pf5200.c @@ -84,7 +84,7 @@ static void sdram_start(int hi_addr) * is something else than 0x00000000. */ -long int initdram(int board_type) +phys_size_t initdram(int board_type) { ulong dramsize = 0; ulong test1, test2; diff --git a/board/esd/plu405/plu405.c b/board/esd/plu405/plu405.c index 57762b54ee..fc71e9a2a1 100644 --- a/board/esd/plu405/plu405.c +++ b/board/esd/plu405/plu405.c @@ -232,7 +232,7 @@ int checkboard (void) } -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/pmc405/pmc405.c b/board/esd/pmc405/pmc405.c index 7499671aaf..326d560352 100644 --- a/board/esd/pmc405/pmc405.c +++ b/board/esd/pmc405/pmc405.c @@ -157,7 +157,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/pmc440/sdram.c b/board/esd/pmc440/sdram.c index 624c45791f..c7294c9945 100644 --- a/board/esd/pmc440/sdram.c +++ b/board/esd/pmc440/sdram.c @@ -50,7 +50,7 @@ extern void denali_core_search_data_eye(void); * initdram -- 440EPx's DDR controller is a DENALI Core * ************************************************************************/ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { #if !defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL) #if !defined(CONFIG_NAND_SPL) diff --git a/board/esd/tasreg/tasreg.c b/board/esd/tasreg/tasreg.c index 16724005b7..fabb7464fd 100644 --- a/board/esd/tasreg/tasreg.c +++ b/board/esd/tasreg/tasreg.c @@ -77,7 +77,7 @@ int checkboard (void) { }; -long int initdram (int board_type) { +phys_size_t initdram (int board_type) { unsigned long junk = 0xa5a59696; /* diff --git a/board/esd/voh405/voh405.c b/board/esd/voh405/voh405.c index 87a584979b..52534220a7 100644 --- a/board/esd/voh405/voh405.c +++ b/board/esd/voh405/voh405.c @@ -305,7 +305,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/vom405/vom405.c b/board/esd/vom405/vom405.c index 8be552e2ea..af8efcff3e 100644 --- a/board/esd/vom405/vom405.c +++ b/board/esd/vom405/vom405.c @@ -129,7 +129,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; diff --git a/board/esd/wuh405/wuh405.c b/board/esd/wuh405/wuh405.c index dba3ce8884..0590fc78f8 100644 --- a/board/esd/wuh405/wuh405.c +++ b/board/esd/wuh405/wuh405.c @@ -205,7 +205,7 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -long int initdram (int board_type) +phys_size_t initdram (int board_type) { unsigned long val; -- cgit v1.2.1