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>
This commit is contained in:
Christophe Leroy 2017-07-06 10:33:13 +02:00 committed by Tom Rini
parent d79496657e
commit ba3da7348a
12 changed files with 736 additions and 662 deletions

View file

@ -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);
}