summaryrefslogtreecommitdiff
path: root/lib_mips/bootm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib_mips/bootm.c')
-rw-r--r--lib_mips/bootm.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib_mips/bootm.c b/lib_mips/bootm.c
index 8fe3782..5c46a5a 100644
--- a/lib_mips/bootm.c
+++ b/lib_mips/bootm.c
@@ -54,7 +54,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
char *commandline = getenv ("bootargs");
char env_buf[12];
int ret;
- const char *cp;
+ char *cp;
/* find kernel entry point */
if (images->legacy_hdr_valid) {
@@ -89,15 +89,11 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
linux_params_init (UNCACHED_SDRAM (gd->bd->bi_boot_params), commandline);
#ifdef CONFIG_MEMSIZE_IN_BYTES
- sprintf (env_buf, "%lu", gd->ram_size);
-#ifdef DEBUG
- printf ("## Giving linux memsize in bytes, %lu\n", gd->ram_size);
-#endif
+ sprintf (env_buf, "%lu", (ulong)gd->ram_size);
+ debug ("## Giving linux memsize in bytes, %lu\n", (ulong)gd->ram_size);
#else
- sprintf (env_buf, "%lu", gd->ram_size >> 20);
-#ifdef DEBUG
- printf ("## Giving linux memsize in MB, %lu\n", gd->ram_size >> 20);
-#endif
+ sprintf (env_buf, "%lu", (ulong)(gd->ram_size >> 20));
+ debug ("## Giving linux memsize in MB, %lu\n", (ulong)(gd->ram_size >> 20));
#endif /* CONFIG_MEMSIZE_IN_BYTES */
linux_env_set ("memsize", env_buf);