Move c/h files implementing/defining standard library stuff into a new libc directory...
[kugel-rb.git] / firmware / target / arm / s3c2440 / debug-s3c2440.c
blob196a0b4177a00c36d9e629e4665100af61ed2d3d
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 "font.h"
30 #include "debug-target.h"
32 bool __dbg_hw_info(void)
34 return false;
37 bool __dbg_ports(void)
39 int line;
41 lcd_clear_display();
42 lcd_setfont(FONT_SYSFIXED);
44 while(1)
46 line = 0;
47 lcd_puts(0, line++, "[Ports and Registers]");
49 lcd_putsf(0, line++, "GPACON: %08lx GPBCON: %08lx", GPACON, GPBCON);
50 lcd_putsf(0, line++, "GPADAT: %08lx GPBDAT: %08lx", GPADAT, GPBDAT);
51 lcd_putsf(0, line++, "GPAUP: %08lx GPBUP: %08lx", 0ul, GPBUP);
52 lcd_putsf(0, line++, "GPCCON: %08lx GPDCON: %08lx", GPCCON, GPDCON);
53 lcd_putsf(0, line++, "GPCDAT: %08lx GPDDAT: %08lx", GPCDAT, GPDDAT);
54 lcd_putsf(0, line++, "GPCUP: %08lx GPDUP: %08lx", GPCUP, GPDUP);
56 lcd_putsf(0, line++, "GPCCON: %08lx GPDCON: %08lx", GPCCON, GPDCON);
57 lcd_putsf(0, line++, "GPCDAT: %08lx GPDDAT: %08lx", GPCDAT, GPDDAT);
58 lcd_putsf(0, line++, "GPCUP: %08lx GPDUP: %08lx", GPCUP, GPDUP);
60 lcd_putsf(0, line++, "GPECON: %08lx GPFCON: %08lx", GPECON, GPFCON);
61 lcd_putsf(0, line++, "GPEDAT: %08lx GPFDAT: %08lx", GPEDAT, GPFDAT);
62 lcd_putsf(0, line++, "GPEUP: %08lx GPFUP: %08lx", GPEUP, GPFUP);
64 lcd_putsf(0, line++, "GPGCON: %08lx GPHCON: %08lx", GPGCON, GPHCON);
65 lcd_putsf(0, line++, "GPGDAT: %08lx GPHDAT: %08lx", GPGDAT, GPHDAT);
66 lcd_putsf(0, line++, "GPGUP: %08lx GPHUP: %08lx", GPGUP, GPHUP);
68 lcd_putsf(0, line++, "GPJCON: %08lx", GPJCON);
69 lcd_putsf(0, line++, "GPJDAT: %08lx", GPJDAT);
70 lcd_putsf(0, line++, "GPJUP: %08lx", GPJUP);
72 line++;
74 lcd_putsf(0, line++, "SRCPND: %08lx INTMOD: %08lx", SRCPND, INTMOD);
75 lcd_putsf(0, line++, "INTMSK: %08lx INTPND: %08lx", INTMSK, INTPND);
76 lcd_putsf(0, line++, "CLKCON: %08lx CLKSLOW: %08lx", CLKCON, CLKSLOW);
77 lcd_putsf(0, line++, "MPLLCON: %08lx UPLLCON: %08lx", MPLLCON, UPLLCON);
78 lcd_putsf(0, line++, "CLKDIVN: %08lx CAMDIVN: %08lx", CLKDIVN, CAMDIVN);
79 lcd_putsf(0, line++, "BWSCON: %08lx TCONSEL: %08lx", BWSCON, TCONSEL);
81 lcd_update();
82 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
83 return false;