From: Stephen Boyd <swboyd@chromium.org>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev,
devicetree@vger.kernel.org,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Rob Herring" <robh@kernel.org>,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
"Arnd Bergmann" <arnd@arndb.de>,
"Conor Dooley" <conor+dt@kernel.org>,
"Saravana Kannan" <saravanak@google.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Subject: [RFC PATCH 3/6] bus: Add basic sc7180 bus driver
Date: Tue, 7 Jan 2025 17:28:40 -0800 [thread overview]
Message-ID: <20250108012846.3275443-4-swboyd@chromium.org> (raw)
In-Reply-To: <20250108012846.3275443-1-swboyd@chromium.org>
Add a bus driver that does nothing besides populate devices as a child
of the soc device.
Cc: Rob Herring <robh@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konradybcio@kernel.org>
Cc: <linux-arm-msm@vger.kernel.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
drivers/bus/Kconfig | 3 ++
drivers/bus/Makefile | 3 ++
drivers/bus/qcom/Kconfig | 16 +++++++++++
drivers/bus/qcom/Makefile | 3 ++
drivers/bus/qcom/qcom-sc7180.c | 51 ++++++++++++++++++++++++++++++++++
5 files changed, 76 insertions(+)
create mode 100644 drivers/bus/qcom/Kconfig
create mode 100644 drivers/bus/qcom/Makefile
create mode 100644 drivers/bus/qcom/qcom-sc7180.c
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index 7c2aa1350578..69963f0f02f3 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -284,6 +284,9 @@ config OF_SIMPLE_BUS
symbol if ALLOW_SIMPLE_BUS_OVERRIDE is set and there isn't another
driver for the simple-bus compatible.
+# SoC specific drivers
+source "drivers/bus/qcom/Kconfig"
+
source "drivers/bus/fsl-mc/Kconfig"
source "drivers/bus/mhi/Kconfig"
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index f3968221d704..796dd0515578 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -40,6 +40,9 @@ obj-$(CONFIG_VEXPRESS_CONFIG) += vexpress-config.o
obj-$(CONFIG_DA8XX_MSTPRI) += da8xx-mstpri.o
+# SoC specific drivers
+obj-y += qcom/
+
# Must be last for driver registration ordering
obj-$(CONFIG_OF_SIMPLE_BUS) += simple-bus.o
diff --git a/drivers/bus/qcom/Kconfig b/drivers/bus/qcom/Kconfig
new file mode 100644
index 000000000000..f4c5d05ec9ca
--- /dev/null
+++ b/drivers/bus/qcom/Kconfig
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0
+
+menuconfig QCOM_SOC_BUS
+ tristate "Qualcomm SoC Bus Drivers"
+ depends on ARCH_QCOM || COMPILE_TEST
+
+if QCOM_SOC_BUS
+
+config QCOM_SOC_BUS_SC7180
+ tristate "Qualcomm SC7180 SoC Bus"
+ depends on ALLOW_SIMPLE_BUS_OVERRIDE
+ depends on OF_SIMPLE_BUS || !OF_SIMPLE_BUS
+ help
+ Support for the Qualcomm SC7180 SoC bus.
+
+endif
diff --git a/drivers/bus/qcom/Makefile b/drivers/bus/qcom/Makefile
new file mode 100644
index 000000000000..5d41ad61fead
--- /dev/null
+++ b/drivers/bus/qcom/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_QCOM_SOC_BUS_SC7180) += qcom-sc7180.o
diff --git a/drivers/bus/qcom/qcom-sc7180.c b/drivers/bus/qcom/qcom-sc7180.c
new file mode 100644
index 000000000000..a615cf5a2129
--- /dev/null
+++ b/drivers/bus/qcom/qcom-sc7180.c
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * SoC bus driver for Qualcomm SC7180 SoCs
+ */
+
+#include <linux/device.h>
+#include <linux/init.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+
+static int qcom_soc_sc7180_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct device_node *np = dev->of_node;
+
+ return of_platform_populate(np, NULL, NULL, dev);
+}
+
+static const struct of_device_id qcom_soc_sc7180_match[] = {
+ { .compatible = "qcom,soc-sc7180", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, qcom_soc_sc7180_match);
+
+static struct platform_driver qcom_soc_sc7180_driver = {
+ .probe = qcom_soc_sc7180_probe,
+ .driver = {
+ .name = "qcom-soc-sc7180",
+ .of_match_table = qcom_soc_sc7180_match,
+ .suppress_bind_attrs = true,
+ },
+};
+
+static int __init qcom_soc_sc7180_driver_init(void)
+{
+ return platform_driver_register(&qcom_soc_sc7180_driver);
+}
+/* Register before simple-bus driver. */
+arch_initcall(qcom_soc_sc7180_driver_init);
+
+static void __exit qcom_soc_sc7180_driver_exit(void)
+{
+ platform_driver_unregister(&qcom_soc_sc7180_driver);
+}
+module_exit(qcom_soc_sc7180_driver_exit);
+
+MODULE_DESCRIPTION("Qualcomm SC7180 SoC Driver");
+MODULE_LICENSE("GPL");
--
https://chromeos.dev
next prev parent reply other threads:[~2025-01-08 1:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 1:28 [RFC PATCH 0/6] qcom: Add an SoC PM driver for sc7180 using PM domains Stephen Boyd
2025-01-08 1:28 ` [RFC PATCH 1/6] bus: Extract simple-bus into self-contained driver Stephen Boyd
2025-01-08 14:11 ` Rob Herring
2025-01-08 22:44 ` Stephen Boyd
2025-01-09 14:02 ` Konrad Dybcio
2025-01-09 21:41 ` Stephen Boyd
2025-01-08 1:28 ` [RFC PATCH 2/6] dt-bindings: bus: Add qcom,soc-sc7180 SoC Stephen Boyd
2025-01-09 14:05 ` Konrad Dybcio
2025-01-09 21:51 ` Stephen Boyd
2025-01-10 0:35 ` Konrad Dybcio
2025-01-10 13:58 ` Rob Herring
2025-01-14 23:22 ` Stephen Boyd
2025-01-08 1:28 ` Stephen Boyd [this message]
2025-01-08 1:28 ` [RFC PATCH 4/6] of: Extract alloc/add functions from of_platform_device_create_pdata() Stephen Boyd
2025-01-09 14:06 ` Konrad Dybcio
2025-01-08 1:28 ` [RFC PATCH 5/6] bus: qcom-sc7180: Attach pm domain to watchdog device Stephen Boyd
2025-01-10 14:09 ` Rob Herring
2025-01-15 0:24 ` Stephen Boyd
2025-01-08 1:28 ` [RFC PATCH 6/6] arm64: dts: qcom: sc7180: Add SoC specific compatible to soc node Stephen Boyd
2025-01-08 13:02 ` Dmitry Baryshkov
2025-01-09 14:10 ` Konrad Dybcio
2025-01-09 23:45 ` Dmitry Baryshkov
2025-01-10 0:38 ` Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250108012846.3275443-4-swboyd@chromium.org \
--to=swboyd@chromium.org \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konradybcio@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox