aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2017-07-06 10:33:13 +0200
committerTom Rini <trini@konsulko.com>2017-07-08 15:55:32 -0400
commitba3da7348ac9aaa1cc0a9ccbc8b3c9367d87ca4b (patch)
tree50826c7ee7fa776c1b94e9af8183d673f4dc311b /arch/powerpc/lib
parentd79496657e3d8e856152e7652ade6597f6bdf73c (diff)
downloadu-boot-ba3da7348ac9aaa1cc0a9ccbc8b3c9367d87ca4b.zip
u-boot-ba3da7348ac9aaa1cc0a9ccbc8b3c9367d87ca4b.tar.gz
u-boot-ba3da7348ac9aaa1cc0a9ccbc8b3c9367d87ca4b.tar.bz2
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')
-rw-r--r--arch/powerpc/lib/time.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index 4cbb65e..41a271a 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);
}