RE: [PATCH V2 4/6] MIPS: lantiq: add basic support for FALC-ON

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello John,

I found an issue with the machine_restart function.

> +
> +static void
> +ltq_machine_restart(char *command)
> +{
> +	pr_notice("System restart\n");
> +	local_irq_disable();
> +
> +	/* reboot magic */
> +	ltq_w32(BOOT_PW1, (void *)BOOT_PW1_REG); /* 'LTQ\0' */
> +	ltq_w32(BOOT_PW2, (void *)BOOT_PW2_REG); /* '\0QTL' */
> +	ltq_w32(0, (void *)BOOT_REG_BASE); /* reset Bootreg RVEC */
> +
> +	/* watchdog magic */
> +	ltq_w32(WDT_PW1, (void *)WDT_REG_BASE);
> +	ltq_w32(WDT_PW2 |
> +		(0x3 << 26) | /* PWL */
> +		(0x2 << 24) | /* CLKDIV */
> +		(0x1 << 31) | /* enable */
> +		(1), /* reload */
> +		(void *)WDT_REG_BASE);

The watchdog needs some time for the reset (1 tick of watchdog but many
ticks of the cpu). With unreachable(), there is no valid code after the
register access. Please add some loop like
	while(1)
		;
here (and a comment).

> +	unreachable();
> +}

Can you please create and send an updated patch?

Thanks,
Thomas




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux