From: Denis Mukhin <dmukhin@ford.com>
Make all PL011 emulator declarations private to emulator's code.
No functional change.
Signed-off-by: Denis Mukhin <dmukhin@ford.com>
---
xen/arch/arm/include/asm/vpl011.h | 67 -------------------------------
xen/arch/arm/vpl011.c | 39 ++++++++++++++++--
2 files changed, 35 insertions(+), 71 deletions(-)
delete mode 100644 xen/arch/arm/include/asm/vpl011.h
diff --git a/xen/arch/arm/include/asm/vpl011.h b/xen/arch/arm/include/asm/vpl011.h
deleted file mode 100644
index 8f6ea0005e72..000000000000
--- a/xen/arch/arm/include/asm/vpl011.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * include/xen/vpl011.h
- *
- * Virtual PL011 UART
- *
- * 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 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/>.
- */
-
-#ifndef _VPL011_H_
-#define _VPL011_H_
-
-#include <public/domctl.h>
-#include <public/io/ring.h>
-#include <public/io/console.h>
-#include <xen/mm.h>
-
-#define SBSA_UART_FIFO_SIZE 32
-/* Same size as VUART_BUF_SIZE, used in vuart.c */
-#define SBSA_UART_OUT_BUF_SIZE 128
-struct vpl011_xen_backend {
- char in[SBSA_UART_FIFO_SIZE];
- char out[SBSA_UART_OUT_BUF_SIZE];
- XENCONS_RING_IDX in_cons, in_prod;
- XENCONS_RING_IDX out_prod;
-};
-
-struct vpl011 {
- bool backend_in_domain;
- union {
- struct {
- void *ring_buf;
- struct page_info *ring_page;
- } dom;
- struct vpl011_xen_backend *xen;
- } backend;
- uint32_t uartfr; /* Flag register */
- uint32_t uartcr; /* Control register */
- uint32_t uartimsc; /* Interrupt mask register*/
- uint32_t uarticr; /* Interrupt clear register */
- uint32_t uartris; /* Raw interrupt status register */
- uint32_t shadow_uartmis; /* shadow masked interrupt register */
- paddr_t base_addr;
- unsigned int virq;
- spinlock_t lock;
- evtchn_port_t evtchn;
-};
-
-#endif /* _VPL011_H_ */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/arch/arm/vpl011.c b/xen/arch/arm/vpl011.c
index 3c027ccf0b4e..bebfb5e0365c 100644
--- a/xen/arch/arm/vpl011.c
+++ b/xen/arch/arm/vpl011.c
@@ -7,9 +7,6 @@
#define XEN_WANT_FLEX_CONSOLE_RING 1
-/* We assume the PL011 default of "1/2 way" for the FIFO trigger level. */
-#define SBSA_UART_FIFO_LEVEL (SBSA_UART_FIFO_SIZE / 2)
-
#include <xen/errno.h>
#include <xen/event.h>
#include <xen/device_tree.h>
@@ -25,13 +22,47 @@
#include <xen/xvmalloc.h>
#include <public/domctl.h>
#include <public/io/console.h>
+#include <public/io/ring.h>
#include <asm/domain_build.h>
#include <asm/kernel.h>
#include <asm/pl011-uart.h>
#include <asm/vgic-emul.h>
-#include <asm/vpl011.h>
#include <asm/vreg.h>
+#define SBSA_UART_FIFO_SIZE 32
+/* Same size as VUART_BUF_SIZE, used in simple MMIO-based vUART */
+#define SBSA_UART_OUT_BUF_SIZE 128
+/* We assume the PL011 default of "1/2 way" for the FIFO trigger level. */
+#define SBSA_UART_FIFO_LEVEL (SBSA_UART_FIFO_SIZE / 2)
+
+struct vpl011_xen_backend {
+ char in[SBSA_UART_FIFO_SIZE];
+ char out[SBSA_UART_OUT_BUF_SIZE];
+ XENCONS_RING_IDX in_cons, in_prod;
+ XENCONS_RING_IDX out_prod;
+};
+
+struct vpl011 {
+ bool backend_in_domain;
+ union {
+ struct {
+ void *ring_buf;
+ struct page_info *ring_page;
+ } dom;
+ struct vpl011_xen_backend *xen;
+ } backend;
+ uint32_t uartfr; /* Flag register */
+ uint32_t uartcr; /* Control register */
+ uint32_t uartimsc; /* Interrupt mask register*/
+ uint32_t uarticr; /* Interrupt clear register */
+ uint32_t uartris; /* Raw interrupt status register */
+ uint32_t shadow_uartmis; /* shadow masked interrupt register */
+ paddr_t base_addr;
+ unsigned int virq;
+ spinlock_t lock;
+ evtchn_port_t evtchn;
+};
+
static void __vpl011_exit(struct vpl011 *vpl011, struct domain *d)
{
if ( vpl011->virq )
--
2.34.1