Re: [PATCH v2 16/22] firmware: ti_sci: Move the huge ti_sci file into its own directory

From: Andrew Davis

Date: Wed Sep 30 2026 - 15:25:36 EST


On 9/30/26 11:06 AM, Beleswar Padhi wrote:
From: Andrew Davis <afd@xxxxxx>

Move the huge ti_sci.c file and its header into its own "ti"
sub-directory. This allows for cleanups later where this file will be
broken down into smaller files tied to operations.

Signed-off-by: Andrew Davis <afd@xxxxxx>
Signed-off-by: Beleswar Padhi <b-padhi@xxxxxx>
---

Can probably do the rename in this patch too, get it out of the way
while moving the file. Instead of renaming it later in [18/22].

Just remember to put this[0] in the Makefile here so the module
name doesn't change in-between these two patches.

[0]
ti_sci-y := ti_sci_core.o
obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o

Andrew

v2: Changelog:
1. None to this patch.

Link to v1:
https://lore.kernel.org/all/20260929201746.4078803-17-b-padhi@xxxxxx/

MAINTAINERS | 2 +-
drivers/firmware/Kconfig | 17 +----------------
drivers/firmware/Makefile | 2 +-
drivers/firmware/ti/Kconfig | 17 +++++++++++++++++
drivers/firmware/ti/Makefile | 3 +++
drivers/firmware/{ => ti}/ti_sci.c | 0
drivers/firmware/{ => ti}/ti_sci.h | 0
7 files changed, 23 insertions(+), 18 deletions(-)
create mode 100644 drivers/firmware/ti/Kconfig
create mode 100644 drivers/firmware/ti/Makefile
rename drivers/firmware/{ => ti}/ti_sci.c (100%)
rename drivers/firmware/{ => ti}/ti_sci.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 30c1cdd0fb385..fe53e152f2249 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -27517,7 +27517,7 @@ F: Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.yaml
F: Documentation/devicetree/bindings/reset/ti,sci-reset.yaml
F: Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml
F: drivers/clk/keystone/sci-clk.c
-F: drivers/firmware/ti_sci*
+F: drivers/firmware/ti/*
F: drivers/irqchip/irq-ti-sci-inta.c
F: drivers/irqchip/irq-ti-sci-intr.c
F: drivers/reset/reset-ti-sci.c
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index c183d98c1e8f5..69cce12ae8651 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -233,22 +233,6 @@ config TH1520_AON_PROTOCOL
the kernel through the Always-On protocol, using hardware mailbox as a medium.
Say yes if you need such capabilities.
-config TI_SCI_PROTOCOL
- tristate "TI System Control Interface (TISCI) Message Protocol"
- depends on TI_MESSAGE_MANAGER
- default ARCH_K3
- help
- TI System Control Interface (TISCI) Message Protocol is used to manage
- compute systems such as ARM, DSP etc with the system controller in
- complex System on Chip(SoC) such as those found on certain keystone
- generation SoC from TI.
-
- System controller provides various facilities including power
- management function support.
-
- This protocol library is used by client drivers to use the features
- provided by the system controller.
-
config TRUSTED_FOUNDATIONS
bool "Trusted Foundations secure monitor support"
depends on ARM && CPU_V7
@@ -309,6 +293,7 @@ source "drivers/firmware/qcom/Kconfig"
source "drivers/firmware/samsung/Kconfig"
source "drivers/firmware/smccc/Kconfig"
source "drivers/firmware/tegra/Kconfig"
+source "drivers/firmware/ti/Kconfig"
source "drivers/firmware/xilinx/Kconfig"
source "drivers/firmware/arm_rmm/Kconfig"
diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
index a855d36961732..309145992ee5d 100644
--- a/drivers/firmware/Makefile
+++ b/drivers/firmware/Makefile
@@ -20,7 +20,6 @@ obj-$(CONFIG_FW_CFG_SYSFS) += qemu_fw_cfg.o
obj-$(CONFIG_SYSFB) += sysfb.o
obj-$(CONFIG_SYSFB_SIMPLEFB) += sysfb_simplefb.o
obj-$(CONFIG_TH1520_AON_PROTOCOL) += thead,th1520-aon.o
-obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o
obj-$(CONFIG_TRUSTED_FOUNDATIONS) += trusted_foundations.o
obj-$(CONFIG_TURRIS_MOX_RWTM) += turris-mox-rwtm.o
@@ -38,5 +37,6 @@ obj-y += qcom/
obj-y += samsung/
obj-y += smccc/
obj-y += tegra/
+obj-y += ti/
obj-y += xilinx/
obj-y += arm_rmm/
diff --git a/drivers/firmware/ti/Kconfig b/drivers/firmware/ti/Kconfig
new file mode 100644
index 0000000000000..07d7968f9cc8f
--- /dev/null
+++ b/drivers/firmware/ti/Kconfig
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config TI_SCI_PROTOCOL
+ tristate "TI System Control Interface (TISCI) Message Protocol"
+ depends on TI_MESSAGE_MANAGER
+ default ARCH_K3
+ help
+ TI System Control Interface (TISCI) Message Protocol is used to manage
+ compute systems such as ARM, DSP etc with the system controller in
+ complex System on Chip(SoC) such as those found on certain keystone
+ generation SoC from TI.
+
+ System controller provides various facilities including power
+ management function support.
+
+ This protocol library is used by client drivers to use the features
+ provided by the system controller.
diff --git a/drivers/firmware/ti/Makefile b/drivers/firmware/ti/Makefile
new file mode 100644
index 0000000000000..433b108782fbe
--- /dev/null
+++ b/drivers/firmware/ti/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti/ti_sci.c
similarity index 100%
rename from drivers/firmware/ti_sci.c
rename to drivers/firmware/ti/ti_sci.c
diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti/ti_sci.h
similarity index 100%
rename from drivers/firmware/ti_sci.h
rename to drivers/firmware/ti/ti_sci.h