@@ -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"
@@ -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
new file mode 100644
@@ -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
new file mode 100644
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_QCOM_SOC_BUS_SC7180) += qcom-sc7180.o
new file mode 100644
@@ -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");
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