pa7300lc.c
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  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/smp.h>
  8. #include <linux/kernel.h>
  9. #include <asm/gsc.h>
  10. #include <asm/ptrace.h>
  11. #include <asm/machdep.h>
  12. /* CPU register indices */
  13. #define MIOC_STATUS 0xf040
  14. #define MIOC_CONTROL 0xf080
  15. #define MDERRADD 0xf0e0
  16. #define DMAERR 0xf0e8
  17. #define DIOERR 0xf0ec
  18. #define HIDMAMEM 0xf0f4
  19. /* this returns the HPA of the CPU it was called on */
  20. static u32 cpu_hpa(void)
  21. {
  22. return 0xfffb0000;
  23. }
  24. static void pa7300lc_lpmc(int code, struct pt_regs *regs)
  25. {
  26. u32 hpa;
  27. printk(KERN_WARNING "LPMC on CPU %dn", smp_processor_id());
  28. show_regs(regs);
  29. hpa = cpu_hpa();
  30. printk(KERN_WARNING
  31. "MIOC_CONTROL %08xn" "MIOC_STATUS  %08xn"
  32. "MDERRADD     %08xn" "DMAERR       %08xn"
  33. "DIOERR       %08xn" "HIDMAMEM     %08xn",
  34. gsc_readl(hpa+MIOC_CONTROL), gsc_readl(hpa+MIOC_STATUS),
  35. gsc_readl(hpa+MDERRADD), gsc_readl(hpa+DMAERR),
  36. gsc_readl(hpa+DIOERR), gsc_readl(hpa+HIDMAMEM));
  37. }
  38. void pa7300lc_init(void)
  39. {
  40. cpu_lpmc = pa7300lc_lpmc;
  41. }