2 * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
10 #ifndef CONFIG_DEBUG_CLPS711X_UART2
11 #define CLPS711X_UART_PADDR (0x80000000 + 0x0000)
12 #define CLPS711X_UART_VADDR (0xfeff4000 + 0x0000)
14 #define CLPS711X_UART_PADDR (0x80000000 + 0x1000)
15 #define CLPS711X_UART_VADDR (0xfeff4000 + 0x1000)
18 #define SYSFLG (0x0140)
19 #define SYSFLG_UBUSY (1 << 11)
20 #define UARTDR (0x0480)
22 .macro addruart, rp, rv, tmp
23 ldr \rv, =CLPS711X_UART_VADDR
24 ldr \rp, =CLPS711X_UART_PADDR
31 str \rd, [\rx, #UARTDR]
35 1001: ldr \rd, [\rx, #SYSFLG]
36 tst \rd, #SYSFLG_UBUSY