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

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* -*- linux-c -*- */
  2. /* 
  3.  * Copyright (C) 2001 By Joachim Martillo, Telford Tools, Inc.
  4.  *
  5.  * This program is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU General Public License
  7.  * as published by the Free Software Foundation; either version
  8.  * 2 of the License, or (at your option) any later version.
  9.  *
  10.  **/
  11. #include <linux/kernel.h>
  12. #include <linux/pci.h>
  13. #include <linux/stddef.h>
  14. #include <linux/netdevice.h>
  15. #include <linux/string.h>
  16. #include <linux/sockios.h>
  17. #include <asm/io.h>
  18. #include <asm/byteorder.h>
  19. #include <asm/pgtable.h>
  20. #include <linux/skbuff.h>
  21. #include <linux/if_arp.h>
  22. #include <linux/fs.h>
  23. #include <linux/sched.h>
  24. #include <asm/uaccess.h>
  25. #include <linux/version.h>
  26. #include "8253xctl.h"
  27. #include "Reg9050.h"
  28. #if 0  /* only during debugging */
  29. #undef DEBUGPRINT
  30. #define DEBUGPRINT(arg) printk arg
  31. #endif
  32. void dump_ati_adapter_registers(unsigned int *addr, int len)
  33. {
  34. int index;
  35. int flag = 1;
  36. for(index = 0; index < (len/(sizeof(unsigned int*))); ++index)
  37. {
  38. if(flag)
  39. {
  40. DEBUGPRINT((KERN_ALERT "bridge: %4.4x:%8.8x", (4*index), *addr++));
  41. }
  42. else
  43. {
  44. DEBUGPRINT(("%8.8x", *addr++));
  45. }
  46. if(((index + 1) % 8) == 0)
  47. {
  48. DEBUGPRINT(("n"));
  49. flag = 1;
  50. }
  51. else
  52. {
  53. DEBUGPRINT((" "));
  54. flag = 0;
  55. }
  56. }
  57. if(flag == 0)
  58. {
  59. DEBUGPRINT(("n"));
  60. }
  61. }