Gigabeat S/i.MX31: Sort files in the /target tree into things that are SoC-generic...
[kugel-rb.git] / firmware / target / arm / s3c2440 / debug-s3c2440.c
blob064cca9135ecc676aa03eafd58f0e342d59f044a
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Karl Kurbjun
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #include "config.h"
23 #include "cpu.h"
24 #include "system.h"
25 #include "string.h"
26 #include <stdbool.h>
27 #include "button.h"
28 #include "lcd.h"
29 #include "sprintf.h"
30 #include "font.h"
31 #include "debug-target.h"
33 bool __dbg_hw_info(void)
35 return false;
38 bool __dbg_ports(void)
40 int line;
42 lcd_clear_display();
43 lcd_setfont(FONT_SYSFIXED);
45 while(1)
47 line = 0;
48 lcd_puts(0, line++, "[Ports and Registers]");
50 lcd_putsf(0, line++, "GPACON: %08lx GPBCON: %08lx", GPACON, GPBCON);
51 lcd_putsf(0, line++, "GPADAT: %08lx GPBDAT: %08lx", GPADAT, GPBDAT);
52 lcd_putsf(0, line++, "GPAUP: %08lx GPBUP: %08lx", 0ul, GPBUP);
53 lcd_putsf(0, line++, "GPCCON: %08lx GPDCON: %08lx", GPCCON, GPDCON);
54 lcd_putsf(0, line++, "GPCDAT: %08lx GPDDAT: %08lx", GPCDAT, GPDDAT);
55 lcd_putsf(0, line++, "GPCUP: %08lx GPDUP: %08lx", GPCUP, GPDUP);
57 lcd_putsf(0, line++, "GPCCON: %08lx GPDCON: %08lx", GPCCON, GPDCON);
58 lcd_putsf(0, line++, "GPCDAT: %08lx GPDDAT: %08lx", GPCDAT, GPDDAT);
59 lcd_putsf(0, line++, "GPCUP: %08lx GPDUP: %08lx", GPCUP, GPDUP);
61 lcd_putsf(0, line++, "GPECON: %08lx GPFCON: %08lx", GPECON, GPFCON);
62 lcd_putsf(0, line++, "GPEDAT: %08lx GPFDAT: %08lx", GPEDAT, GPFDAT);
63 lcd_putsf(0, line++, "GPEUP: %08lx GPFUP: %08lx", GPEUP, GPFUP);
65 lcd_putsf(0, line++, "GPGCON: %08lx GPHCON: %08lx", GPGCON, GPHCON);
66 lcd_putsf(0, line++, "GPGDAT: %08lx GPHDAT: %08lx", GPGDAT, GPHDAT);
67 lcd_putsf(0, line++, "GPGUP: %08lx GPHUP: %08lx", GPGUP, GPHUP);
69 lcd_putsf(0, line++, "GPJCON: %08lx", GPJCON);
70 lcd_putsf(0, line++, "GPJDAT: %08lx", GPJDAT);
71 lcd_putsf(0, line++, "GPJUP: %08lx", GPJUP);
73 line++;
75 lcd_putsf(0, line++, "SRCPND: %08lx INTMOD: %08lx", SRCPND, INTMOD);
76 lcd_putsf(0, line++, "INTMSK: %08lx INTPND: %08lx", INTMSK, INTPND);
77 lcd_putsf(0, line++, "CLKCON: %08lx CLKSLOW: %08lx", CLKCON, CLKSLOW);
78 lcd_putsf(0, line++, "MPLLCON: %08lx UPLLCON: %08lx", MPLLCON, UPLLCON);
79 lcd_putsf(0, line++, "CLKDIVN: %08lx CAMDIVN: %08lx", CLKDIVN, CAMDIVN);
80 lcd_putsf(0, line++, "BWSCON: %08lx TCONSEL: %08lx", BWSCON, TCONSEL);
82 lcd_update();
83 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
84 return false;