aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/main.c')
-rw-r--r--arch/powerpc/boot/main.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c
index d367a0aece2a..d80161b633f4 100644
--- a/arch/powerpc/boot/main.c
+++ b/arch/powerpc/boot/main.c
@@ -144,13 +144,24 @@ static char cmdline[BOOT_COMMAND_LINE_SIZE]
144 144
145static void prep_cmdline(void *chosen) 145static void prep_cmdline(void *chosen)
146{ 146{
147 unsigned int getline_timeout = 5000;
148 int v;
149 int n;
150
151 /* Wait-for-input time */
152 n = getprop(chosen, "linux,cmdline-timeout", &v, sizeof(v));
153 if (n == sizeof(v))
154 getline_timeout = v;
155
147 if (cmdline[0] == '\0') 156 if (cmdline[0] == '\0')
148 getprop(chosen, "bootargs", cmdline, BOOT_COMMAND_LINE_SIZE-1); 157 getprop(chosen, "bootargs", cmdline, BOOT_COMMAND_LINE_SIZE-1);
149 158
150 printf("\n\rLinux/PowerPC load: %s", cmdline); 159 printf("\n\rLinux/PowerPC load: %s", cmdline);
160
151 /* If possible, edit the command line */ 161 /* If possible, edit the command line */
152 if (console_ops.edit_cmdline) 162 if (console_ops.edit_cmdline && getline_timeout)
153 console_ops.edit_cmdline(cmdline, BOOT_COMMAND_LINE_SIZE); 163 console_ops.edit_cmdline(cmdline, BOOT_COMMAND_LINE_SIZE, getline_timeout);
164
154 printf("\n\r"); 165 printf("\n\r");
155 166
156 /* Put the command line back into the devtree for the kernel */ 167 /* Put the command line back into the devtree for the kernel */