Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /* arch/arm/mach-s3c2410/include/mach/debug-macro.S
0003  *
0004  * Debugging macro include header
0005  *
0006  *  Copyright (C) 1994-1999 Russell King
0007  *  Copyright (C) 2005 Simtec Electronics
0008  *
0009  *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
0010 */
0011 
0012 #include <linux/serial_s3c.h>
0013 
0014 #define S3C2410_UART1_OFF (0x4000)
0015 
0016     .macro addruart, rp, rv, tmp
0017         ldr \rp, = CONFIG_DEBUG_UART_PHYS
0018         ldr \rv, = CONFIG_DEBUG_UART_VIRT
0019     .endm
0020 
0021     .macro  fifo_full_s3c2410 rd, rx
0022         ldr \rd, [\rx, # S3C2410_UFSTAT]
0023         tst \rd, #S3C2410_UFSTAT_TXFULL
0024     .endm
0025 
0026     .macro fifo_level_s3c2410 rd, rx
0027         ldr \rd, [\rx, # S3C2410_UFSTAT]
0028         and \rd, \rd, #S3C2410_UFSTAT_TXMASK
0029     .endm
0030 
0031 /* Select the correct implementation depending on the configuration. The
0032  * S3C2440 will get selected by default, as these are the most widely
0033  * used variants of these
0034 */
0035 
0036 #if defined(CONFIG_DEBUG_S3C2410_UART)
0037 #define fifo_full  fifo_full_s3c2410
0038 #define fifo_level fifo_level_s3c2410
0039 #endif
0040 
0041 /* include the reset of the code which will do the work */
0042 
0043 #include <debug/samsung.S>