diff mbox series

[v2,1/3] xen/arm: Add Amlogic Meson SoCs earlyprintk support

Message ID 1553163935-12862-1-git-send-email-amittomer25@gmail.com (mailing list archive)
State Superseded
Headers show
Series [v2,1/3] xen/arm: Add Amlogic Meson SoCs earlyprintk support | expand

Commit Message

Amit Tomer March 21, 2019, 10:25 a.m. UTC
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
TODO:
        * Capture XEN boot info on WIKI.

Changes since v1:

        * Fixed coding style issue.
        * Undone changes in early-printk.txt.

Changes since RFC:

        * Replaced LDRH with LDR, with this there
          is no scattered output on console now.
        * Used tbnz instead of tst and b.ne.
        * Used AML_ prefix against register names.
---
 xen/arch/arm/arm64/debug-meson.inc | 51 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 xen/arch/arm/arm64/debug-meson.inc

Comments

Julien Grall April 2, 2019, 10:05 a.m. UTC | #1
Hi,

You don't have a cover letter, so I will comment here. I will leave Andre 
reviewing the patch series.

In the future, please include a cover letter if you send more than one patch 
together.

On 21/03/2019 10:25, Amit Singh Tomar wrote:

As I pointed out on v2, you are missing the commit message. Please read what I 
wrote in v2 to know what you need to write here.

> Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>

Cheers,
Andre Przywara April 2, 2019, 8 p.m. UTC | #2
On 21/03/2019 10:25, Amit Singh Tomar wrote:
> Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>

Apart from the missing commit message:

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre.

> ---
> TODO:
>         * Capture XEN boot info on WIKI.
> 
> Changes since v1:
> 
>         * Fixed coding style issue.
>         * Undone changes in early-printk.txt.
> 
> Changes since RFC:
> 
>         * Replaced LDRH with LDR, with this there
>           is no scattered output on console now.
>         * Used tbnz instead of tst and b.ne.
>         * Used AML_ prefix against register names.
> ---
>  xen/arch/arm/arm64/debug-meson.inc | 51 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 51 insertions(+)
>  create mode 100644 xen/arch/arm/arm64/debug-meson.inc
> 
> diff --git a/xen/arch/arm/arm64/debug-meson.inc b/xen/arch/arm/arm64/debug-meson.inc
> new file mode 100644
> index 0000000..01b70f0
> --- /dev/null
> +++ b/xen/arch/arm/arm64/debug-meson.inc
> @@ -0,0 +1,51 @@
> +/*
> + * xen/arch/arm/arm64/debug-meson.inc
> + *
> + * MESON specific debug code.
> + *
> + * Copyright (c) 2019, Amit Singh Tomar <amittomer25@gmail.com>.
> + *
> + * 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 AML_UART_WFIFO_REG      0x00
> +#define AML_UART_STATUS_REG     0x0c
> +
> +#define AML_UART_TX_FIFO_FULL   21
> +
> +/*
> + * 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:
> +        ldr     w\c, [\xb, #AML_UART_STATUS_REG]        /* status register */
> +        tbnz    w\c, #AML_UART_TX_FIFO_FULL, 1b         /* Check TXFIFO FULL bit */
> +.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
> +        str    \wt, [\xb, #AML_UART_WFIFO_REG]
> +.endm
> +
> +/*
> + * Local variables:
> + * mode: ASM
> + * indent-tabs-mode: nil
> + * End:
> + */
>
diff mbox series

Patch

diff --git a/xen/arch/arm/arm64/debug-meson.inc b/xen/arch/arm/arm64/debug-meson.inc
new file mode 100644
index 0000000..01b70f0
--- /dev/null
+++ b/xen/arch/arm/arm64/debug-meson.inc
@@ -0,0 +1,51 @@ 
+/*
+ * xen/arch/arm/arm64/debug-meson.inc
+ *
+ * MESON specific debug code.
+ *
+ * Copyright (c) 2019, Amit Singh Tomar <amittomer25@gmail.com>.
+ *
+ * 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 AML_UART_WFIFO_REG      0x00
+#define AML_UART_STATUS_REG     0x0c
+
+#define AML_UART_TX_FIFO_FULL   21
+
+/*
+ * 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:
+        ldr     w\c, [\xb, #AML_UART_STATUS_REG]        /* status register */
+        tbnz    w\c, #AML_UART_TX_FIFO_FULL, 1b         /* Check TXFIFO FULL bit */
+.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
+        str    \wt, [\xb, #AML_UART_WFIFO_REG]
+.endm
+
+/*
+ * Local variables:
+ * mode: ASM
+ * indent-tabs-mode: nil
+ * End:
+ */