diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2017-07-06 10:33:13 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-08 15:55:32 -0400 |
commit | ba3da7348ac9aaa1cc0a9ccbc8b3c9367d87ca4b (patch) | |
tree | 50826c7ee7fa776c1b94e9af8183d673f4dc311b /arch/powerpc/lib/time.c | |
parent | d79496657e3d8e856152e7652ade6597f6bdf73c (diff) |
powerpc, 8xx: Use IO accessors to access IO memory
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'arch/powerpc/lib/time.c')
-rw-r--r-- | arch/powerpc/lib/time.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c index 4cbb65eb68..41a271a42d 100644 --- a/arch/powerpc/lib/time.c +++ b/arch/powerpc/lib/time.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <asm/io.h> /* ------------------------------------------------------------------------- */ @@ -65,10 +66,10 @@ int timer_init(void) unsigned long temp; #if defined(CONFIG_8xx) - volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; /* unlock */ - immap->im_sitk.sitk_tbk = KAPWR_KEY; + out_be32(&immap->im_sitk.sitk_tbk, KAPWR_KEY); #endif /* reset */ @@ -77,7 +78,7 @@ int timer_init(void) #if defined(CONFIG_8xx) /* enable */ - immap->im_sit.sit_tbscr |= TBSCR_TBE; + setbits_be16(&immap->im_sit.sit_tbscr, TBSCR_TBE); #endif return (0); } |