if (length < 2)
return -1;
- reboot_mode = readl((u32 *)(OMAP34XX_SCRATCHPAD + 4));
+ reboot_mode = readl((u32 *)(OMAP34XX_SCRATCHPAD +
+ OMAP_REBOOT_REASON_OFFSET));
c = (reboot_mode >> 24) & 0xff;
if (c != 'B')
int omap_reboot_mode_clear(void)
{
- writel(0, (u32 *)(OMAP34XX_SCRATCHPAD + 4));
+ writel(0, (u32 *)(OMAP34XX_SCRATCHPAD + OMAP_REBOOT_REASON_OFFSET));
return 0;
}
reboot_mode = 'B' << 24 | 'M' << 16 | mode[0];
- writel(reboot_mode, (u32 *)(OMAP34XX_SCRATCHPAD + 4));
+ writel(reboot_mode, (u32 *)(OMAP34XX_SCRATCHPAD +
+ OMAP_REBOOT_REASON_OFFSET));
return 0;
}