Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
34 lines
748 B
ArmAsm
34 lines
748 B
ArmAsm
/*
|
|
* Broadcom BCM63xx low-level UART debug
|
|
*
|
|
* Copyright (C) 2014 Broadcom Corporation
|
|
*
|
|
* 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 <linux/serial_bcm63xx.h>
|
|
|
|
.macro addruart, rp, rv, tmp
|
|
ldr \rp, =CONFIG_DEBUG_UART_PHYS
|
|
ldr \rv, =CONFIG_DEBUG_UART_VIRT
|
|
.endm
|
|
|
|
.macro senduart, rd, rx
|
|
/* word access do not work */
|
|
strb \rd, [\rx, #UART_FIFO_REG]
|
|
.endm
|
|
|
|
.macro waituart, rd, rx
|
|
1001: ldr \rd, [\rx, #UART_IR_REG]
|
|
tst \rd, #(1 << UART_IR_TXEMPTY)
|
|
beq 1001b
|
|
.endm
|
|
|
|
.macro busyuart, rd, rx
|
|
1002: ldr \rd, [\rx, #UART_IR_REG]
|
|
tst \rd, #(1 << UART_IR_TXTRESH)
|
|
beq 1002b
|
|
.endm
|