pa7300lc.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * linux/arch/parisc/kernel/pa7300lc.c
  3. * - PA7300LC-specific functions
  4. *
  5. * Copyright (C) 2000 Philipp Rumpf */
  6. #include <linux/sched.h>
  7. #include <linux/sched/debug.h>
  8. #include <linux/smp.h>
  9. #include <linux/kernel.h>
  10. #include <asm/io.h>
  11. #include <asm/ptrace.h>
  12. #include <asm/machdep.h>
  13. /* CPU register indices */
  14. #define MIOC_STATUS 0xf040
  15. #define MIOC_CONTROL 0xf080
  16. #define MDERRADD 0xf0e0
  17. #define DMAERR 0xf0e8
  18. #define DIOERR 0xf0ec
  19. #define HIDMAMEM 0xf0f4
  20. /* this returns the HPA of the CPU it was called on */
  21. static u32 cpu_hpa(void)
  22. {
  23. return 0xfffb0000;
  24. }
  25. static void pa7300lc_lpmc(int code, struct pt_regs *regs)
  26. {
  27. u32 hpa;
  28. printk(KERN_WARNING "LPMC on CPU %d\n", smp_processor_id());
  29. show_regs(regs);
  30. hpa = cpu_hpa();
  31. printk(KERN_WARNING
  32. "MIOC_CONTROL %08x\n" "MIOC_STATUS %08x\n"
  33. "MDERRADD %08x\n" "DMAERR %08x\n"
  34. "DIOERR %08x\n" "HIDMAMEM %08x\n",
  35. gsc_readl(hpa+MIOC_CONTROL), gsc_readl(hpa+MIOC_STATUS),
  36. gsc_readl(hpa+MDERRADD), gsc_readl(hpa+DMAERR),
  37. gsc_readl(hpa+DIOERR), gsc_readl(hpa+HIDMAMEM));
  38. }
  39. void pa7300lc_init(void)
  40. {
  41. cpu_lpmc = pa7300lc_lpmc;
  42. }