mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 18:05:19 +07:00
639da5ee37
Some platforms (like OMAP not to name it) are doing rather complicated hacks just to determine the base UART address to use. Let's give their addruart macro some slack by providing an extra work register which will allow for much needed cleanups. This is basically a no-op as this commit is only adding the extra argument to the macro but no one is using it yet. Signed-off-by: nicolas Pitre <nicolas.pitre@linaro.org> Reviewed-by: Kevin Hilman <khilman@ti.com>
74 lines
1.8 KiB
ArmAsm
74 lines
1.8 KiB
ArmAsm
/* arch/arm/mach-imx/include/mach/debug-macro.S
|
|
*
|
|
* Debugging macro include header
|
|
*
|
|
* Copyright (C) 1994-1999 Russell King
|
|
* Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
*/
|
|
#include <mach/hardware.h>
|
|
|
|
#ifdef CONFIG_SOC_IMX1
|
|
#define UART_PADDR MX1_UART1_BASE_ADDR
|
|
#endif
|
|
|
|
#ifdef CONFIG_SOC_IMX25
|
|
#ifdef UART_PADDR
|
|
#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
|
|
#endif
|
|
#define UART_PADDR MX25_UART1_BASE_ADDR
|
|
#endif
|
|
|
|
#if defined(CONFIG_SOC_IMX21) || defined (CONFIG_SOC_IMX27)
|
|
#ifdef UART_PADDR
|
|
#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
|
|
#endif
|
|
#define UART_PADDR MX2x_UART1_BASE_ADDR
|
|
#endif
|
|
|
|
#if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35)
|
|
#ifdef UART_PADDR
|
|
#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
|
|
#endif
|
|
#define UART_PADDR MX3x_UART1_BASE_ADDR
|
|
#endif
|
|
|
|
#ifdef CONFIG_SOC_IMX51
|
|
#ifdef UART_PADDR
|
|
#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
|
|
#endif
|
|
#define UART_PADDR MX51_UART1_BASE_ADDR
|
|
#endif
|
|
|
|
/* iMX50/53 have same addresses, but not iMX51 */
|
|
#if defined(CONFIG_SOC_IMX50) || defined(CONFIG_SOC_IMX53)
|
|
#ifdef UART_PADDR
|
|
#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
|
|
#endif
|
|
#define UART_PADDR MX53_UART1_BASE_ADDR
|
|
#endif
|
|
|
|
#define UART_VADDR IMX_IO_ADDRESS(UART_PADDR)
|
|
|
|
.macro addruart, rp, rv, tmp
|
|
ldr \rp, =UART_PADDR @ physical
|
|
ldr \rv, =UART_VADDR @ virtual
|
|
.endm
|
|
|
|
.macro senduart,rd,rx
|
|
str \rd, [\rx, #0x40] @ TXDATA
|
|
.endm
|
|
|
|
.macro waituart,rd,rx
|
|
.endm
|
|
|
|
.macro busyuart,rd,rx
|
|
1002: ldr \rd, [\rx, #0x98] @ SR2
|
|
tst \rd, #1 << 3 @ TXDC
|
|
beq 1002b @ wait until transmit done
|
|
.endm
|