diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-07-09 15:08:19 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-07-11 21:30:21 +0900 |
commit | 862274913f8fa7195691f303807a2569c0301ed9 (patch) | |
tree | 9449e5d2231ca70acd7ef6b6b65ec7dd83809f18 /arch/arm/mach-uniphier/micro-support-card.c | |
parent | e2bb0be2fc2276d33646545de342196de8c4040e (diff) |
bus: uniphier-system-bus: move hardware init from board files
Move the bus initialization code to this driver from board files.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/arm/mach-uniphier/micro-support-card.c')
-rw-r--r-- | arch/arm/mach-uniphier/micro-support-card.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c index fc266aae98..dbd156ffce 100644 --- a/arch/arm/mach-uniphier/micro-support-card.c +++ b/arch/arm/mach-uniphier/micro-support-card.c @@ -5,7 +5,7 @@ * Author: Masahiro Yamada <yamada.masahiro@socionext.com> */ -#include <dm/of.h> +#include <dm.h> #include <fdt_support.h> #include <linux/ctype.h> #include <linux/delay.h> @@ -90,6 +90,17 @@ static int support_card_show_revision(void) void support_card_init(void) { + struct udevice *dev; + int ret; + + /* The system bus must be initialized for access to the support card. */ + ret = uclass_get_device_by_driver(UCLASS_SIMPLE_BUS, + DM_GET_DRIVER(uniphier_system_bus_driver), + &dev); + if (ret) + return; + + /* Check DT to see if this board has the support card. */ support_card_detect(); if (!support_card_found) |