diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-10-03 11:29:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-07 13:50:47 +0200 |
commit | 507fd01d5333338753a1cc26322dfc9f856c109f (patch) | |
tree | 1c15e4d8e2be9ae306d0c72f165357eace49df9e /arch/sh/kernel/cpu/sh4 | |
parent | d4387cd117414ba80230f27a514be5ca4a09cfcc (diff) |
drivers: move the early platform device support to arch/sh
SuperH is the only user of the current implementation of early platform
device support. We want to introduce a more robust approach to early
probing. As the first step - move all the current early platform code
to arch/sh.
In order not to export internal drivers/base functions to arch code for
this temporary solution - copy the two needed routines for driver
matching from drivers/base/platform.c to arch/sh/drivers/platform_early.c.
Also: call early_platform_cleanup() from subsys_initcall() so that it's
called after all early devices are probed.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Rich Felker <dalias@libc.org>
Link: https://lore.kernel.org/r/20191003092913.10731-2-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4')
-rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7750.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7760.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c index a40ef35d101a..2480ce4a3b1e 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c @@ -12,6 +12,7 @@ #include <linux/sh_timer.h> #include <linux/sh_intc.h> #include <linux/io.h> +#include <asm/platform_early.h> static struct plat_sci_port scif0_platform_data = { .scscr = SCSCR_REIE, diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index b37bda66a532..4592d660b942 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c @@ -13,6 +13,7 @@ #include <linux/sh_intc.h> #include <linux/serial_sci.h> #include <generated/machtypes.h> +#include <asm/platform_early.h> static struct resource rtc_resources[] = { [0] = { diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c index 86845da85997..e64eb96e3589 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c @@ -11,6 +11,7 @@ #include <linux/sh_intc.h> #include <linux/serial_sci.h> #include <linux/io.h> +#include <asm/platform_early.h> enum { UNUSED = 0, |