hc
2024-08-12 233ab1bd4c5697f5cdec94e60206e8c6ac609b4c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
#include "pcie_dbg.h"
 
int pcie_hexdump(char *name, char *buf, int len)
{
   int i, count;
   unsigned int *p;
 
   count = len / 32;
   count += 1;
   PCIE_INFO("hexdump %s hex(len=%d):\n", name, len);
   for (i = 0; i < count; i++) {
       p = (unsigned int *)(buf + i * 32);
       PCIE_INFO("mem[0x%04x] 0x%08x,0x%08x,0x%08x,0x%08x,0x%08x,"
             "0x%08x,0x%08x,0x%08x,\n",
             i * 32, p[0], p[1], p[2], p[3], p[4], p[5],
             p[6], p[7]);
   }
 
   return 0;
}