bus: uniphier-system-bus: add UniPhier System Bus driver
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 9 Jul 2020 06:08:18 +0000 (15:08 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 11 Jul 2020 12:30:21 +0000 (21:30 +0900)
Since commit 1517126fdac2 ("ARM: uniphier: select DM_ETH"), DM-based
drivers/net/smc911x.c is compiled, but it is never probed because the
parent node lacks the DM-based driver.

I need a skeleton driver to populate child devices (but the next commit
will move more hardware settings to the this driver).

I put this to drivers/bus/uniphier-system-bus.c because this is the
same path as the driver in Linux kernel.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/mach-uniphier/Kconfig
drivers/Kconfig
drivers/Makefile
drivers/bus/Kconfig [new file with mode: 0644]
drivers/bus/Makefile [new file with mode: 0644]
drivers/bus/uniphier-system-bus.c [new file with mode: 0644]

index e125f50..3a8eee7 100644 (file)
@@ -83,6 +83,7 @@ config CACHE_UNIPHIER
 
 config MICRO_SUPPORT_CARD
        bool "Use Micro Support Card"
+       depends on UNIPHIER_SYSTEM_BUS
        help
          This option provides support for the expansion board, available
          on some UniPhier reference boards.
index e34a227..7a839fa 100644 (file)
@@ -10,6 +10,8 @@ source "drivers/ata/Kconfig"
 
 source "drivers/axi/Kconfig"
 
+source "drivers/bus/Kconfig"
+
 source "drivers/block/Kconfig"
 
 source "drivers/bootcount/Kconfig"
index 94e8c5d..afd159e 100644 (file)
@@ -74,6 +74,7 @@ ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
 
 obj-y += adc/
 obj-y += ata/
+obj-y += bus/
 obj-$(CONFIG_DM_DEMO) += demo/
 obj-$(CONFIG_BIOSEMU) += bios_emulator/
 obj-y += block/
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
new file mode 100644 (file)
index 0000000..07a33c6
--- /dev/null
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Bus Devices
+#
+
+menu "Bus devices"
+
+config UNIPHIER_SYSTEM_BUS
+       bool "UniPhier System Bus driver"
+       depends on ARCH_UNIPHIER
+       default y
+       help
+         Support for UniPhier System Bus, a simple external bus.  This is
+         needed to use on-board devices connected to UniPhier SoCs.
+
+endmenu
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
new file mode 100644 (file)
index 0000000..0b97fc1
--- /dev/null
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the bus drivers.
+#
+
+obj-$(CONFIG_UNIPHIER_SYSTEM_BUS) += uniphier-system-bus.o
diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c
new file mode 100644 (file)
index 0000000..c61d795
--- /dev/null
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include <dm.h>
+
+static const struct udevice_id uniphier_system_bus_match[] = {
+       { .compatible = "socionext,uniphier-system-bus" },
+       { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(uniphier_system_bus_driver) = {
+       .name   = "uniphier-system-bus",
+       .id     = UCLASS_SIMPLE_BUS,
+       .of_match = uniphier_system_bus_match,
+};