]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Move priv/plat structs for intel_common to headers
authorSimon Glass <sjg@chromium.org>
Sat, 19 Dec 2020 17:39:58 +0000 (10:39 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:24:41 +0000 (12:24 -0700)
With the new of-platdata, these need to be available to dt_platdata.c
so must be in header files. Move them.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/intel_common/itss.c
arch/x86/cpu/intel_common/p2sb.c
arch/x86/include/asm/itss.h
arch/x86/include/asm/p2sb.h [new file with mode: 0644]

index 6515d1f471fb5a31465770da1e9f5b9da000b6cd..ae4de4ca8c6c4bcb36e738db3312806203ff2adf 100644 (file)
 #include <spl.h>
 #include <asm/itss.h>
 
-struct itss_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
-       /* Put this first since driver model will copy the data here */
-       struct dtd_intel_itss dtplat;
-#endif
-};
-
-/* struct pmc_route - Routing for PMC to GPIO */
-struct pmc_route {
-       u32 pmc;
-       u32 gpio;
-};
-
-struct itss_priv {
-       struct pmc_route *route;
-       uint route_count;
-       u32 irq_snapshot[NUM_IPC_REGS];
-};
-
 static int set_polarity(struct udevice *dev, uint irq, bool active_low)
 {
        u32 mask;
index cb901f265e2df2fb7483d408d29e064610ab90e7..d73ae438bbb07f4de7c6f888d0c269c16fb5dca1 100644 (file)
 #include <log.h>
 #include <p2sb.h>
 #include <spl.h>
+#include <asm/p2sb.h>
 #include <asm/pci.h>
 #include <linux/bitops.h>
 
 #define PCH_P2SB_E0            0xe0
 #define HIDE_BIT               BIT(0)
 
-struct p2sb_plat {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
-       struct dtd_intel_p2sb dtplat;
-#endif
-       ulong mmio_base;
-       pci_dev_t bdf;
-};
-
 /* PCI config space registers */
 #define HPTC_OFFSET            0x60
 #define HPTC_ADDR_ENABLE_BIT   BIT(7)
index f7d32403849fac316286e08fdb4acced0b386ef7..6d4793277e675f03e3e9c17fcc33036b2845a2a2 100644 (file)
@@ -11,6 +11,8 @@
 #ifndef _ASM_ARCH_ITSS_H
 #define _ASM_ARCH_ITSS_H
 
+#include <irq.h>
+
 #define GPIO_IRQ_START 50
 #define GPIO_IRQ_END   ITSS_MAX_IRQ
 
 /* ITSS Power reduction control */
 #define PCR_ITSS_ITSSPRC       0x3300
 
+struct itss_plat {
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+       /* Put this first since driver model will copy the data here */
+       struct dtd_intel_itss dtplat;
+#endif
+};
+
+/* struct pmc_route - Routing for PMC to GPIO */
+struct pmc_route {
+       u32 pmc;
+       u32 gpio;
+};
+
+struct itss_priv {
+       struct pmc_route *route;
+       uint route_count;
+       u32 irq_snapshot[NUM_IPC_REGS];
+};
+
 #endif /* _ASM_ARCH_ITSS_H */
diff --git a/arch/x86/include/asm/p2sb.h b/arch/x86/include/asm/p2sb.h
new file mode 100644 (file)
index 0000000..6f63eae
--- /dev/null
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Google LLC
+ */
+
+#ifndef ASM_P2SB_H
+#define ASM_P2SB_H
+
+/* Platform data for the P2SB */
+struct p2sb_plat {
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+       struct dtd_intel_p2sb dtplat;
+#endif
+       ulong mmio_base;
+       pci_dev_t bdf;
+};
+
+#endif /* ASM_P2SB_H */