- Alan Cox: synch. PA-RISC arch and bitops cleanups
[davej-history.git] / arch / parisc / kernel / pa7300lc.c
blob307e4b2fdae3f7f0a7622329decdfd666342a67e
1 /*
2 * linux/arch/parisc/kernel/pa7300lc.c
3 * - PA7300LC-specific functions
5 * Copyright (C) 2000 Philipp Rumpf */
7 #include <asm/gsc.h>
8 #include <asm/ptrace.h>
9 #include <asm/machdep.h>
10 #include <linux/smp.h>
11 #include <linux/kernel.h>
13 /* CPU register indices */
15 #define MIOC_STATUS 0xf040
16 #define MIOC_CONTROL 0xf080
17 #define MDERRADD 0xf0e0
18 #define DMAERR 0xf0e8
19 #define DIOERR 0xf0ec
20 #define HIDMAMEM 0xf0f4
22 /* read CPU Diagnose register index */
23 static u32 diag_read(int index)
25 return 0;
28 /* this returns the HPA of the CPU it was called on */
29 static u32 cpu_hpa(void)
31 return 0xfffb0000;
34 static void pa7300lc_lpmc(int code, struct pt_regs *regs)
36 u32 hpa;
37 printk(KERN_WARNING "LPMC on CPU %d\n", smp_processor_id());
39 show_regs(regs);
41 hpa = cpu_hpa();
42 printk(KERN_WARNING
43 "MIOC_CONTROL %08x\n" "MIOC_STATUS %08x\n"
44 "MDERRADD %08x\n" "DMAERR %08x\n"
45 "DIOERR %08x\n" "HIDMAMEM %08x\n",
46 gsc_readl(hpa+MIOC_CONTROL), gsc_readl(hpa+MIOC_STATUS),
47 gsc_readl(hpa+MDERRADD), gsc_readl(hpa+DMAERR),
48 gsc_readl(hpa+DIOERR), gsc_readl(hpa+HIDMAMEM));
51 void pa7300lc_init(void)
53 cpu_lpmc = pa7300lc_lpmc;