diff mbox series

[v2,32/44] pmc: Move common registers to the header file

Message ID 20200707213233.v2.32.Idff8b7c7b8504c20481771fe39c10976df3e4f5d@changeid
State Accepted
Commit 11e27ae92b1b7596a2ad5755be119c14e68895ac
Delegated to: Bin Meng
Headers show
Series x86: Programmatic generation of ACPI tables (Part C) | expand

Commit Message

Simon Glass July 8, 2020, 3:32 a.m. UTC
These registers need to be accesses from ACPI code, so move them to the
header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
---

(no changes since v1)

 drivers/power/acpi_pmc/acpi-pmc-uclass.c |  9 ---------
 include/power/acpi_pmc.h                 | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 9 deletions(-)

Comments

Bin Meng July 13, 2020, 5:58 a.m. UTC | #1
On Wed, Jul 8, 2020 at 11:34 AM Simon Glass <sjg@chromium.org> wrote:
>
> These registers need to be accesses from ACPI code, so move them to the
> header file.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
> ---
>
> (no changes since v1)
>
>  drivers/power/acpi_pmc/acpi-pmc-uclass.c |  9 ---------
>  include/power/acpi_pmc.h                 | 14 ++++++++++++++
>  2 files changed, 14 insertions(+), 9 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

diff --git a/drivers/power/acpi_pmc/acpi-pmc-uclass.c b/drivers/power/acpi_pmc/acpi-pmc-uclass.c
index 1c79f835c6..828963d8a0 100644
--- a/drivers/power/acpi_pmc/acpi-pmc-uclass.c
+++ b/drivers/power/acpi_pmc/acpi-pmc-uclass.c
@@ -15,15 +15,6 @@ 
 #include <asm/io.h>
 #include <power/acpi_pmc.h>
 
-enum {
-	PM1_STS		= 0x00,
-	PM1_EN		= 0x02,
-	PM1_CNT		= 0x04,
-
-	GPE0_STS	= 0x20,
-	GPE0_EN		= 0x30,
-};
-
 struct tco_regs {
 	u32 tco_rld;
 	u32 tco_sts;
diff --git a/include/power/acpi_pmc.h b/include/power/acpi_pmc.h
index 1f50c23f5f..5fbf745136 100644
--- a/include/power/acpi_pmc.h
+++ b/include/power/acpi_pmc.h
@@ -6,10 +6,22 @@ 
 #ifndef __ACPI_PMC_H
 #define __ACPI_PMC_H
 
+#ifndef __ACPI__
+
 enum {
 	GPE0_REG_MAX	= 4,
 };
 
+enum {
+	PM1_STS		= 0x00,
+	PM1_EN		= 0x02,
+	PM1_CNT		= 0x04,
+	PM1_TMR		= 0x08,
+
+	GPE0_STS	= 0x20,
+	GPE0_EN		= 0x30,
+};
+
 /**
  * struct acpi_pmc_upriv - holds common data for the x86 PMC
  *
@@ -182,4 +194,6 @@  void pmc_dump_info(struct udevice *dev);
  */
 int pmc_gpe_init(struct udevice *dev);
 
+#endif /* !__ACPI__ */
+
 #endif