~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
#include <linux/serial_reg.h>
15
15
 
16
 
#include <asm/memory.h>
17
 
 
18
16
#include <plat/serial.h>
19
17
 
20
 
#define omap_uart_v2p(x)        ((x) - PAGE_OFFSET + PLAT_PHYS_OFFSET)
21
 
#define omap_uart_p2v(x)        ((x) - PLAT_PHYS_OFFSET + PAGE_OFFSET)
22
 
 
23
18
                .pushsection .data
24
19
omap_uart_phys: .word   0x0
25
20
omap_uart_virt: .word   0x0
31
26
                 * the desired UART phys and virt addresses temporarily into
32
27
                 * the omap_uart_phys and omap_uart_virt above.
33
28
                 */
34
 
                .macro  addruart, rp, rv
 
29
                .macro  addruart, rp, rv, tmp
35
30
 
36
31
                /* Use omap_uart_phys/virt if already configured */
37
 
9:              mrc     p15, 0, \rp, c1, c0
38
 
                tst     \rp, #1                 @ MMU enabled?
39
 
                ldreq   \rp, =omap_uart_v2p(omap_uart_phys)     @ MMU disabled
40
 
                ldrne   \rp, =omap_uart_phys    @ MMU enabled
41
 
                add     \rv, \rp, #4            @ omap_uart_virt
42
 
                ldr     \rp, [\rp, #0]
43
 
                ldr     \rv, [\rv, #0]
 
32
9:              adr     \rp, 99f                @ get effective addr of 99f
 
33
                ldr     \rv, [\rp]              @ get absolute addr of 99f
 
34
                sub     \rv, \rv, \rp           @ offset between the two
 
35
                ldr     \rp, [\rp, #4]          @ abs addr of omap_uart_phys
 
36
                sub     \tmp, \rp, \rv          @ make it effective
 
37
                ldr     \rp, [\tmp, #0]         @ omap_uart_phys
 
38
                ldr     \rv, [\tmp, #4]         @ omap_uart_virt
44
39
                cmp     \rp, #0                 @ is port configured?
45
40
                cmpne   \rv, #0
46
 
                bne     99f                     @ already configured
 
41
                bne     100f                    @ already configured
47
42
 
48
43
                /* Check the debug UART configuration set in uncompress.h */
49
 
                mrc     p15, 0, \rp, c1, c0
50
 
                tst     \rp, #1                 @ MMU enabled?
51
 
                ldreq   \rp, =OMAP_UART_INFO    @ MMU not enabled
52
 
                ldrne   \rp, =omap_uart_p2v(OMAP_UART_INFO)     @ MMU enabled
53
 
                ldr     \rp, [\rp, #0]
 
44
                and     \rp, pc, #0xff000000
 
45
                ldr     \rv, =OMAP_UART_INFO_OFS
 
46
                ldr     \rp, [\rp, \rv]
54
47
 
55
48
                /* Select the UART to use based on the UART1 scratchpad value */
56
49
10:             cmp     \rp, #0                 @ no port configured?
74
67
 
75
68
                /* Store both phys and virt address for the uart */
76
69
98:             add     \rp, \rp, #0xff000000   @ phys base
77
 
                mrc     p15, 0, \rv, c1, c0
78
 
                tst     \rv, #1                 @ MMU enabled?
79
 
                ldreq   \rv, =omap_uart_v2p(omap_uart_phys)     @ MMU disabled
80
 
                ldrne   \rv, =omap_uart_phys    @ MMU enabled
81
 
                str     \rp, [\rv, #0]
 
70
                str     \rp, [\tmp, #0]         @ omap_uart_phys
82
71
                sub     \rp, \rp, #0xff000000   @ phys base
83
72
                add     \rp, \rp, #0xfe000000   @ virt base
84
 
                add     \rv, \rv, #4            @ omap_uart_lsr
85
 
                str     \rp, [\rv, #0]
 
73
                str     \rp, [\tmp, #4]         @ omap_uart_virt
86
74
                b       9b
87
 
99:
 
75
 
 
76
                .align
 
77
99:             .word   .
 
78
                .word   omap_uart_phys
 
79
                .ltorg
 
80
 
 
81
100:
88
82
                .endm
89
83
 
90
84
                .macro  senduart,rd,rx