]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: serial: Move priv into a header file
authorSimon Glass <sjg@chromium.org>
Sat, 19 Dec 2020 17:39:53 +0000 (10:39 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:24:41 +0000 (12:24 -0700)
Move this struct into a header file so that dtoc can include it in its
dt-platdata.c file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
arch/sandbox/include/asm/serial.h [new file with mode: 0644]
drivers/serial/sandbox.c

diff --git a/arch/sandbox/include/asm/serial.h b/arch/sandbox/include/asm/serial.h
new file mode 100644 (file)
index 0000000..bc82aeb
--- /dev/null
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Google LLC
+ * Written by Simon Glass <sjg@chromium.org>
+ */
+
+#ifndef __asm_serial_h
+#define __asm_serial_h
+
+#include <dt-structs.h>
+
+struct sandbox_serial_plat {
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+       struct dtd_sandbox_serial dtplat;
+#endif
+       int colour;     /* Text colour to use for output, -1 for none */
+};
+
+/**
+ * struct sandbox_serial_priv - Private data for this driver
+ *
+ * @buf: holds input characters available to be read by this driver
+ */
+struct sandbox_serial_priv {
+       struct membuff buf;
+       char serial_buf[16];
+       bool start_of_line;
+};
+
+#endif /* __asm_serial_h */
index a05c56458b05c5aac0d0d25c74515207c262a560..19368ba256030d995b7c1b72950b785989084dcb 100644 (file)
 #include <serial.h>
 #include <video.h>
 #include <linux/compiler.h>
+#include <asm/serial.h>
 #include <asm/state.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-struct sandbox_serial_plat {
-       int colour;     /* Text colour to use for output, -1 for none */
-};
-
-/**
- * struct sandbox_serial_priv - Private data for this driver
- *
- * @buf: holds input characters available to be read by this driver
- */
-struct sandbox_serial_priv {
-       struct membuff buf;
-       char serial_buf[16];
-       bool start_of_line;
-};
-
 /**
  * output_ansi_colour() - Output an ANSI colour code
  *