summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc8xx/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/cpu/mpc8xx/cpu.c')
-rw-r--r--arch/powerpc/cpu/mpc8xx/cpu.c36
1 files changed, 5 insertions, 31 deletions
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 1120fd7441..d17ad84694 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -21,9 +21,9 @@
#include <watchdog.h>
#include <command.h>
#include <mpc8xx.h>
-#include <commproc.h>
#include <netdev.h>
#include <asm/cache.h>
+#include <asm/cpm_8xx.h>
#include <linux/compiler.h>
#include <asm/io.h>
@@ -36,13 +36,13 @@ 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];
/* the highest 16 bits should be 0x0050 for a 860 */
- if ((pvr >> 16) != 0x0050)
+ if (PVR_VER(pvr) != PVR_VER(PVR_8xx))
return -1;
k = (immr << 16) |
@@ -90,7 +90,7 @@ static int check_CPU(long clock, uint pvr, uint immr)
int checkcpu(void)
{
ulong clock = gd->cpu_clk;
- uint immr = get_immr(0); /* Return full IMMR contents */
+ uint immr = get_immr(); /* Return full IMMR contents */
uint pvr = get_pvr();
puts("CPU: ");
@@ -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)
@@ -271,31 +270,6 @@ unsigned long get_tbclk(void)
return oscclk / 16;
}
-/* ------------------------------------------------------------------------- */
-
-#if defined(CONFIG_WATCHDOG)
-void watchdog_reset(void)
-{
- int re_enable = disable_interrupts();
-
- reset_8xx_watchdog((immap_t __iomem *)CONFIG_SYS_IMMR);
- if (re_enable)
- enable_interrupts();
-}
-#endif /* CONFIG_WATCHDOG */
-
-#if defined(CONFIG_WATCHDOG)
-
-void reset_8xx_watchdog(immap_t __iomem *immr)
-{
- /*
- * All other boards use the MPC8xx Internal Watchdog
- */
- out_be16(&immr->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */
- out_be16(&immr->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
-}
-#endif /* CONFIG_WATCHDOG */
-
/*
* Initializes on-chip ethernet controllers.
* to override, implement board_eth_init()