OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [platform/] [tests/] [debug-macro.S.ARM] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
#ifndef __DEBUG__MACRO__S__
2
#define __DEBUG__MACRO__S__
3
 
4
#include 
5
#include 
6
#include INC_PLAT(offsets.h)
7
 
8
#define UART01x_DR              0x00
9
/*
10
 *  linux/arch/arm/kernel/debug.S
11
 *
12
 *  Copyright (C) 1994-1999 Russell King
13
 *
14
 * This program is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License version 2 as
16
 * published by the Free Software Foundation.
17
 *
18
 *  32-bit debugging code
19
 */
20
                .macro  addruart,rx
21
                mrc     p15, 0, \rx, c1, c0
22
                tst     \rx, #1                 @ MMU enabled?
23
                moveq   \rx,      #0x10000000
24
                orreq   \rx, \rx, #0x001F0000
25
                orreq   \rx, \rx, #0x00001000
26
                /* FIXME: This offset is incorrect for now. Make sure you pass correct offset */
27
                movne   \rx,      #0xf9000000 @#IO_AREA0_VADDR
28
                addne   \rx, \rx, #0xF1000
29
                @ addne \rx, \rx, #PB926_UART0_VOFFSET  @ UART0 page offset from
30
                                                        @ virtual io area base.
31
                .endm
32
 
33
                .macro  senduart,rd,rx
34
                strb    \rd, [\rx, #UART01x_DR]
35
                .endm
36
 
37
                .macro  waituart,rd,rx
38
1001:           ldr     \rd, [\rx, #0x18]       @ UARTFLG
39
                tst     \rd, #1 << 5            @ UARTFLGUTXFF - 1 when full
40
                bne     1001b
41
                .endm
42
 
43
                .macro  busyuart,rd,rx
44
1001:           ldr     \rd, [\rx, #0x18]       @ UARTFLG
45
                tst     \rd, #1 << 3            @ UARTFLGUBUSY - 1 when busy
46
                bne     1001b
47
                .endm
48
 
49
#endif /* __DEBUG__MACRO__S__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.