Blackfin: convert CMD_LINE_ADDR to CONFIG_LINUX_CMDLINE_{ADDR,SIZE}
authorMike Frysinger <vapier@gentoo.org>
Thu, 7 Aug 2008 19:24:59 +0000 (15:24 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 28 Jan 2009 18:26:10 +0000 (13:26 -0500)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
include/asm-blackfin/blackfin-config-post.h
lib_blackfin/bootm.c

index 0ab68ace75f27e285cbdaa6abc1dbc1c69274f41..936001aa7e67da3876fb39f2cf4f85d55167601a 100644 (file)
 #endif
 
 /* Using L1 scratch pad makes sense for everyone by default. */
-#ifndef CMD_LINE_ADDR
-# define CMD_LINE_ADDR L1_SRAM_SCRATCH
+#ifndef CONFIG_LINUX_CMDLINE_ADDR
+# define CONFIG_LINUX_CMDLINE_ADDR L1_SRAM_SCRATCH
+#endif
+#ifndef CONFIG_LINUX_CMDLINE_SIZE
+# define CONFIG_LINUX_CMDLINE_SIZE L1_SRAM_SCRATCH_SIZE
 #endif
 
 #endif
index 195eb9c009782500cd542ddcc9ea833d2205ba6a..2954ce6ce718f9265160739a922d8dc2cd0e80eb 100644 (file)
@@ -20,14 +20,14 @@ extern void swap_to(int device_id);
 
 static char *make_command_line(void)
 {
-       char *dest = (char *)CMD_LINE_ADDR;
+       char *dest = (char *)CONFIG_LINUX_CMDLINE_ADDR;
        char *bootargs = getenv("bootargs");
 
        if (bootargs == NULL)
                return NULL;
 
-       strncpy(dest, bootargs, 0x1000);
-       dest[0xfff] = 0;
+       strncpy(dest, bootargs, CONFIG_LINUX_CMDLINE_SIZE);
+       dest[CONFIG_LINUX_CMDLINE_SIZE - 1] = 0;
        return dest;
 }