diff options
-rw-r--r-- | apps/debug_menu.c | 20 | ||||
-rw-r--r-- | firmware/export/pp5020.h | 12 |
2 files changed, 20 insertions, 12 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 301fca834b..918a969a95 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -622,7 +622,7 @@ static bool dbg_hw_info(void) | |||
622 | 622 | ||
623 | snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck()); | 623 | snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck()); |
624 | lcd_puts(0, line++, buf); | 624 | lcd_puts(0, line++, buf); |
625 | 625 | ||
626 | lcd_update(); | 626 | lcd_update(); |
627 | 627 | ||
628 | while (!(action_userabort(TIMEOUT_BLOCK))); | 628 | while (!(action_userabort(TIMEOUT_BLOCK))); |
@@ -651,7 +651,7 @@ static bool dbg_hw_info(void) | |||
651 | lcd_puts(0, line++, buf); | 651 | lcd_puts(0, line++, buf); |
652 | 652 | ||
653 | snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck()); | 653 | snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck()); |
654 | lcd_puts(0, line++, buf); | 654 | lcd_puts(0, line++, buf); |
655 | 655 | ||
656 | lcd_update(); | 656 | lcd_update(); |
657 | 657 | ||
@@ -1201,19 +1201,15 @@ bool dbg_ports(void) | |||
1201 | snprintf(buf, sizeof(buf), "GPIO_F: %02x GPIO_L: %02x", gpio_f, gpio_l); | 1201 | snprintf(buf, sizeof(buf), "GPIO_F: %02x GPIO_L: %02x", gpio_f, gpio_l); |
1202 | lcd_puts(0, line++, buf); | 1202 | lcd_puts(0, line++, buf); |
1203 | line++; | 1203 | line++; |
1204 | 1204 | ||
1205 | snprintf(buf, sizeof(buf), "DEV_EN: %08lx", DEV_EN); | 1205 | snprintf(buf, sizeof(buf), "GPO32: %08lx", GPO32_VAL); |
1206 | lcd_puts(0, line++, buf); | ||
1207 | snprintf(buf, sizeof(buf), "CLOCK_SRC: %08lx", CLOCK_SOURCE); | ||
1208 | lcd_puts(0, line++, buf); | ||
1209 | snprintf(buf, sizeof(buf), "CLCD_CLK_SRC: %08lx", CLCD_CLOCK_SRC); | ||
1210 | lcd_puts(0, line++, buf); | ||
1211 | snprintf(buf, sizeof(buf), "PLL_CONTROL: %08lx", PLL_CONTROL); | ||
1212 | lcd_puts(0, line++, buf); | 1206 | lcd_puts(0, line++, buf); |
1213 | snprintf(buf, sizeof(buf), "PLL_STATUS: %08lx", PLL_STATUS); | 1207 | snprintf(buf, sizeof(buf), "DEV_EN: %08lx", DEV_EN); |
1214 | lcd_puts(0, line++, buf); | 1208 | lcd_puts(0, line++, buf); |
1215 | snprintf(buf, sizeof(buf), "DEV_TIMING1: %08lx", DEV_TIMING1); | 1209 | snprintf(buf, sizeof(buf), "DEV_EN2: %08lx", DEV_EN2); |
1216 | lcd_puts(0, line++, buf); | 1210 | lcd_puts(0, line++, buf); |
1211 | snprintf(buf, sizeof(buf), "DEV_EN3: %08lx", inl(0x60006044)); | ||
1212 | lcd_puts(0, line++, buf); /* to be verified */ | ||
1217 | 1213 | ||
1218 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) | 1214 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) |
1219 | line++; | 1215 | line++; |
diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h index 9d2a3b9d94..89acb2e8d2 100644 --- a/firmware/export/pp5020.h +++ b/firmware/export/pp5020.h | |||
@@ -300,6 +300,16 @@ | |||
300 | #define GPIOK_INT_CLR (*(volatile unsigned long *)(0x6000d178)) | 300 | #define GPIOK_INT_CLR (*(volatile unsigned long *)(0x6000d178)) |
301 | #define GPIOL_INT_CLR (*(volatile unsigned long *)(0x6000d17c)) | 301 | #define GPIOL_INT_CLR (*(volatile unsigned long *)(0x6000d17c)) |
302 | 302 | ||
303 | /* Standard GPIO addresses + 0x800 allow atomic port manipulation on PP502x. | ||
304 | * Bits 8..15 of the written word define which bits are changed, bits 0..7 | ||
305 | * define the value of those bits. */ | ||
306 | |||
307 | #define GPIO_SET_BITWISE(port, mask) \ | ||
308 | do { *(&port + (0x800/sizeof(long))) = (mask << 8) | mask; } while(0) | ||
309 | |||
310 | #define GPIO_CLEAR_BITWISE(port, mask) \ | ||
311 | do { *(&port + (0x800/sizeof(long))) = mask << 8; } while(0) | ||
312 | |||
303 | /* Device initialization */ | 313 | /* Device initialization */ |
304 | #define PP_VER1 (*(volatile unsigned long *)(0x70000000)) | 314 | #define PP_VER1 (*(volatile unsigned long *)(0x70000000)) |
305 | #define PP_VER2 (*(volatile unsigned long *)(0x70000004)) | 315 | #define PP_VER2 (*(volatile unsigned long *)(0x70000004)) |
@@ -318,6 +328,8 @@ | |||
318 | 328 | ||
319 | #define INIT_USB 0x80000000 | 329 | #define INIT_USB 0x80000000 |
320 | 330 | ||
331 | /* 32 bit GPO port */ | ||
332 | #define GPO32_VAL (*(volatile unsigned long *)(0x70000080)) | ||
321 | 333 | ||
322 | /* IIS */ | 334 | /* IIS */ |
323 | #define IISDIV (*(volatile unsigned long*)(0x60006080)) | 335 | #define IISDIV (*(volatile unsigned long*)(0x60006080)) |