Path: blob/master/arch/unicore32/include/mach/ocd.h
10819 views
/*1* linux/arch/unicore32/include/mach/ocd.h2*3* Code specific to PKUnity SoC and UniCore ISA4*5* Copyright (C) 2001-2010 GUAN Xue-tao6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License version 2 as9* published by the Free Software Foundation.10*/1112#ifndef __MACH_PUV3_OCD_H__13#define __MACH_PUV3_OCD_H__1415#if defined(CONFIG_DEBUG_OCD)16static inline void ocd_putc(unsigned int c)17{18int status, i = 0x2000000;1920do {21if (--i < 0)22return;2324asm volatile ("movc %0, p1.c0, #0" : "=r" (status));25} while (status & 2);2627asm("movc p1.c1, %0, #1" : : "r" (c));28}2930#define putc(ch) ocd_putc(ch)31#else32#define putc(ch)33#endif3435#endif363738