MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-arm / hardware / dcc.h
blobfd465f89d896d35f3f84fa5fcb1dac8b01e5dbea
1 /*
2 * linux/include/asm-armnommu/hardware/dcc.h
4 * Copyright (C) 2004 Hyok S. Choi, Samsung Electronics Co.,Ltd.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef __DCC_PUTS__
21 #define __DCC_PUTS__
22 static void dcc_puts(const char *p)
24 #ifndef CONFIG_JTAG_DCC_OUTPUT_DISABLE
26 r0 = string ; string address
27 r1 = 2 ; state check bit (write)
28 r4 = *string ; character
30 __asm__ __volatile__(
31 " ldrb r4, [%0] @ load a char\n"
32 "1: mrc p14, 0, r3, c0, c0 @ read comms control reg\n"
33 " and r3, r3, #2 @ the write buffer status\n"
34 " cmp r3, #2 @ is it available?\n"
35 " beq 1b @ is not, wait till then\n"
36 " mcr p14, 0, r4, c1, c0 @ write it\n"
37 " cmp r4, #0x0a @ is it LF?\n"
38 " bne 2f @ if it is not, continue\n"
39 " mov r4, #0x0d @ set the CR\n"
40 " b 1b @ loop for writing CR\n"
41 "2: ldrb r4, [%0, #1]! @ load a char\n"
42 " cmp r4, #0x0 @ test is null\n"
43 " bne 1b @ if it is not yet, loop"
44 : /* no output register */
45 : "r" (p)
46 : "r3", "r4");
47 #endif
49 #endif