Skip to contentSkip to conversation

platform/x86: intel_scu: Move headers to x86 subfolder

PATCH In review Andy Shevchenko 2 participants 6 messages Sep 9, 2024 – Sep 11, 2024

Subsystems (12)
lore
Share & tools
lore
#0 lore raw

v2 cover platform/x86: intel_scu: Move headers to x86 subfolder

Add the record to the MAINTAINERS to follow what is going on with the Intel MID platform related code and drivers.

With that, clean up a bit a couple of headers, i.e. move them to x86 subfolder of include/linux/platform_data where they belong to.

No functional changes intended.

Taking into account nature of this change it's supposed to go via PDx86 tree, please Ack.

v2:
- Maintained --> Supported (Dave)
- added two cleanup patches (Mika and me)

Andy Shevchenko (2):
MAINTAINERS: Add Intel MID section
platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to x86 subfolder

Mika Westerberg (1):
platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of
arch/x86/include/asm

 MAINTAINERS                                   | 20 ++++++++++++++++++-
 arch/x86/include/asm/intel_telemetry.h        |  2 +-
 arch/x86/platform/intel-mid/intel-mid.c       |  3 ++-
 drivers/mfd/intel_pmc_bxt.c                   |  3 +--
 drivers/mfd/intel_soc_pmic_bxtwc.c            |  3 +--
 drivers/mfd/intel_soc_pmic_mrfld.c            |  3 +--
 drivers/platform/x86/intel_scu_ipc.c          |  2 +-
 drivers/platform/x86/intel_scu_ipcutil.c      |  2 +-
 drivers/platform/x86/intel_scu_pcidrv.c       |  2 +-
 drivers/platform/x86/intel_scu_pltdrv.c       |  2 +-
 drivers/platform/x86/intel_scu_wdt.c          |  3 ++-
 drivers/usb/typec/mux/intel_pmc_mux.c         |  3 +--
 drivers/watchdog/intel-mid_wdt.c              |  5 ++---
 .../platform_data/{ => x86}/intel-mid_wdt.h   |  6 +++---
 .../linux/platform_data/x86}/intel_scu_ipc.h  |  4 ++--
 15 files changed, 39 insertions(+), 24 deletions(-)
 rename include/linux/platform_data/{ => x86}/intel-mid_wdt.h (74%)
 rename {arch/x86/include/asm => include/linux/platform_data/x86}/intel_scu_ipc.h (96%)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#1 lore raw

PATCH v2 1/3 MAINTAINERS: Add Intel MID section

The different drivers are spread over the kernel. I would like to be informed about the changes in them, which are done not by me. Also, most of them I indeed support.

---
 MAINTAINERS | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
MAINTAINERS +18 -0
index 10430778c998..61c74ae39961 100644
@@ -11477,6 +11477,24 @@ S:	Maintained
 F:	Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-sec-update
 F:	drivers/fpga/intel-m10-bmc-sec-update.c
 
+INTEL MID (Mobile Internet Device) PLATFORM
+M:	Andy Shevchenko <[email protected]>
+L:	[email protected]
+S:	Supported
+F:	arch/x86/include/asm/intel-mid.h
+F:	arch/x86/include/asm/intel_scu_ipc.h
+F:	arch/x86/pci/intel_mid_pci.c
+F:	arch/x86/platform/intel-mid/
+F:	drivers/extcon/extcon-intel-mrfld.c
+F:	drivers/iio/adc/intel_mrfld_adc.c
+F:	drivers/mfd/intel_soc_pmic_mrfld.c
+F:	drivers/platform/x86/intel/mrfld_pwrbtn.c
+F:	drivers/platform/x86/intel_scu_*
+F:	drivers/staging/media/atomisp/
+F:	drivers/watchdog/intel-mid_wdt.c
+F:	include/linux/mfd/intel_soc_pmic_mrfld.h
+F:	include/linux/platform_data/intel-mid_wdt.h
+
 INTEL P-Unit IPC DRIVER
 M:	Zha Qipeng <[email protected]>
 L:	[email protected]
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#2 lore raw

PATCH v2 2/3 platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm

In reply to Andy Shevchenko

From: Mika Westerberg <[email protected]>

This is a platform/x86 library that is mostly being used by other drivers not directly under arch/x86 anyway (with the exception of the Intel MID setup code) so it makes sense that it lives under the platform_data/x86/ directory instead.

No functional changes intented.

---
 MAINTAINERS                                                   | 4 ++--
 arch/x86/include/asm/intel_telemetry.h                        | 2 +-
 arch/x86/platform/intel-mid/intel-mid.c                       | 3 ++-
 drivers/mfd/intel_pmc_bxt.c                                   | 3 +--
 drivers/mfd/intel_soc_pmic_bxtwc.c                            | 3 +--
 drivers/mfd/intel_soc_pmic_mrfld.c                            | 3 +--
 drivers/platform/x86/intel_scu_ipc.c                          | 2 +-
 drivers/platform/x86/intel_scu_ipcutil.c                      | 2 +-
 drivers/platform/x86/intel_scu_pcidrv.c                       | 2 +-
 drivers/platform/x86/intel_scu_pltdrv.c                       | 2 +-
 drivers/usb/typec/mux/intel_pmc_mux.c                         | 3 +--
 drivers/watchdog/intel-mid_wdt.c                              | 3 +--
 .../asm => include/linux/platform_data/x86}/intel_scu_ipc.h   | 4 ++--
 13 files changed, 16 insertions(+), 20 deletions(-)
 rename {arch/x86/include/asm => include/linux/platform_data/x86}/intel_scu_ipc.h (96%)
MAINTAINERS +2 -2
index 61c74ae39961..802e6c957154 100644
@@ -11482,7 +11482,6 @@ M:	Andy Shevchenko <[email protected]>
 L:	[email protected]
 S:	Supported
 F:	arch/x86/include/asm/intel-mid.h
-F:	arch/x86/include/asm/intel_scu_ipc.h
 F:	arch/x86/pci/intel_mid_pci.c
 F:	arch/x86/platform/intel-mid/
 F:	drivers/extcon/extcon-intel-mrfld.c
@@ -11494,6 +11493,7 @@ F:	drivers/staging/media/atomisp/
 F:	drivers/watchdog/intel-mid_wdt.c
 F:	include/linux/mfd/intel_soc_pmic_mrfld.h
 F:	include/linux/platform_data/intel-mid_wdt.h
+F:	include/linux/platform_data/x86/intel_scu_ipc.h
 
 INTEL P-Unit IPC DRIVER
 M:	Zha Qipeng <[email protected]>
@@ -11557,8 +11557,8 @@ F:	drivers/counter/intel-qep.c
 INTEL SCU DRIVERS
 M:	Mika Westerberg <[email protected]>
 S:	Maintained
-F:	arch/x86/include/asm/intel_scu_ipc.h
 F:	drivers/platform/x86/intel_scu_*
+F:	include/linux/platform_data/x86/intel_scu_ipc.h
 
 INTEL SDSI DRIVER
 M:	David E. Box <[email protected]>
arch/x86/include/asm/intel_telemetry.h +1 -1
index 8046e70dfd7c..43b7657febca 100644
@@ -10,7 +10,7 @@
 #define TELEM_MAX_EVENTS_SRAM		28
 #define TELEM_MAX_OS_ALLOCATED_EVENTS	20
 
-#include <asm/intel_scu_ipc.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 
 enum telemetry_unit {
 	TELEM_PSS = 0,
arch/x86/platform/intel-mid/intel-mid.c +2 -1
index f83bbe0acd4a..a8e75f8c14fd 100644
@@ -27,9 +27,10 @@
 #include <asm/intel-mid.h>
 #include <asm/io.h>
 #include <asm/i8259.h>
-#include <asm/intel_scu_ipc.h>
 #include <asm/reboot.h>
 
+#include <linux/platform_data/x86/intel_scu_ipc.h>
+
 #define IPCMSG_COLD_OFF		0x80	/* Only for Tangier */
 #define IPCMSG_COLD_RESET	0xF1
 
drivers/mfd/intel_pmc_bxt.c +1 -2
index 9f01d38acc7f..e405d7513ca1 100644
@@ -23,8 +23,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/itco_wdt.h>
-
-#include <asm/intel_scu_ipc.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 
 /* Residency with clock rate at 19.2MHz to usecs */
 #define S0IX_RESIDENCY_IN_USECS(d, s)		\
drivers/mfd/intel_soc_pmic_bxtwc.c +1 -2
index ba32cacfc499..ab3c94224dd1 100644
@@ -15,8 +15,7 @@
 #include <linux/mfd/intel_soc_pmic.h>
 #include <linux/mfd/intel_soc_pmic_bxtwc.h>
 #include <linux/module.h>
-
-#include <asm/intel_scu_ipc.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 
 /* PMIC device registers */
 #define REG_ADDR_MASK		GENMASK(15, 8)
drivers/mfd/intel_soc_pmic_mrfld.c +1 -2
index 71da861e8c27..77121775c1a3 100644
@@ -12,11 +12,10 @@
 #include <linux/mfd/intel_soc_pmic.h>
 #include <linux/mfd/intel_soc_pmic_mrfld.h>
 #include <linux/module.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
-#include <asm/intel_scu_ipc.h>
-
 /*
  * Level 2 IRQs
  *
drivers/platform/x86/intel_scu_ipc.c +1 -1
index a68df4133403..5b16d29c93d7 100644
@@ -23,7 +23,7 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 
-#include <asm/intel_scu_ipc.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 
 /* IPC defines the following message types */
 #define IPCMSG_PCNTRL         0xff /* Power controller unit read/write */
drivers/platform/x86/intel_scu_ipcutil.c +1 -1
index 7d87cbd4b9c6..69b36ce41fa2 100644
@@ -18,7 +18,7 @@
 #include <linux/types.h>
 #include <linux/uaccess.h>
 
-#include <asm/intel_scu_ipc.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 
 static int major;
 
drivers/platform/x86/intel_scu_pcidrv.c +1 -1
index dbf0310448da..d7f72d6deb44 100644
@@ -11,7 +11,7 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 
-#include <asm/intel_scu_ipc.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 
 static int intel_scu_pci_probe(struct pci_dev *pdev,
 			       const struct pci_device_id *id)
drivers/platform/x86/intel_scu_pltdrv.c +1 -1
index 56ec6ae4c824..0892362acd7b 100644
@@ -15,7 +15,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 
-#include <asm/intel_scu_ipc.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 
 static int intel_scu_platform_probe(struct platform_device *pdev)
 {
drivers/usb/typec/mux/intel_pmc_mux.c +1 -2
index 56989a0d0f43..46b4c5c3a6be 100644
@@ -8,6 +8,7 @@
 
 #include <linux/acpi.h>
 #include <linux/module.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
 #include <linux/usb/pd.h>
@@ -18,8 +19,6 @@
 #include <linux/debugfs.h>
 #include <linux/usb.h>
 
-#include <asm/intel_scu_ipc.h>
-
 #define PMC_USBC_CMD		0xa7
 
 /* Response status bits */
drivers/watchdog/intel-mid_wdt.c +1 -2
index 8d71f6a2236b..91c9c3950e44 100644
@@ -21,8 +21,7 @@
 #include <linux/watchdog.h>
 
 #include <linux/platform_data/intel-mid_wdt.h>
-
-#include <asm/intel_scu_ipc.h>
+#include <linux/platform_data/x86/intel_scu_ipc.h>
 
 #define IPC_WATCHDOG 0xf8
 
include/linux/platform_data/x86/intel_scu_ipc.h renamed from arch/x86/include/asm/intel_scu_ipc.h +2 -2
similarity index 96%
rename from arch/x86/include/asm/intel_scu_ipc.h
rename to include/linux/platform_data/x86/intel_scu_ipc.h
index 8537f597d20a..0ca9962e97f2 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_X86_INTEL_SCU_IPC_H_
-#define  _ASM_X86_INTEL_SCU_IPC_H_
+#ifndef __PLATFORM_X86_INTEL_SCU_IPC_H_
+#define __PLATFORM_X86_INTEL_SCU_IPC_H_
 
 #include <linux/ioport.h>
 
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#3 lore raw

PATCH v2 3/3 platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to x86 subfolder

In reply to Andy Shevchenko

This is a platform/x86 library that can only be used on x86 devices. so it makes sense that it lives under the platform_data/x86/ directory instead.

No functional changes intented.

---
 drivers/platform/x86/intel_scu_wdt.c                  | 3 ++-
 drivers/watchdog/intel-mid_wdt.c                      | 2 +-
 include/linux/platform_data/{ => x86}/intel-mid_wdt.h | 6 +++---
 3 files changed, 6 insertions(+), 5 deletions(-)
 rename include/linux/platform_data/{ => x86}/intel-mid_wdt.h (74%)
drivers/platform/x86/intel_scu_wdt.c +2 -1
index d0b6637861d3..746d47d33406 100644
@@ -9,13 +9,14 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
-#include <linux/platform_data/intel-mid_wdt.h>
 
 #include <asm/cpu_device_id.h>
 #include <asm/intel-family.h>
 #include <asm/io_apic.h>
 #include <asm/hw_irq.h>
 
+#include <linux/platform_data/x86/intel-mid_wdt.h>
+
 #define TANGIER_EXT_TIMER0_MSI 12
 
 static struct platform_device wdt_dev = {
drivers/watchdog/intel-mid_wdt.c +1 -1
index 91c9c3950e44..756d262dc580 100644
@@ -20,7 +20,7 @@
 #include <linux/types.h>
 #include <linux/watchdog.h>
 
-#include <linux/platform_data/intel-mid_wdt.h>
+#include <linux/platform_data/x86/intel-mid_wdt.h>
 #include <linux/platform_data/x86/intel_scu_ipc.h>
 
 #define IPC_WATCHDOG 0xf8
include/linux/platform_data/x86/intel-mid_wdt.h renamed from include/linux/platform_data/intel-mid_wdt.h +3 -3
similarity index 74%
rename from include/linux/platform_data/intel-mid_wdt.h
rename to include/linux/platform_data/x86/intel-mid_wdt.h
index 8dba70b4b020..e5c0210d0fec 100644
@@ -6,8 +6,8 @@
  *      Contact: David Cohen <[email protected]>
  */
 
-#ifndef __INTEL_MID_WDT_H__
-#define __INTEL_MID_WDT_H__
+#ifndef __PLATFORM_X86_INTEL_MID_WDT_H_
+#define __PLATFORM_X86_INTEL_MID_WDT_H_
 
 #include <linux/platform_device.h>
 
@@ -16,4 +16,4 @@ struct intel_mid_wdt_pdata {
 	int (*probe)(struct platform_device *pdev);
 };
 
-#endif /*__INTEL_MID_WDT_H__*/
+#endif	/* __PLATFORM_X86_INTEL_MID_WDT_H_ */
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#4 lore raw
In reply to Andy Shevchenko

Hi,

Quoted 10 lines · Andy Shevchenko

Add the record to the MAINTAINERS to follow what is going on with the Intel MID platform related code and drivers.

With that, clean up a bit a couple of headers, i.e. move them to x86 subfolder of include/linux/platform_data where they belong to.

No functional changes intended.

Taking into account nature of this change it's supposed to go via PDx86 tree, please Ack.

Since the changes outside of drivers/platform/x86 are tiny and the merge window is close I've decided to take the series without waiting for acks:

Thank you for your patch-series, I've applied the series to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.

Regards,

Hans

Quoted 32 lines

v2:
- Maintained --> Supported (Dave)
- added two cleanup patches (Mika and me)

Andy Shevchenko (2):
MAINTAINERS: Add Intel MID section
platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to x86 subfolder

Mika Westerberg (1):
platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of
arch/x86/include/asm

 MAINTAINERS                                   | 20 ++++++++++++++++++-
 arch/x86/include/asm/intel_telemetry.h        |  2 +-
 arch/x86/platform/intel-mid/intel-mid.c       |  3 ++-
 drivers/mfd/intel_pmc_bxt.c                   |  3 +--
 drivers/mfd/intel_soc_pmic_bxtwc.c            |  3 +--
 drivers/mfd/intel_soc_pmic_mrfld.c            |  3 +--
 drivers/platform/x86/intel_scu_ipc.c          |  2 +-
 drivers/platform/x86/intel_scu_ipcutil.c      |  2 +-
 drivers/platform/x86/intel_scu_pcidrv.c       |  2 +-
 drivers/platform/x86/intel_scu_pltdrv.c       |  2 +-
 drivers/platform/x86/intel_scu_wdt.c          |  3 ++-
 drivers/usb/typec/mux/intel_pmc_mux.c         |  3 +--
 drivers/watchdog/intel-mid_wdt.c              |  5 ++---
 .../platform_data/{ => x86}/intel-mid_wdt.h   |  6 +++---
 .../linux/platform_data/x86}/intel_scu_ipc.h  |  4 ++--
 15 files changed, 39 insertions(+), 24 deletions(-)
 rename include/linux/platform_data/{ => x86}/intel-mid_wdt.h (74%)
 rename {arch/x86/include/asm => include/linux/platform_data/x86}/intel_scu_ipc.h (96%)
#5 lore raw
Quoted 7 lines · Hans de Goede
Quoted 6 lines · Andy Shevchenko

Add the record to the MAINTAINERS to follow what is going on with the Intel MID platform related code and drivers.

With that, clean up a bit a couple of headers, i.e. move them to x86 subfolder of include/linux/platform_data where they belong to.

Quoted 7 lines
Quoted 4 lines

No functional changes intended.

Taking into account nature of this change it's supposed to go via PDx86 tree, please Ack.

Since the changes outside of drivers/platform/x86 are tiny and the merge window is close I've decided to take the series without waiting for acks:

Thank you!

FWIW, LKP tested more than 200 configurations with success and I locally have these device drivers always enabled for build, so I do not expect any report from more or less standard configurations for this platforms. If any is given, I'm here to fix ASAP.

Signature · 2 lines
With Best Regards,
Andy Shevchenko