usb: gadget: udc: pch_udc: Fix a plethora of function documentation related issues
[linux/fpc-iii.git] / arch / unicore32 / include / mach / ocd.h
blob2a814929e38997a3f40d95259730d272f0dd12e9
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * linux/arch/unicore32/include/mach/ocd.h
5 * Code specific to PKUnity SoC and UniCore ISA
7 * Copyright (C) 2001-2010 GUAN Xue-tao
8 */
10 #ifndef __MACH_PUV3_OCD_H__
11 #define __MACH_PUV3_OCD_H__
13 #if defined(CONFIG_DEBUG_OCD)
14 static inline void ocd_putc(unsigned int c)
16 int status, i = 0x2000000;
18 do {
19 if (--i < 0)
20 return;
22 asm volatile ("movc %0, p1.c0, #0" : "=r" (status));
23 } while (status & 2);
25 asm("movc p1.c1, %0, #1" : : "r" (c));
28 #define putc(ch) ocd_putc(ch)
29 #else
30 #define putc(ch)
31 #endif
33 #endif