]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Change bd/gd memsize/ram_size to be phys_size_t.
authorBecky Bruce <becky.bruce@freescale.com>
Tue, 10 Jun 2008 01:37:16 +0000 (20:37 -0500)
committerWolfgang Denk <wd@denx.de>
Wed, 11 Jun 2008 22:54:53 +0000 (00:54 +0200)
Currently, both are defined as an unsigned long, but
should be phys_size_t. This should result in no real change,
since phys_size_t is currently an unsigned long for all the
default configs.  Also add print_lnum to cmd_bdinfo to deal
with the potentially wider memsize.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
22 files changed:
board/trab/memory.c
common/cmd_bdinfo.c
include/asm-arm/global_data.h
include/asm-blackfin/global_data.h
include/asm-blackfin/u-boot.h
include/asm-i386/global_data.h
include/asm-i386/u-boot.h
include/asm-m68k/global_data.h
include/asm-m68k/u-boot.h
include/asm-microblaze/u-boot.h
include/asm-mips/global_data.h
include/asm-mips/u-boot.h
include/asm-nios/global_data.h
include/asm-nios/u-boot.h
include/asm-nios2/global_data.h
include/asm-nios2/u-boot.h
include/asm-ppc/global_data.h
include/asm-ppc/u-boot.h
include/asm-sh/global_data.h
include/asm-sh/u-boot.h
include/asm-sparc/global_data.h
include/asm-sparc/u-boot.h

index 8614be7badaf411e6e4d22765346c5e22b9b73df..052432e9d90bba03c874f4cafa6a3a18f2256c48 100644 (file)
@@ -460,7 +460,7 @@ int memory_post_test (int flags)
 {
        int ret = 0;
        bd_t *bd = gd->bd;
-       unsigned long memsize = (bd->bi_memsize >= 256 << 20 ?
+       phys_size_t memsize = (bd->bi_memsize >= 256 << 20 ?
                                 256 << 20 : bd->bi_memsize) - (1 << 20);
 
 
index 731c1d255d61d4691391045eea401d189438c94f..5bb39d8db98dc0145d362e039833aa659cf0888a 100644 (file)
@@ -33,6 +33,7 @@ DECLARE_GLOBAL_DATA_PTR;
 static void print_num(const char *, ulong);
 
 #ifndef CONFIG_ARM     /* PowerPC and other */
+static void print_lnum(const char *, u64);
 
 #ifdef CONFIG_PPC
 static void print_str(const char *, const char *);
@@ -47,7 +48,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        print_num ("bd address",    (ulong)bd           );
 #endif
        print_num ("memstart",      bd->bi_memstart     );
-       print_num ("memsize",       bd->bi_memsize      );
+       print_lnum ("memsize",      bd->bi_memsize      );
        print_num ("flashstart",    bd->bi_flashstart   );
        print_num ("flashsize",     bd->bi_flashsize    );
        print_num ("flashoffset",   bd->bi_flashoffset  );
@@ -132,7 +133,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        bd_t *bd = gd->bd;
 
        print_num ("memstart",          (ulong)bd->bi_memstart);
-       print_num ("memsize",           (ulong)bd->bi_memsize);
+       print_lnum ("memsize",          (u64)bd->bi_memsize);
        print_num ("flashstart",        (ulong)bd->bi_flashstart);
        print_num ("flashsize",         (ulong)bd->bi_flashsize);
        print_num ("flashoffset",       (ulong)bd->bi_flashoffset);
@@ -158,7 +159,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        bd_t *bd = gd->bd;
 
        print_num ("mem start",         (ulong)bd->bi_memstart);
-       print_num ("mem size",          (ulong)bd->bi_memsize);
+       print_lnum ("mem size",         (u64)bd->bi_memsize);
        print_num ("flash start",       (ulong)bd->bi_flashstart);
        print_num ("flash size",        (ulong)bd->bi_flashsize);
        print_num ("flash offset",      (ulong)bd->bi_flashoffset);
@@ -188,7 +189,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int i;
        bd_t *bd = gd->bd;
        print_num ("mem start      ",   (ulong)bd->bi_memstart);
-       print_num ("mem size       ",   (ulong)bd->bi_memsize);
+       print_lnum ("mem size       ",  (u64)bd->bi_memsize);
        print_num ("flash start    ",   (ulong)bd->bi_flashstart);
        print_num ("flash size     ",   (ulong)bd->bi_flashsize);
        print_num ("flash offset   ",   (ulong)bd->bi_flashoffset);
@@ -220,7 +221,7 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        print_num("bd address             ", (ulong) bd);
 #endif
        print_num("memstart               ", bd->bi_memstart);
-       print_num("memsize                ", bd->bi_memsize);
+       print_lnum("memsize                ", bd->bi_memsize);
        print_num("flashstart             ", bd->bi_flashstart);
        print_num("CFG_MONITOR_BASE       ", CFG_MONITOR_BASE);
        print_num("CFG_ENV_ADDR           ", CFG_ENV_ADDR);
@@ -257,7 +258,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        char buf[32];
 
        print_num ("memstart",          (ulong)bd->bi_memstart);
-       print_num ("memsize",           (ulong)bd->bi_memsize);
+       print_lnum ("memsize",          (u64)bd->bi_memsize);
        print_num ("flashstart",        (ulong)bd->bi_flashstart);
        print_num ("flashsize",         (ulong)bd->bi_flashsize);
        print_num ("flashoffset",       (ulong)bd->bi_flashoffset);
@@ -328,7 +329,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        print_num("boot_params", (ulong)bd->bi_boot_params);
        print_num("memstart",    (ulong)bd->bi_memstart);
-       print_num("memsize",     (ulong)bd->bi_memsize);
+       print_lnum("memsize",    (u64)bd->bi_memsize);
        print_num("flashstart",  (ulong)bd->bi_flashstart);
        print_num("flashsize",   (ulong)bd->bi_flashsize);
        print_num("flashoffset", (ulong)bd->bi_flashoffset);
@@ -352,7 +353,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        print_num ("boot_params",       (ulong)bd->bi_boot_params);
        print_num ("memstart",          (ulong)bd->bi_memstart);
-       print_num ("memsize",           (ulong)bd->bi_memsize);
+       print_lnum ("memsize",          (u64)bd->bi_memsize);
        print_num ("flashstart",        (ulong)bd->bi_flashstart);
        print_num ("flashsize",         (ulong)bd->bi_flashsize);
        print_num ("flashoffset",       (ulong)bd->bi_flashoffset);
@@ -408,6 +409,13 @@ static void print_num(const char *name, ulong value)
        printf ("%-12s= 0x%08lX\n", name, value);
 }
 
+#ifndef CONFIG_ARM
+static void print_lnum(const char *name, u64 value)
+{
+       printf ("%-12s= 0x%.8llX\n", name, value);
+}
+#endif
+
 #if defined(CONFIG_PPC) || defined(CONFIG_M68K)
 static void print_str(const char *name, const char *str)
 {
index 7564ff1469fdbdd3a19ffb5cbc31b7d01a894d4a..7e2a53adb00b692276e8c54db69405a819112fbf 100644 (file)
@@ -48,7 +48,7 @@ typedef       struct  global_data {
 #if 0
        unsigned long   cpu_clk;        /* CPU clock in Hz!             */
        unsigned long   bus_clk;
-       unsigned long   ram_size;       /* RAM size */
+       phys_size_t     ram_size;       /* RAM size */
        unsigned long   reset_status;   /* reset status register at boot */
 #endif
        void            **jt;           /* jump table */
index 4c8863962343225d22a480eb5018d326edbd991a..b0b01e485631b3531a3b43fb8badd7aec66d9ef4 100644 (file)
@@ -43,7 +43,7 @@ typedef struct global_data {
        unsigned long board_type;
        unsigned long baudrate;
        unsigned long have_console;     /* serial_init() was called */
-       unsigned long ram_size; /* RAM size */
+       phys_size_t ram_size;           /* RAM size */
        unsigned long reloc_off;        /* Relocation Offset */
        unsigned long env_addr; /* Address  of Environment struct */
        unsigned long env_valid;        /* Checksum of Environment valid? */
index 84f1553e0a898ca44309dffc954cf04d61b19693..9d2903be9a13d9c8a4c29e8f794a9b076c76d889 100644 (file)
@@ -34,7 +34,7 @@ typedef struct bd_info {
        unsigned char bi_enetaddr[6];   /* Ethernet adress */
        unsigned long bi_boot_params;   /* where this board expects params */
        unsigned long bi_memstart;      /* start of DRAM memory */
-       unsigned long bi_memsize;       /* size  of DRAM memory in bytes */
+       phys_size_t bi_memsize;         /* size  of DRAM memory in bytes */
        unsigned long bi_flashstart;    /* start of FLASH memory */
        unsigned long bi_flashsize;     /* size  of FLASH memory */
        unsigned long bi_flashoffset;   /* reserved area for startup monitor */
index 323506399549bf7614185167e9f4bc51095a6c40..5dfb5951091c761005f5d9ae00fcdc48f71083cc 100644 (file)
@@ -43,7 +43,7 @@ typedef       struct {
        unsigned long   env_valid;      /* Checksum of Environment valid? */
        unsigned long   cpu_clk;        /* CPU clock in Hz!             */
        unsigned long   bus_clk;
-       unsigned long   ram_size;       /* RAM size */
+       phys_size_t     ram_size;       /* RAM size */
        unsigned long   reset_status;   /* reset status register at boot */
        void            **jt;           /* jump table */
 } gd_t;
index 1e19f8f3d29a8eaf9605ea70ae50c8bffdc8cca9..fc5a2ae591207c15c058843a6f9146d9f0f32da1 100644 (file)
@@ -38,7 +38,7 @@
 
 typedef struct bd_info {
        unsigned long   bi_memstart;    /* start of DRAM memory */
-       unsigned long   bi_memsize;     /* size  of DRAM memory in bytes */
+       phys_size_t     bi_memsize;     /* size  of DRAM memory in bytes */
        unsigned long   bi_flashstart;  /* start of FLASH memory */
        unsigned long   bi_flashsize;   /* size  of FLASH memory */
        unsigned long   bi_flashoffset; /* reserved area for startup monitor */
index 7377d313db8a123d1c204e18c62f52ad00d311e0..10c6931534358f6e884939499d4bf9f8479cc4b7 100644 (file)
@@ -51,7 +51,7 @@ typedef       struct  global_data {
        unsigned long   i2c1_clk;
        unsigned long   i2c2_clk;
 #endif
-       unsigned long   ram_size;       /* RAM size */
+       phys_size_t     ram_size;       /* RAM size */
        unsigned long   reloc_off;      /* Relocation Offset */
        unsigned long   reset_status;   /* reset status register at boot        */
        unsigned long   env_addr;       /* Address  of Environment struct       */
index 93a6959ff1446e18bf065a7fc843c3d84ba0989f..5a0d5fe4877d05f00e42f4c23ae17e6518f128b2 100644 (file)
@@ -38,7 +38,7 @@
 
 typedef struct bd_info {
        unsigned long bi_memstart;      /* start of DRAM memory */
-       unsigned long bi_memsize;       /* size  of DRAM memory in bytes */
+       phys_size_t bi_memsize;         /* size  of DRAM memory in bytes */
        unsigned long bi_flashstart;    /* start of FLASH memory */
        unsigned long bi_flashsize;     /* size  of FLASH memory */
        unsigned long bi_flashoffset;   /* reserved area for startup monitor */
index e2035bd79c5d283cb336cdd05f00a158610e79db..9db491ec99d12194dfc828bcbd05e225f0223912 100644 (file)
@@ -34,7 +34,7 @@
 
 typedef struct bd_info {
        unsigned long   bi_memstart;    /* start of DRAM memory */
-       unsigned long   bi_memsize;     /* size  of DRAM memory in bytes */
+       phys_size_t     bi_memsize;     /* size  of DRAM memory in bytes */
        unsigned long   bi_flashstart;  /* start of FLASH memory */
        unsigned long   bi_flashsize;   /* size  of FLASH memory */
        unsigned long   bi_flashoffset; /* reserved area for startup monitor */
index 0c0ba50f425328b5e01a6b8ef21ae2e2888876bd..ecee6dea6af73e4173e10a439095138dd1ecdc41 100644 (file)
@@ -41,7 +41,7 @@ typedef       struct  global_data {
        unsigned long   flags;
        unsigned long   baudrate;
        unsigned long   have_console;   /* serial_init() was called */
-       unsigned long   ram_size;       /* RAM size */
+       phys_size_t     ram_size;       /* RAM size */
        unsigned long   reloc_off;      /* Relocation Offset */
        unsigned long   env_addr;       /* Address  of Environment struct */
        unsigned long   env_valid;      /* Checksum of Environment valid? */
index d1273a4535663f781d5b7780f81fe287c452c9d6..9ecb9ac3273ad48a926df101d8e01cf86f9054e7 100644 (file)
@@ -38,7 +38,7 @@ typedef struct bd_info {
        unsigned long   bi_arch_number; /* unique id for this board */
        unsigned long   bi_boot_params; /* where this board expects params */
        unsigned long   bi_memstart;    /* start of DRAM memory */
-       unsigned long   bi_memsize;     /* size  of DRAM memory in bytes */
+       phys_size_t     bi_memsize;     /* size  of DRAM memory in bytes */
        unsigned long   bi_flashstart;  /* start of FLASH memory */
        unsigned long   bi_flashsize;   /* size  of FLASH memory */
        unsigned long   bi_flashoffset; /* reserved area for startup monitor */
index a8cc9878932fab8440cd5c80000fc00f3c4f6bfa..a56f939df38af1992993c27ef02a7fcb58d77908 100644 (file)
@@ -30,7 +30,7 @@ typedef       struct  global_data {
        unsigned long   baudrate;
        unsigned long   cpu_clk;        /* CPU clock in Hz!             */
        unsigned long   have_console;   /* serial_init() was called */
-       unsigned long   ram_size;       /* RAM size */
+       phys_size_t     ram_size;       /* RAM size */
        unsigned long   reloc_off;      /* Relocation Offset */
        unsigned long   env_addr;       /* Address  of Environment struct */
        unsigned long   env_valid;      /* Checksum of Environment valid */
index aae4be13c463f89da84b535a244be6cd4889b393..3436185a8fc3500bc5ef54fbc58aea48f0f70c67 100644 (file)
@@ -34,7 +34,7 @@
 
 typedef struct bd_info {
        unsigned long   bi_memstart;    /* start of DRAM memory */
-       unsigned long   bi_memsize;     /* size  of DRAM memory in bytes */
+       phys_size_t     bi_memsize;     /* size  of DRAM memory in bytes */
        unsigned long   bi_flashstart;  /* start of FLASH memory */
        unsigned long   bi_flashsize;   /* size  of FLASH memory */
        unsigned long   bi_flashoffset; /* reserved area for startup monitor */
index 729048917bbd367a0f865ffd686f2740635fc817..cd17e0894fc06a954710a87409641614b9e397d6 100644 (file)
@@ -29,7 +29,7 @@ typedef       struct  global_data {
        unsigned long   baudrate;
        unsigned long   cpu_clk;        /* CPU clock in Hz!             */
        unsigned long   have_console;   /* serial_init() was called */
-       unsigned long   ram_size;       /* RAM size */
+       phys_size_t     ram_size;       /* RAM size */
        unsigned long   reloc_off;      /* Relocation Offset */
        unsigned long   env_addr;       /* Address  of Environment struct */
        unsigned long   env_valid;      /* Checksum of Environment valid */
index 3f299624ab2dc7e12ecccc19b33028ea6edc26eb..de8c4052f1e6f1d90a689c28409bc72b58812d7e 100644 (file)
@@ -33,7 +33,7 @@
 
 typedef struct bd_info {
        unsigned long   bi_memstart;    /* start of DRAM memory */
-       unsigned long   bi_memsize;     /* size  of DRAM memory in bytes */
+       phys_size_t     bi_memsize;     /* size  of DRAM memory in bytes */
        unsigned long   bi_flashstart;  /* start of FLASH memory */
        unsigned long   bi_flashsize;   /* size  of FLASH memory */
        unsigned long   bi_flashoffset; /* reserved area for startup monitor */
index 8cf7b6fb3d76d7f3e74bf0ac1caf16440671d649..c5ac6584acb4c942e1f57ab481a0726ad304fb6d 100644 (file)
@@ -116,7 +116,7 @@ typedef     struct  global_data {
        unsigned long   pev_clk;
        unsigned long   flb_clk;
 #endif
-       unsigned long   ram_size;       /* RAM size */
+       phys_size_t     ram_size;       /* RAM size */
        unsigned long   reloc_off;      /* Relocation Offset */
        unsigned long   reset_status;   /* reset status register at boot        */
        unsigned long   env_addr;       /* Address  of Environment struct       */
index 83af2f584e294b1fa37a89d63b2559196c73d132..54ac01d3620de1b30919c035eedc7a0cf0f6c44e 100644 (file)
@@ -38,7 +38,7 @@
 
 typedef struct bd_info {
        unsigned long   bi_memstart;    /* start of DRAM memory */
-       unsigned long   bi_memsize;     /* size  of DRAM memory in bytes */
+       phys_size_t     bi_memsize;     /* size  of DRAM memory in bytes */
        unsigned long   bi_flashstart;  /* start of FLASH memory */
        unsigned long   bi_flashsize;   /* size  of FLASH memory */
        unsigned long   bi_flashoffset; /* reserved area for startup monitor */
index 69af24a7708cc45ea7d80a27d75b397e3cd11b9b..d61421b68748fe6362dc027c0d7eedf15004c3da 100644 (file)
@@ -34,7 +34,7 @@ typedef       struct global_data
        unsigned long   baudrate;
        unsigned long   cpu_clk;        /* CPU clock in Hz! */
        unsigned long   have_console;   /* serial_init() was called */
-       unsigned long   ram_size;       /* RAM size */
+       phys_size_t     ram_size;       /* RAM size */
        unsigned long   reloc_off;      /* Relocation Offset */
        unsigned long   env_addr;       /* Address  of Environment struct */
        unsigned long   env_valid;      /* Checksum of Environment valid */
index b79644cfd28b8a27ee537acae9d0b33ee573fcfa..e89c1936ffdd71c82a3989a5952a348d714c8073 100644 (file)
@@ -27,7 +27,7 @@
 
 typedef struct bd_info {
        unsigned long   bi_memstart;    /* start of DRAM memory */
-       unsigned long   bi_memsize;     /* size  of DRAM memory in bytes */
+       phys_size_t     bi_memsize;     /* size  of DRAM memory in bytes */
        unsigned long   bi_flashstart;  /* start of FLASH memory */
        unsigned long   bi_flashsize;   /* size  of FLASH memory */
        unsigned long   bi_flashoffset; /* reserved area for startup monitor */
index de2c84b22b3bfd187f4c2744631b8fcdba47c1dd..a8d85f1b5c5920c7d428d1ba87243d7ca889804f 100644 (file)
@@ -46,7 +46,7 @@ typedef struct global_data {
        unsigned long cpu_clk;  /* CPU clock in Hz!             */
        unsigned long bus_clk;
 
-       unsigned long ram_size; /* RAM size */
+       phys_size_t ram_size;           /* RAM size */
        unsigned long reloc_off;        /* Relocation Offset */
        unsigned long reset_status;     /* reset status register at boot        */
        unsigned long env_addr; /* Address  of Environment struct       */
index 9c594e1f8cc987ca2a5eaa340d4d36aaaa83921e..c42e93cbef494c925e003205d46fcacecc9d3be0 100644 (file)
@@ -44,7 +44,7 @@
 
 typedef struct bd_info {
        unsigned long bi_memstart;      /* start of DRAM memory */
-       unsigned long bi_memsize;       /* size  of DRAM memory in bytes */
+       phys_size_t bi_memsize;         /* size  of DRAM memory in bytes */
        unsigned long bi_flashstart;    /* start of FLASH memory */
        unsigned long bi_flashsize;     /* size  of FLASH memory */
        unsigned long bi_flashoffset;   /* reserved area for startup monitor */