Tegra UART is 8250 compatible.

Signed-off-by: Ralf Ramsauer <[email protected]>
---
 hypervisor/arch/arm/Kbuild                        |  1 -
 hypervisor/arch/arm/include/asm/uart-tegra.h      | 39 -----------------------
 hypervisor/arch/arm/uart-tegra.c                  | 24 --------------
 inmates/lib/arm/Makefile                          |  1 -
 inmates/lib/arm/include/mach-tegra124/mach/uart.h |  5 +++
 5 files changed, 5 insertions(+), 65 deletions(-)
 delete mode 100644 hypervisor/arch/arm/include/asm/uart-tegra.h
 delete mode 100644 hypervisor/arch/arm/uart-tegra.c

diff --git a/hypervisor/arch/arm/Kbuild b/hypervisor/arch/arm/Kbuild
index f0afd10c38..8da3e42559 100644
--- a/hypervisor/arch/arm/Kbuild
+++ b/hypervisor/arch/arm/Kbuild
@@ -21,5 +21,4 @@ obj-y += entry.o exception.o setup.o control.o traps.o mmio.o 
lib.o
 obj-y += mmu_hyp.o caches.o mach-stubs.o
 
 obj-$(CONFIG_ARM_GIC_V3) += gic-v3.o
-obj-$(CONFIG_SERIAL_TEGRA) += uart-tegra.o
 obj-$(CONFIG_MACH_VEXPRESS) += mach-vexpress.o
diff --git a/hypervisor/arch/arm/include/asm/uart-tegra.h 
b/hypervisor/arch/arm/include/asm/uart-tegra.h
deleted file mode 100644
index bedface517..0000000000
--- a/hypervisor/arch/arm/include/asm/uart-tegra.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Jailhouse, a Linux-based partitioning hypervisor
- *
- * Copyright (c) Siemens AG, 2015
- *
- * Authors:
- *  Jan Kiszka <[email protected]>
- *
- * This work is licensed under the terms of the GNU GPL, version 2.  See
- * the COPYING file in the top-level directory.
- */
-
-#include <jailhouse/mmio.h>
-#include <jailhouse/processor.h>
-#include <asm/uart.h>
-
-#define UART_TX                        0x0
-#define UART_DLL               0x0
-#define UART_DLM               0x4
-#define UART_LCR               0xc
-#define  UART_LCR_8N1          0x03
-#define  UART_LCR_DLAB         0x80
-#define UART_LSR               0x14
-#define  UART_LSR_THRE         0x20
-
-static void uart_init(struct uart_chip *chip)
-{
-}
-
-static void uart_wait(struct uart_chip *chip)
-{
-       while (!(mmio_read32(chip->virt_base + UART_LSR) & UART_LSR_THRE))
-               cpu_relax();
-}
-
-static void uart_write(struct uart_chip *chip, char c)
-{
-       mmio_write32(chip->virt_base + UART_TX, c);
-}
diff --git a/hypervisor/arch/arm/uart-tegra.c b/hypervisor/arch/arm/uart-tegra.c
deleted file mode 100644
index 504631e423..0000000000
--- a/hypervisor/arch/arm/uart-tegra.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Jailhouse, a Linux-based partitioning hypervisor
- *
- * Copyright (c) ARM Limited, 2014
- * Copyright (c) Siemens AG, 2014, 2015
- *
- * Authors:
- *  Jean-Philippe Brucker <[email protected]>
- *  Jan Kiszka <[email protected]>
- *
- * This work is licensed under the terms of the GNU GPL, version 2.  See
- * the COPYING file in the top-level directory.
- */
-
-#include <asm/uart-tegra.h>
-
-/* All the helpers are in the header, to make them re-usable by the inmates */
-void uart_chip_init(struct uart_chip *chip)
-{
-       chip->wait = uart_wait;
-       chip->write = uart_write;
-
-       uart_init(chip);
-}
diff --git a/inmates/lib/arm/Makefile b/inmates/lib/arm/Makefile
index 732948b805..620b95d7c9 100644
--- a/inmates/lib/arm/Makefile
+++ b/inmates/lib/arm/Makefile
@@ -22,4 +22,3 @@ lib-$(CONFIG_ARM_GIC_V2)      += gic-v2.o
 lib-$(CONFIG_ARM_GIC_V3)       += gic-v3.o
 lib-$(CONFIG_SERIAL_AMBA_PL011)        += uart-pl011.o
 lib-$(CONFIG_SERIAL_8250)      += uart-8250.o
-lib-$(CONFIG_SERIAL_TEGRA)     += uart-8250.o
diff --git a/inmates/lib/arm/include/mach-tegra124/mach/uart.h 
b/inmates/lib/arm/include/mach-tegra124/mach/uart.h
index ce23468046..75aaa68377 100644
--- a/inmates/lib/arm/include/mach-tegra124/mach/uart.h
+++ b/inmates/lib/arm/include/mach-tegra124/mach/uart.h
@@ -11,3 +11,8 @@
  */
 
 #define UART_BASE      ((void *)0x70006300)
+
+/* Do not enable the clock in the inmate, as enabling the clock requires access
+ * to the tegra-car (Clock and Reset Controller) */
+#define UART_CLOCK_REG  ((void *)0)
+#define UART_GATE_NR    0
-- 
2.11.0.rc2

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to