On Mon, Mar 16, 2009 at 06:07:07PM +0200, Juha Yrjola wrote: > Russell King - ARM Linux wrote: >>> The reboot mode can be communicated to a bootloader (or the >>> kernel itself) with a scratchpad register. This functionality >>> is especially useful, if userspace is allowed to change >>> the reboot mode. >> >> The reason for this being... > > If my other patch [1] is applied, we are able to let user space tell the > bootloader which mode to boot to. > > On the Nokia Linux mobile devices, flashing is done mostly by the > bootloader. If a USB host is connected at bootup, we enter a USB loop > with a certain timeout. The timeout is disabled when the first flashing > command arrives. This is no problem for Linux, but some unluckier > operating systems are not able to even load their drivers quickly enough. > > Hence, we need a way to let the bootloader know when to safely disable > the timeout (when the user explicitly wants to perform flashing, that > is). Right. You are aware that there is already a mechanism for doing this in the generic kernel (obviously not)? sys_reboot() with LINUX_REBOOT_CMD_RESTART2 takes a string in addition to the standard parameters. This string is passed into machine_restart() which we currently ignore. If LINUX_REBOOT_CMD_RESTART is used, this string is NULL. We could change machine_restart() to pass this parameter through to arm_pm_restart() and ultimately down to arch_reset(). That said, I don't see a version of reboot() which will pass a string to the reboot() sysctl... there must be one around for the feature to be present. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html