Skip to content

Commit

Permalink
bus: uniphier-system-bus: add UniPhier System Bus driver
Browse files Browse the repository at this point in the history
Since commit 1517126 ("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 <[email protected]>
  • Loading branch information
masahir0y committed Jul 11, 2020
1 parent d69d49d commit e2bb0be
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-uniphier/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ source "drivers/ata/Kconfig"

source "drivers/axi/Kconfig"

source "drivers/bus/Kconfig"

source "drivers/block/Kconfig"

source "drivers/bootcount/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
16 changes: 16 additions & 0 deletions drivers/bus/Kconfig
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions drivers/bus/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the bus drivers.
#

obj-$(CONFIG_UNIPHIER_SYSTEM_BUS) += uniphier-system-bus.o
14 changes: 14 additions & 0 deletions drivers/bus/uniphier-system-bus.c
Original file line number Diff line number Diff line change
@@ -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,
};

0 comments on commit e2bb0be

Please sign in to comment.