diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2016-02-27 19:26:42 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-03-15 15:10:48 -0400 |
commit | 90ca5dfec4406bd0d6759395d8d24cb401be2c28 (patch) | |
tree | 0722c6d056a367b6b43c0c56f11d542de4a6bca6 /arch/arm/cpu/armv7 | |
parent | c5412b084bf95781c54463570f96059a1d99d363 (diff) | |
download | u-boot-imx-90ca5dfec4406bd0d6759395d8d24cb401be2c28.zip u-boot-imx-90ca5dfec4406bd0d6759395d8d24cb401be2c28.tar.gz u-boot-imx-90ca5dfec4406bd0d6759395d8d24cb401be2c28.tar.bz2 |
omap3: Use a define for reboot reason offset
This introduces a define for the offset to the reboot reason, rather than
hardcoding it.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r-- | arch/arm/cpu/armv7/omap3/boot.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/cpu/armv7/omap3/boot.c b/arch/arm/cpu/armv7/omap3/boot.c index 259c210..64b242b 100644 --- a/arch/arm/cpu/armv7/omap3/boot.c +++ b/arch/arm/cpu/armv7/omap3/boot.c @@ -65,7 +65,8 @@ int omap_reboot_mode(char *mode, unsigned int length) 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') @@ -85,7 +86,7 @@ int omap_reboot_mode(char *mode, unsigned int length) int omap_reboot_mode_clear(void) { - writel(0, (u32 *)(OMAP34XX_SCRATCHPAD + 4)); + writel(0, (u32 *)(OMAP34XX_SCRATCHPAD + OMAP_REBOOT_REASON_OFFSET)); return 0; } @@ -96,7 +97,8 @@ int omap_reboot_mode_store(char *mode) 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; } |