summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-07-31 14:27:37 +0200
committerFrancisco Jerez <currojerez@riseup.net>2010-07-31 14:29:07 +0200
commita222635cc4274fd846727f82e91e677e0a41a32c (patch)
tree2f792a304d36e58b9a821e1418706c5e4edb1a29
parent2a25f1e6b8352dfb1c4b765d9152cdc5c2a93306 (diff)
Dump some PFB and PBUS registers.
-rw-r--r--tvdump.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/tvdump.c b/tvdump.c
index 23538f9..8e686d6 100644
--- a/tvdump.c
+++ b/tvdump.c
@@ -159,6 +159,7 @@ int NVGetArchitecture(volatile uint32_t *regs)
#define DIFFM(A,B,M) ((A%M + M - B%M)%M)
#define MASK(field) ((0xffffffff >> (31 - ((1?field) - (0?field)))) << (0?field))
#define XLATE(src, srclowbit, outfield) ((((src) >> (srclowbit)) << (0?outfield)) & MASK(outfield))
+#define LEN(xs) (sizeof(xs) / sizeof(*(xs)))
void tv_dump(void* regs){
int i,j;
@@ -406,7 +407,7 @@ void tv_dump(void* regs){
printf("-- OUTPUT registers--\n");
int offsets[] = {0, 0x68, 0x2000, 0x2068};
- for(i=0; i< sizeof(offsets)/sizeof(int); i++)
+ for(i=0; i< LEN(offsets); i++)
printf("NV_PRAMDAC_DACCLK+0x%x: 0x%x\n",offsets[i], NVReadRAMDAC(regs, 0, NV_PRAMDAC_DACCLK+offsets[i]));
printf("-- PVIDEO registers --\n");
@@ -443,6 +444,43 @@ void tv_dump(void* regs){
printf("NV_PVIDEO_TST_WRITE: 0x%x\n", NV_RD32(regs,0x00008D10));
printf("NV_PVIDEO_TST_READ: 0x%x\n", NV_RD32(regs,0x00008D40));
+ printf("-- PBUS registers --\n");
+ {
+ uint32_t pbus_regs[] = {
+ 0x1084, 0x108c, 0x1098, 0x10b8, 0x10d8, 0x10e0, 0x10f0,
+ 0x1100, 0x1140, 0x1210, 0x1214, 0x1218, 0x121c, 0x1220,
+ 0x1228, 0x122c, 0x1518, 0x1580, 0x1584, 0x1588, 0x158c,
+ 0x1590, 0x15a0, 0x1800, 0x1804, 0x1808, 0x180c, 0x1810,
+ 0x1814, 0x1818, 0x182c, 0x1830, 0x1844, 0x1848, 0x184c,
+ 0x1850, 0x1854, 0x1860
+ };
+
+ for (i = 0; i < LEN(pbus_regs); i++)
+ printf("PBUS: 0x%x: 0x%x\n", pbus_regs[i],
+ NV_RD32(regs, pbus_regs[i]));
+ }
+
+ printf("-- PFB registers --\n");
+ {
+ uint32_t pfb_regs[] = {
+ 0x100000, 0x100080, 0x100200, 0x100204,
+ 0x10020c, 0x100210, 0x100300, 0x100304,
+ 0x100308, 0x100328, 0x10032c, 0x100330,
+ 0x100334, 0x100338, 0x100350, 0x100360,
+ 0x10037c, 0x100380, 0x100384, 0x100388,
+ 0x10038c, 0x100390, 0x100394, 0x100398,
+ 0x10039c, 0x1003a0, 0x1003a4, 0x1003a8,
+ 0x1003ac, 0x1003b0, 0x1003b4, 0x1003b8,
+ 0x1003bc, 0x1003c0, 0x1003c4, 0x1003c8,
+ 0x1003d0
+ };
+
+ for (i = 0; i < LEN(pfb_regs); i++)
+ printf("PFB: 0x%x: 0x%x\n", pfb_regs[i],
+ NV_RD32(regs, pfb_regs[i]));
+
+ }
+
}
int main(){