[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 08/16] arm/vuart: move simple MMIO-based vUART declarations to common header



From: Denis Mukhin <dmukhin@xxxxxxxx> 

Merge arch/arm/vuart.h with include/xen/vuart.h.

No functional change.

Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
---
 xen/arch/arm/domain.c   |  1 -
 xen/arch/arm/vuart.c    |  3 +--
 xen/arch/arm/vuart.h    | 54 -----------------------------------------
 xen/include/xen/vuart.h | 20 +++++++++++++++
 4 files changed, 21 insertions(+), 57 deletions(-)
 delete mode 100644 xen/arch/arm/vuart.h

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 68297e619bad..3579d10d7e1d 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -31,7 +31,6 @@
 #include <asm/vtimer.h>
 
 #include "vpci.h"
-#include "vuart.h"
 
 DEFINE_PER_CPU(struct vcpu *, curr_vcpu);
 
diff --git a/xen/arch/arm/vuart.c b/xen/arch/arm/vuart.c
index bd2f425214b7..5403ed284846 100644
--- a/xen/arch/arm/vuart.c
+++ b/xen/arch/arm/vuart.c
@@ -28,8 +28,7 @@
 #include <xen/serial.h>
 #include <asm/mmio.h>
 #include <xen/perfc.h>
-
-#include "vuart.h"
+#include <xen/vuart.h>
 
 #define domain_has_vuart(d) ((d)->arch.vuart.info != NULL)
 
diff --git a/xen/arch/arm/vuart.h b/xen/arch/arm/vuart.h
deleted file mode 100644
index 726846355c3b..000000000000
--- a/xen/arch/arm/vuart.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * xen/arch/arm/vuart.h
- *
- * Virtual UART Emulation Support
- *
- * Ian Campbell <ian.campbell@xxxxxxxxxx>
- * Copyright (c) 2012 Citrix Systems.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- */
-
-#ifndef __ARCH_ARM_VUART_H__
-#define __ARCH_ARM_VUART_H__
-
-struct domain;
-
-#ifdef CONFIG_HAS_VUART_MMIO
-
-int domain_vuart_init(struct domain *d);
-void domain_vuart_free(struct domain *d);
-
-#else
-
-static inline int domain_vuart_init(struct domain *d)
-{
-    /*
-     * The vUART is unconditionally inialized for the hw domain. So we
-     * can't return an error.
-     */
-    return 0;
-}
-
-static inline void domain_vuart_free(struct domain *d) {};
-
-#endif /* CONFIG_HAS_VUART_MMIO */
-
-#endif /* __ARCH_ARM_VUART_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/include/xen/vuart.h b/xen/include/xen/vuart.h
index cae72ac9c6b9..928b60bbb4e2 100644
--- a/xen/include/xen/vuart.h
+++ b/xen/include/xen/vuart.h
@@ -43,6 +43,26 @@ static inline int vuart_putchar(struct domain *d, char c)
 
 #endif /* CONFIG_HAS_VUART_PL011 */
 
+#ifdef CONFIG_HAS_VUART_MMIO
+
+int domain_vuart_init(struct domain *d);
+void domain_vuart_free(struct domain *d);
+
+#else
+
+static inline int domain_vuart_init(struct domain *d)
+{
+    /*
+     * The vUART is unconditionally inialized for the hw domain. So we
+     * can't return an error.
+     */
+    return 0;
+}
+
+static inline void domain_vuart_free(struct domain *d) {};
+
+#endif /* CONFIG_HAS_VUART_MMIO */
+
 #endif /* XEN_VUART_H */
 
 /*
-- 
2.34.1





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.