summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/cpu/mpc8xx/cpu.c5
-rw-r--r--arch/powerpc/cpu/mpc8xx/speed.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 1120fd7441..9da73ac22e 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR;
static int check_CPU(long clock, uint pvr, uint immr)
{
- immap_t __iomem *immap = (immap_t __iomem *)(immr & 0xFFFF0000);
+ immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
uint k;
char buf[32];
@@ -237,8 +237,7 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
*/
unsigned long get_tbclk(void)
{
- uint immr = get_immr(0); /* Return full IMMR contents */
- immap_t __iomem *immap = (immap_t __iomem *)(immr & 0xFFFF0000);
+ immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
ulong oscclk, factor, pll;
if (in_be32(&immap->im_clkrst.car_sccr) & SCCR_TBS)
diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index fa8f87cbc5..f8eb4a13ea 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -17,8 +17,7 @@ DECLARE_GLOBAL_DATA_PTR;
*/
int get_clocks(void)
{
- uint immr = get_immr(0); /* Return full IMMR contents */
- immap_t __iomem *immap = (immap_t __iomem *)(immr & 0xFFFF0000);
+ immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
uint sccr = in_be32(&immap->im_clkrst.car_sccr);
uint divider = 1 << (((sccr & SCCR_DFBRG11) >> 11) * 2);