~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-ks8695/include/mach/debug-macro.S

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-tz023xykf0i6eosh
Tags: upstream-3.2.0
ImportĀ upstreamĀ versionĀ 3.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * arch/arm/mach-ks8695/include/mach/debug-macro.S
 
3
 *
 
4
 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
 
5
 * Copyright (C) 2006 Simtec Electronics
 
6
 *
 
7
 * KS8695 - Debug macros
 
8
 *
 
9
 * This program is free software; you can redistribute it and/or modify
 
10
 * it under the terms of the GNU General Public License version 2 as
 
11
 * published by the Free Software Foundation.
 
12
 */
 
13
 
 
14
#include <mach/hardware.h>
 
15
#include <mach/regs-uart.h>
 
16
 
 
17
        .macro  addruart, rp, rv, tmp
 
18
                ldr     \rp, =KS8695_UART_PA            @ physical base address
 
19
                ldr     \rv, =KS8695_UART_VA            @ virtual base address
 
20
        .endm
 
21
 
 
22
        .macro  senduart, rd, rx
 
23
                str     \rd, [\rx, #KS8695_URTH]        @ Write to Transmit Holding Register
 
24
        .endm
 
25
 
 
26
        .macro  busyuart, rd, rx
 
27
1001:           ldr     \rd, [\rx, #KS8695_URLS]        @ Read Line Status Register
 
28
                tst     \rd, #URLS_URTE                 @ Holding & Shift registers empty?
 
29
                beq     1001b
 
30
        .endm
 
31
 
 
32
        .macro  waituart, rd, rx
 
33
1001:           ldr     \rd, [\rx, #KS8695_URLS]        @ Read Line Status Register
 
34
                tst     \rd, #URLS_URTHRE               @ Holding Register empty?
 
35
                beq     1001b
 
36
        .endm