diff mbox series

[12/26] x86: sysreset: Move priv/plat structs to headers

Message ID 20201219174018.1114146-11-sjg@chromium.org
State Accepted
Commit 6a2350f8c9d60f318b3ffff3231b4ca891957da4
Delegated to: Simon Glass
Headers show
Series dm: Preparation for enhanced of-platdata (part C) | expand

Commit Message

Simon Glass Dec. 19, 2020, 5:40 p.m. UTC
With the new of-platdata, these need to be available to dt_platdata.c
so must be in header files. Move them and add the dtd struct too.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/include/asm/sysreset.h | 18 ++++++++++++++++++
 drivers/sysreset/sysreset_x86.c |  5 +----
 2 files changed, 19 insertions(+), 4 deletions(-)
 create mode 100644 arch/x86/include/asm/sysreset.h

Comments

Andy Shevchenko Dec. 21, 2020, 11:38 a.m. UTC | #1
On Sat, Dec 19, 2020 at 10:40:04AM -0700, Simon Glass wrote:
> With the new of-platdata, these need to be available to dt_platdata.c
> so must be in header files. Move them and add the dtd struct too.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  arch/x86/include/asm/sysreset.h | 18 ++++++++++++++++++
>  drivers/sysreset/sysreset_x86.c |  5 +----
>  2 files changed, 19 insertions(+), 4 deletions(-)
>  create mode 100644 arch/x86/include/asm/sysreset.h
> 
> diff --git a/arch/x86/include/asm/sysreset.h b/arch/x86/include/asm/sysreset.h
> new file mode 100644
> index 00000000000..5e586f51c00
> --- /dev/null
> +++ b/arch/x86/include/asm/sysreset.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright 2020 Google LLC
> + */
> +#ifndef _X86_ASM_SYSRESET_H_
> +#define _X86_ASM_SYSRESET_H_
> +
> +#include <dt-structs.h>
> +
> +struct x86_sysreset_plat {
> +#if CONFIG_IS_ENABLED(OF_PLATDATA)
> +	struct dtd_x86_reset dtplat;
> +#endif
> +
> +	struct udevice *pch;
> +};
> +
> +#endif	/* _X86_ASM_SYSRESET_H_ */
> diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
> index 8f9970301e5..8042f3994fe 100644
> --- a/drivers/sysreset/sysreset_x86.c
> +++ b/drivers/sysreset/sysreset_x86.c
> @@ -13,10 +13,7 @@
>  #include <acpi/acpi_s3.h>
>  #include <asm/io.h>
>  #include <asm/processor.h>
> -
> -struct x86_sysreset_plat {
> -	struct udevice *pch;
> -};
> +#include <asm/sysreset.h>
>  
>  /*
>   * Power down the machine by using the power management sleep control
> -- 
> 2.29.2.684.gfbc64c5ab5-goog
>
Simon Glass Dec. 28, 2020, 4:26 p.m. UTC | #2
On Sat, Dec 19, 2020 at 10:40:04AM -0700, Simon Glass wrote:
> With the new of-platdata, these need to be available to dt_platdata.c
> so must be in header files. Move them and add the dtd struct too.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/x86/include/asm/sysreset.h | 18 ++++++++++++++++++
>  drivers/sysreset/sysreset_x86.c |  5 +----
>  2 files changed, 19 insertions(+), 4 deletions(-)
>  create mode 100644 arch/x86/include/asm/sysreset.h
>
Applied to u-boot-dm/next, thanks!
diff mbox series

Patch

diff --git a/arch/x86/include/asm/sysreset.h b/arch/x86/include/asm/sysreset.h
new file mode 100644
index 00000000000..5e586f51c00
--- /dev/null
+++ b/arch/x86/include/asm/sysreset.h
@@ -0,0 +1,18 @@ 
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Google LLC
+ */
+#ifndef _X86_ASM_SYSRESET_H_
+#define _X86_ASM_SYSRESET_H_
+
+#include <dt-structs.h>
+
+struct x86_sysreset_plat {
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+	struct dtd_x86_reset dtplat;
+#endif
+
+	struct udevice *pch;
+};
+
+#endif	/* _X86_ASM_SYSRESET_H_ */
diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
index 8f9970301e5..8042f3994fe 100644
--- a/drivers/sysreset/sysreset_x86.c
+++ b/drivers/sysreset/sysreset_x86.c
@@ -13,10 +13,7 @@ 
 #include <acpi/acpi_s3.h>
 #include <asm/io.h>
 #include <asm/processor.h>
-
-struct x86_sysreset_plat {
-	struct udevice *pch;
-};
+#include <asm/sysreset.h>
 
 /*
  * Power down the machine by using the power management sleep control