pa7300lc.c 1.1 KB

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