Add basic support for mini2440 board to barebox.
[barebox-mini2440.git] / include / debug_ll.h
blobe99ae7d207bfe2b26ae5ea35adff66299cb5a688
1 /* debug_ll.h
3 * written by Marc Singer
4 * 12 Feb 2005
6 * Copyright (C) 2005 Marc Singer
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA.
25 #ifndef __INCLUDE_DEBUG_LL_H__
26 #define __INCLUDE_DEBUG_LL_H__
28 #if defined (CONFIG_DEBUG_LL)
29 # include <mach/debug_ll.h>
31 #define PUTC_LL(x) putc(x)
32 # define PUTHEX_LL(value) ({ unsigned long v = (unsigned long) (value); \
33 int i; unsigned char ch; \
34 for (i = 8; i--; ) {\
35 ch = ((v >> (i*4)) & 0xf);\
36 ch += (ch >= 10) ? 'a' - 10 : '0';\
37 PUTC_LL (ch); }})
38 #else
39 # define PUTC_LL(c) do {} while (0)
40 # define PUTHEX_LL(v) do {} while (0)
42 #endif
44 #endif /* __INCLUDE_DEBUG_LL_H__ */