|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 1/2] xen/arm: Add Amlogic S905 SoC early printk support
Hi Amit, On 07/08/18 18:07, Amit Singh Tomar wrote: I would prefer if no new alias are added. The same could be achieved with CONFIG_EARLY_PRINTK=meson,0xc81004c0. This could be documented on the wiki. Cheers, EARLY_PRINTK_mvebu := mvebu,0xd0012000 EARLY_PRINTK_omap5432 := 8250,0x48020000,2 EARLY_PRINTK_rcar3 := scif,0xe6e88000 diff --git a/xen/arch/arm/arm64/debug-meson.inc b/xen/arch/arm/arm64/debug-meson.inc new file mode 100644 index 0000000..d5507d3 --- /dev/null +++ b/xen/arch/arm/arm64/debug-meson.inc @@ -0,0 +1,50 @@ +/* + * xen/arch/arm/arm64/debug-meson.inc + * + * MESON specific debug code. + * + * Copyright (c) 2018, Amit Singh Tomar <amittomer25@xxxxxxxxx>. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms and conditions of the GNU General Public + * License, version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; If not, see <http://www.gnu.org/licenses/>. + */ + +#define UART_STATUS_REG 0x0c +#define UART_TX_REG 0x00 I would prefer if we stick with the spec name. So UART_TX_REG should be renamed UART_WFIFO_REG. Also, it might be worth considering to prefix them with AML_ so it is easy to find them on lookup. + Looking at the earlyconsole implementation in Linux, it seems that TX needs to be enabled first (see meson_uart_enable_tx_engine). Is it now done in the firmware? +/* + * MESON UART wait UART to be ready to transmit + * xb: register which contains the UART base address + * c: scratch register + */ +.macro early_uart_ready xb c +1: + ldrh w\c, [\xb, #UART_STATUS_REG] /* status register */ + tst w\c, #(1 << 21) /* Check TXFIFO FULL bit */ Please define 1 << 21 rather than hardcoding it. + b.ne 1b /* Wait for the UART to be ready */ +.endm + +/* + * MESON UART transmit character + * xb: register which contains the UART base address + * wt: register which contains the character to transmit + */ +.macro early_uart_transmit xb wt + strb \wt, [\xb, #UART_TX_REG] +.endm + +/* + * Local variables: + * mode: ASM + * indent-tabs-mode: nil + * End: + */ Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |