static void ux500_restart(char mode, const char *cmd)
{
	unsigned short reset_code;
	unsigned short preset_code;

	local_irq_disable();
	local_fiq_disable();

	preset_code = reboot_reason_get_preset();

	if (preset_code != SW_RESET_CRASH)
		prcmu_system_reset(preset_code);
	else {
		reset_code = reboot_reason_code(cmd);
		prcmu_system_reset(reset_code);
	}

	mdelay(1000);

	/*
	 * On 5500, the PRCMU firmware waits for up to 2 seconds for the modem
	 * to respond.
	 */
	if (cpu_is_u5500())
		mdelay(2000);

	printk(KERN_ERR "Reboot via PRCMU failed -- System halted\n");
	while (1)
		;
}
/*
 * Preset a restart reason when this can't be done in a linear call-chain.
 * Typically this would be the case when a sysrq handler calls panic()
 * indirectly via the *killer = 1 mechanism to enforce the crash.
 */
void reboot_reason_set_preset(const char *cmd)
{
	preset_reboot_reason_code = reboot_reason_code(cmd);
}