Received: by 10.192.165.148 with SMTP id m20csp3981441imm; Mon, 30 Apr 2018 09:37:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpFRqzq5cQhZmAaWF3dUcGMGLuww+uIM+Fu3r47ducvuAGCi8Ao1tQqg5Jf8SMMk+EycKUE X-Received: by 2002:a65:65c4:: with SMTP id y4-v6mr6288181pgv.369.1525106228785; Mon, 30 Apr 2018 09:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525106228; cv=none; d=google.com; s=arc-20160816; b=X1p+iTG2vWItrqaN9JpRC8AUubeCKeqZ61imo8bE+V9inELkANn0NDDjkv2BYK4wrg KTe10jFzFFmf+P7aIsL0JxWOksREoXPG7JnMo3Trh7ikOjb2OjATBKosgIGDyHCs0+zG RLOWMWTGaViFeV5W1hR0pxoq2GLhed9marPQWBKUyVdZvO1h6LZh5+r1b5pDadSUyGDp UE4Kkiv1mrMjcOP/e6rD99tjDpzSUTPoIaSrB96KWmMUZMtPAbuiSZ5c6rzri1zWuYaR GecRG7jf0yRS/2WOLg4napIEJmQ20qQit70i3mLcZ7zgE+D/fQ6nGmR7poojzu2/ignS 2wlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=s44yGsmnVcdgnOCvNV6TuNtrtO0gvMqH6kHFEJrQM60=; b=0+VuPNcElcxAYEkOXWBfYAcM4LMwqSDr8fZnMAOgWfl5HP3S6IBKgjRZ53KNAAiGFK M11JiGWhnO/8FgYYcf0IFUkEgx16lBm+s81EJYFUizpqlIQrVRAbyTS6qhhrnFgcaJ/K 0oZEXRpyXvFJQN19J1bdvyVz+AN2160oixm5BX3HFRLK1kVyCGDcE+whMo7FA68T3hJ7 olpbRlWG6dyoosWUof1A1/dsNsgRKuYe1benmK8RvCNS+0F9A4WlkT8FowNizYjM4hAj pf/VfYhIpXJRmAA1ayDYZoQqrb935Dsekuw3Rk8Wx2syetlYcRz76BPqLKj6s18YjbKN Heyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=lbHOoo7o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12-v6si7676793plo.264.2018.04.30.09.36.54; Mon, 30 Apr 2018 09:37:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=lbHOoo7o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754946AbeD3Qgg (ORCPT + 99 others); Mon, 30 Apr 2018 12:36:36 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34363 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754756AbeD3Qga (ORCPT ); Mon, 30 Apr 2018 12:36:30 -0400 Received: by mail-wm0-f65.google.com with SMTP id a137so10694447wme.1 for ; Mon, 30 Apr 2018 09:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=s44yGsmnVcdgnOCvNV6TuNtrtO0gvMqH6kHFEJrQM60=; b=lbHOoo7oveTbSHXC7GmeRn5tERyVnqYehb9e5T/JpnBanDgDCeoUwSo1eZv4zuG98y oVBj9bg9JbkW4T5qxuJ2L7KaAukbFK4RYt6QxhFngLqmuJg+dOslqOEqJ2Nvo8VGSo+s O0JPa27cqlgXch3CGCxNeGiuZMK5LrnASk7bueEsxoO9P0KKs5fN3Y5HfPnGiv5KnvF/ ah/184SZldzMo8wO9fOHRPnuxA8E+oaT4YuNbhr/s0v962nlaRp/S9ePgtNusi7GM8I6 Mh5In9p0ZP7T5nyN7IgWxej3w6WdLM96zYgfE5C05zVTQWyiillkmsyhg0AVuNxVEIPl bTPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=s44yGsmnVcdgnOCvNV6TuNtrtO0gvMqH6kHFEJrQM60=; b=AsJ2ifmvYa77oeG1rYa83zgfBzDrXtu5rLMV4DWFfDKQFiCwwcbZF4m/4JrBN3R2Kg eICFkzwCY76MCXk/t+b1aORA29zAKiJaJ7vbcH5TX86vj43krZuxB5mR9v2kBqGU3kDk 8Q0gMpn3yJhWKkSIAoydsc/So0afmfzwmLw3tzO1A5zun1tFwQftoqQ5y88ikBGbzY53 fl7KIIr4t6gKLBqAuRo7FHiMDSz+1KxF0TQ7cpbdNV0nYCW7clrkYRWXjMITsWIsTIa5 9iLo/VsGENdW+KktQNG4RZ1mPh+aVAN0TRWu6M3NtiIcVTeoe10OjEGxQxE877j8hxBb 6pUg== X-Gm-Message-State: ALQs6tBsyNQnSQdHazfg3KvNJNaYv9+SVNEv48e9uTisxBjJ1vT9G7lw rl2fArCjJH2KYYhcXS60wp/Uzg== X-Received: by 10.28.158.144 with SMTP id h138mr8266318wme.33.1525106188655; Mon, 30 Apr 2018 09:36:28 -0700 (PDT) Received: from brgl-bgdev.home ([2a01:cb1d:af:5b00:e837:b8d5:48c1:571b]) by smtp.gmail.com with ESMTPSA id 2sm9295727wml.2.2018.04.30.09.36.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 09:36:27 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , David Lechner , Michael Turquette , Stephen Boyd , Arnd Bergmann , Greg Kroah-Hartman , Mark Rutland , Yoshinori Sato , Rich Felker , Andy Shevchenko , Marc Zyngier , "Rafael J . Wysocki" , Peter Rosin , Jiri Slaby , Thomas Gleixner , Daniel Lezcano Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-sh@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 3/3] sh: add the sh_ prefix to early platform symbols Date: Mon, 30 Apr 2018 18:35:56 +0200 Message-Id: <20180430163556.2560-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430163556.2560-1-brgl@bgdev.pl> References: <20180430163556.2560-1-brgl@bgdev.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Old early platform device support is now sh-specific. Before moving on to implementing new early platform framework based on real platform devices, prefix all early platform symbols with 'sh_'. Signed-off-by: Bartosz Golaszewski --- arch/sh/drivers/platform_early.c | 66 +++++++++++++------------- arch/sh/include/asm/platform_early.h | 30 ++++++------ arch/sh/kernel/cpu/sh2/setup-sh7619.c | 2 +- arch/sh/kernel/cpu/sh2a/setup-mxg.c | 2 +- arch/sh/kernel/cpu/sh2a/setup-sh7201.c | 2 +- arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 2 +- arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 2 +- arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 2 +- arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 2 +- arch/sh/kernel/cpu/sh3/setup-sh7705.c | 2 +- arch/sh/kernel/cpu/sh3/setup-sh770x.c | 2 +- arch/sh/kernel/cpu/sh3/setup-sh7710.c | 2 +- arch/sh/kernel/cpu/sh3/setup-sh7720.c | 2 +- arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 2 +- arch/sh/kernel/cpu/sh4/setup-sh7750.c | 8 ++-- arch/sh/kernel/cpu/sh4/setup-sh7760.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7734.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7770.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7780.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-shx3.c | 2 +- arch/sh/kernel/cpu/sh5/setup-sh5.c | 2 +- arch/sh/kernel/setup.c | 2 +- arch/sh/kernel/time.c | 4 +- drivers/clocksource/sh_cmt.c | 6 +-- drivers/clocksource/sh_mtu2.c | 6 +-- drivers/clocksource/sh_tmu.c | 6 +-- drivers/tty/serial/sh-sci.c | 4 +- 36 files changed, 93 insertions(+), 93 deletions(-) diff --git a/arch/sh/drivers/platform_early.c b/arch/sh/drivers/platform_early.c index bc094f6eb366..6eba755b8c12 100644 --- a/arch/sh/drivers/platform_early.c +++ b/arch/sh/drivers/platform_early.c @@ -3,8 +3,8 @@ #include #include -static __initdata LIST_HEAD(early_platform_driver_list); -static __initdata LIST_HEAD(early_platform_device_list); +static __initdata LIST_HEAD(sh_early_platform_driver_list); +static __initdata LIST_HEAD(sh_early_platform_device_list); static const struct platform_device_id * platform_match_id(const struct platform_device_id *id, @@ -57,13 +57,13 @@ static void pm_runtime_early_init(struct device *dev) {} #endif /** - * early_platform_driver_register - register early platform driver - * @epdrv: early_platform driver structure + * sh_early_platform_driver_register - register early platform driver + * @epdrv: sh_early_platform driver structure * @buf: string passed from early_param() * - * Helper function for early_platform_init() / early_platform_init_buffer() + * Helper function for sh_early_platform_init() / sh_early_platform_init_buffer() */ -int __init early_platform_driver_register(struct early_platform_driver *epdrv, +int __init sh_early_platform_driver_register(struct sh_early_platform_driver *epdrv, char *buf) { char *tmp; @@ -74,7 +74,7 @@ int __init early_platform_driver_register(struct early_platform_driver *epdrv, */ if (!epdrv->list.next) { INIT_LIST_HEAD(&epdrv->list); - list_add_tail(&epdrv->list, &early_platform_driver_list); + list_add_tail(&epdrv->list, &sh_early_platform_driver_list); } /* If the user has specified device then make sure the driver @@ -83,7 +83,7 @@ int __init early_platform_driver_register(struct early_platform_driver *epdrv, */ n = strlen(epdrv->pdrv->driver.name); if (buf && !strncmp(buf, epdrv->pdrv->driver.name, n)) { - list_move(&epdrv->list, &early_platform_driver_list); + list_move(&epdrv->list, &sh_early_platform_driver_list); /* Allow passing parameters after device name */ if (buf[n] == '\0' || buf[n] == ',') @@ -113,14 +113,14 @@ int __init early_platform_driver_register(struct early_platform_driver *epdrv, } /** - * early_platform_add_devices - adds a number of early platform devices + * sh_early_platform_add_devices - adds a number of early platform devices * @devs: array of early platform devices to add * @num: number of early platform devices in array * * Used by early architecture code to register early platform devices and * their platform data. */ -void __init early_platform_add_devices(struct platform_device **devs, int num) +void __init sh_early_platform_add_devices(struct platform_device **devs, int num) { struct device *dev; int i; @@ -133,20 +133,20 @@ void __init early_platform_add_devices(struct platform_device **devs, int num) pm_runtime_early_init(dev); INIT_LIST_HEAD(&dev->devres_head); list_add_tail(&dev->devres_head, - &early_platform_device_list); + &sh_early_platform_device_list); } } } /** - * early_platform_driver_register_all - register early platform drivers + * sh_early_platform_driver_register_all - register early platform drivers * @class_str: string to identify early platform driver class * * Used by architecture code to register all early platform drivers * for a certain class. If omitted then only early platform drivers * with matching kernel command line class parameters will be registered. */ -void __init early_platform_driver_register_all(char *class_str) +void __init sh_early_platform_driver_register_all(char *class_str) { /* The "class_str" parameter may or may not be present on the kernel * command line. If it is present then there may be more than one @@ -159,23 +159,23 @@ void __init early_platform_driver_register_all(char *class_str) * We use parse_early_options() to make sure the early_param() gets * called at least once. The early_param() may be called more than * once since the name of the preferred device may be specified on - * the kernel command line. early_platform_driver_register() handles + * the kernel command line. sh_early_platform_driver_register() handles * this case for us. */ parse_early_options(class_str); } /** - * early_platform_match - find early platform device matching driver + * sh_early_platform_match - find early platform device matching driver * @epdrv: early platform driver structure * @id: id to match against */ static struct platform_device * __init -early_platform_match(struct early_platform_driver *epdrv, int id) +sh_early_platform_match(struct sh_early_platform_driver *epdrv, int id) { struct platform_device *pd; - list_for_each_entry(pd, &early_platform_device_list, dev.devres_head) + list_for_each_entry(pd, &sh_early_platform_device_list, dev.devres_head) if (platform_match(&pd->dev, &epdrv->pdrv->driver)) if (pd->id == id) return pd; @@ -184,16 +184,16 @@ early_platform_match(struct early_platform_driver *epdrv, int id) } /** - * early_platform_left - check if early platform driver has matching devices + * sh_early_platform_left - check if early platform driver has matching devices * @epdrv: early platform driver structure * @id: return true if id or above exists */ -static int __init early_platform_left(struct early_platform_driver *epdrv, +static int __init sh_early_platform_left(struct sh_early_platform_driver *epdrv, int id) { struct platform_device *pd; - list_for_each_entry(pd, &early_platform_device_list, dev.devres_head) + list_for_each_entry(pd, &sh_early_platform_device_list, dev.devres_head) if (platform_match(&pd->dev, &epdrv->pdrv->driver)) if (pd->id >= id) return 1; @@ -202,22 +202,22 @@ static int __init early_platform_left(struct early_platform_driver *epdrv, } /** - * early_platform_driver_probe_id - probe drivers matching class_str and id + * sh_early_platform_driver_probe_id - probe drivers matching class_str and id * @class_str: string to identify early platform driver class * @id: id to match against * @nr_probe: number of platform devices to successfully probe before exiting */ -static int __init early_platform_driver_probe_id(char *class_str, +static int __init sh_early_platform_driver_probe_id(char *class_str, int id, int nr_probe) { - struct early_platform_driver *epdrv; + struct sh_early_platform_driver *epdrv; struct platform_device *match; int match_id; int n = 0; int left = 0; - list_for_each_entry(epdrv, &early_platform_driver_list, list) { + list_for_each_entry(epdrv, &sh_early_platform_driver_list, list) { /* only use drivers matching our class_str */ if (strcmp(class_str, epdrv->class_str)) continue; @@ -228,7 +228,7 @@ static int __init early_platform_driver_probe_id(char *class_str, } else { match_id = id; - left += early_platform_left(epdrv, id); + left += sh_early_platform_left(epdrv, id); /* skip requested id */ switch (epdrv->requested_id) { @@ -250,7 +250,7 @@ static int __init early_platform_driver_probe_id(char *class_str, match = NULL; break; default: - match = early_platform_match(epdrv, match_id); + match = sh_early_platform_match(epdrv, match_id); } if (match) { @@ -292,7 +292,7 @@ static int __init early_platform_driver_probe_id(char *class_str, } /** - * early_platform_driver_probe - probe a class of registered drivers + * sh_early_platform_driver_probe - probe a class of registered drivers * @class_str: string to identify early platform driver class * @nr_probe: number of platform devices to successfully probe before exiting * @user_only: only probe user specified early platform devices @@ -301,7 +301,7 @@ static int __init early_platform_driver_probe_id(char *class_str, * within a certain class. For probe to happen a registered early platform * device matching a registered early platform driver is needed. */ -int __init early_platform_driver_probe(char *class_str, +int __init sh_early_platform_driver_probe(char *class_str, int nr_probe, int user_only) { @@ -309,7 +309,7 @@ int __init early_platform_driver_probe(char *class_str, n = 0; for (i = -2; n < nr_probe; i++) { - k = early_platform_driver_probe_id(class_str, i, nr_probe - n); + k = sh_early_platform_driver_probe_id(class_str, i, nr_probe - n); if (k < 0) break; @@ -324,14 +324,14 @@ int __init early_platform_driver_probe(char *class_str, } /** - * early_platform_cleanup - clean up early platform code + * sh_early_platform_cleanup - clean up early platform code */ -static int __init early_platform_cleanup(void) +static int __init sh_early_platform_cleanup(void) { struct platform_device *pd, *pd2; /* clean up the devres list used to chain devices */ - list_for_each_entry_safe(pd, pd2, &early_platform_device_list, + list_for_each_entry_safe(pd, pd2, &sh_early_platform_device_list, dev.devres_head) { list_del(&pd->dev.devres_head); memset(&pd->dev.devres_head, 0, sizeof(pd->dev.devres_head)); @@ -343,4 +343,4 @@ static int __init early_platform_cleanup(void) * This must happen once after all early devices are probed but before probing * real platform devices. */ -subsys_initcall(early_platform_cleanup); +subsys_initcall(sh_early_platform_cleanup); diff --git a/arch/sh/include/asm/platform_early.h b/arch/sh/include/asm/platform_early.h index 4590ab757d5f..fc802137c37d 100644 --- a/arch/sh/include/asm/platform_early.h +++ b/arch/sh/include/asm/platform_early.h @@ -8,7 +8,7 @@ #include #include -struct early_platform_driver { +struct sh_early_platform_driver { const char *class_str; struct platform_driver *pdrv; struct list_head list; @@ -20,39 +20,39 @@ struct early_platform_driver { #define EARLY_PLATFORM_ID_UNSET -2 #define EARLY_PLATFORM_ID_ERROR -3 -extern int early_platform_driver_register(struct early_platform_driver *epdrv, +extern int sh_early_platform_driver_register(struct sh_early_platform_driver *epdrv, char *buf); -extern void early_platform_add_devices(struct platform_device **devs, int num); +extern void sh_early_platform_add_devices(struct platform_device **devs, int num); -static inline int is_early_platform_device(struct platform_device *pdev) +static inline int is_sh_early_platform_device(struct platform_device *pdev) { return !pdev->dev.driver; } -extern void early_platform_driver_register_all(char *class_str); -extern int early_platform_driver_probe(char *class_str, +extern void sh_early_platform_driver_register_all(char *class_str); +extern int sh_early_platform_driver_probe(char *class_str, int nr_probe, int user_only); -#define early_platform_init(class_string, platdrv) \ - early_platform_init_buffer(class_string, platdrv, NULL, 0) +#define sh_early_platform_init(class_string, platdrv) \ + sh_early_platform_init_buffer(class_string, platdrv, NULL, 0) #ifndef MODULE -#define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \ -static __initdata struct early_platform_driver early_driver = { \ +#define sh_early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \ +static __initdata struct sh_early_platform_driver early_driver = { \ .class_str = class_string, \ .buffer = buf, \ .bufsize = bufsiz, \ .pdrv = platdrv, \ .requested_id = EARLY_PLATFORM_ID_UNSET, \ }; \ -static int __init early_platform_driver_setup_func(char *buffer) \ +static int __init sh_early_platform_driver_setup_func(char *buffer) \ { \ - return early_platform_driver_register(&early_driver, buffer); \ + return sh_early_platform_driver_register(&early_driver, buffer); \ } \ -early_param(class_string, early_platform_driver_setup_func) +early_param(class_string, sh_early_platform_driver_setup_func) #else /* MODULE */ -#define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \ -static inline char *early_platform_driver_setup_func(void) \ +#define sh_early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \ +static inline char *sh_early_platform_driver_setup_func(void) \ { \ return bufsiz ? buf : NULL; \ } diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c index 6707e92955aa..04a28ca4ce7c 100644 --- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c @@ -204,6 +204,6 @@ void __init plat_early_device_setup(void) /* enable CMT clock */ __raw_writeb(__raw_readb(STBCR3) & ~0x10, STBCR3); - early_platform_add_devices(sh7619_early_devices, + sh_early_platform_add_devices(sh7619_early_devices, ARRAY_SIZE(sh7619_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c index d33568a12fad..fb9dd473a9cc 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-mxg.c +++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c @@ -173,6 +173,6 @@ static struct platform_device *mxg_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(mxg_early_devices, + sh_early_platform_add_devices(mxg_early_devices, ARRAY_SIZE(mxg_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c index b258c5c3af60..37357d0fc9bc 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c @@ -416,6 +416,6 @@ void __init plat_early_device_setup(void) /* enable MTU2 clock */ __raw_writeb(__raw_readb(STBCR3) & ~0x20, STBCR3); - early_platform_add_devices(sh7201_early_devices, + sh_early_platform_add_devices(sh7201_early_devices, ARRAY_SIZE(sh7201_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c index db3f8df8d76d..79ba8d0db6b0 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c @@ -353,6 +353,6 @@ void __init plat_early_device_setup(void) /* enable MTU2 clock */ __raw_writeb(__raw_readb(STBCR3) & ~0x20, STBCR3); - early_platform_add_devices(sh7203_early_devices, + sh_early_platform_add_devices(sh7203_early_devices, ARRAY_SIZE(sh7203_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c index e1be4fedc739..501922504a3f 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c @@ -289,6 +289,6 @@ void __init plat_early_device_setup(void) /* enable MTU2 clock */ __raw_writeb(__raw_readb(STBCR3) & ~0x20, STBCR3); - early_platform_add_devices(sh7206_early_devices, + sh_early_platform_add_devices(sh7206_early_devices, ARRAY_SIZE(sh7206_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7264.c b/arch/sh/kernel/cpu/sh2a/setup-sh7264.c index b5bed10d0d72..955f15386bbd 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7264.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7264.c @@ -550,6 +550,6 @@ static struct platform_device *sh7264_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7264_early_devices, + sh_early_platform_add_devices(sh7264_early_devices, ARRAY_SIZE(sh7264_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7269.c b/arch/sh/kernel/cpu/sh2a/setup-sh7269.c index 248a6732397a..d8ecb24a0888 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7269.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7269.c @@ -566,6 +566,6 @@ static struct platform_device *sh7269_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7269_early_devices, + sh_early_platform_add_devices(sh7269_early_devices, ARRAY_SIZE(sh7269_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c index 7ec8c11c2f7a..481cfbc3b82d 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c @@ -182,7 +182,7 @@ static struct platform_device *sh7705_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7705_early_devices, + sh_early_platform_add_devices(sh7705_early_devices, ARRAY_SIZE(sh7705_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c index 20839dd40a2f..d0cd14f5fc19 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c @@ -234,7 +234,7 @@ static struct platform_device *sh770x_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh770x_early_devices, + sh_early_platform_add_devices(sh770x_early_devices, ARRAY_SIZE(sh770x_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c index 780ccd202bab..fb680bae22c3 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c @@ -181,7 +181,7 @@ static struct platform_device *sh7710_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7710_early_devices, + sh_early_platform_add_devices(sh7710_early_devices, ARRAY_SIZE(sh7710_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c index 723bd9c04c8a..faf084cbbbed 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c @@ -215,7 +215,7 @@ static struct platform_device *sh7720_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7720_early_devices, + sh_early_platform_add_devices(sh7720_early_devices, ARRAY_SIZE(sh7720_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c index 4a5fa86006cd..123b848368d4 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c @@ -80,7 +80,7 @@ static struct platform_device *sh4202_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh4202_early_devices, + sh_early_platform_add_devices(sh4202_early_devices, ARRAY_SIZE(sh4202_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index abb3703c2273..8f6c83b745db 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c @@ -165,15 +165,15 @@ void __init plat_early_device_setup(void) if (mach_is_rts7751r2d()) { scif_platform_data.scscr |= SCSCR_CKE1; dev[0] = &scif_device; - early_platform_add_devices(dev, 1); + sh_early_platform_add_devices(dev, 1); } else { dev[0] = &sci_device; - early_platform_add_devices(dev, 1); + sh_early_platform_add_devices(dev, 1); dev[0] = &scif_device; - early_platform_add_devices(dev, 1); + sh_early_platform_add_devices(dev, 1); } - early_platform_add_devices(sh7750_early_devices, + sh_early_platform_add_devices(sh7750_early_devices, ARRAY_SIZE(sh7750_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c index 649f4dcb5935..ab8cc1826d8c 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c @@ -275,7 +275,7 @@ static struct platform_device *sh7760_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7760_early_devices, + sh_early_platform_add_devices(sh7760_early_devices, ARRAY_SIZE(sh7760_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index 73715a635048..a3ff0803b62e 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c @@ -300,7 +300,7 @@ static struct platform_device *sh7343_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7343_early_devices, + sh_early_platform_add_devices(sh7343_early_devices, ARRAY_SIZE(sh7343_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c index 942856048112..2ad400fef830 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c @@ -244,7 +244,7 @@ static struct platform_device *sh7366_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7366_early_devices, + sh_early_platform_add_devices(sh7366_early_devices, ARRAY_SIZE(sh7366_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index bf60456a8012..01e687d72c16 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -516,7 +516,7 @@ static struct platform_device *sh7722_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7722_early_devices, + sh_early_platform_add_devices(sh7722_early_devices, ARRAY_SIZE(sh7722_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index d25d3c3b44ab..6738c39413b2 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -414,7 +414,7 @@ static struct platform_device *sh7723_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7723_early_devices, + sh_early_platform_add_devices(sh7723_early_devices, ARRAY_SIZE(sh7723_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 0eeadabc8065..0163750a3fb0 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c @@ -834,7 +834,7 @@ static struct platform_device *sh7724_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7724_early_devices, + sh_early_platform_add_devices(sh7724_early_devices, ARRAY_SIZE(sh7724_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7734.c b/arch/sh/kernel/cpu/sh4a/setup-sh7734.c index bed9d01fa85f..d3760029f0f3 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7734.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7734.c @@ -284,7 +284,7 @@ static struct platform_device *sh7734_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7734_early_devices, + sh_early_platform_add_devices(sh7734_early_devices, ARRAY_SIZE(sh7734_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index b5b19e81a8dc..25d655ab4114 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c @@ -771,7 +771,7 @@ static struct platform_device *sh7757_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7757_early_devices, + sh_early_platform_add_devices(sh7757_early_devices, ARRAY_SIZE(sh7757_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c index 51a6c64f860e..42f234efaa42 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c @@ -225,7 +225,7 @@ static struct platform_device *sh7763_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7763_early_devices, + sh_early_platform_add_devices(sh7763_early_devices, ARRAY_SIZE(sh7763_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c index 77f228e20599..35420329f5e1 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c @@ -320,7 +320,7 @@ static struct platform_device *sh7770_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7770_early_devices, + sh_early_platform_add_devices(sh7770_early_devices, ARRAY_SIZE(sh7770_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c index 1e8dc7480330..04d63081b9ff 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c @@ -290,7 +290,7 @@ void __init plat_early_device_setup(void) scif1_platform_data.scscr &= ~SCSCR_CKE1; } - early_platform_add_devices(sh7780_early_devices, + sh_early_platform_add_devices(sh7780_early_devices, ARRAY_SIZE(sh7780_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c index eda0d61ebf71..eb3c003223e2 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c @@ -357,7 +357,7 @@ static struct platform_device *sh7785_early_devices[] __initdata = { void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7785_early_devices, + sh_early_platform_add_devices(sh7785_early_devices, ARRAY_SIZE(sh7785_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c index 77226a60c36f..46473345cb79 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c @@ -838,6 +838,6 @@ arch_initcall(sh7786_devices_setup); void __init plat_early_device_setup(void) { - early_platform_add_devices(sh7786_early_devices, + sh_early_platform_add_devices(sh7786_early_devices, ARRAY_SIZE(sh7786_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c index 83feaf0a4aae..c531182425f7 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c @@ -156,7 +156,7 @@ arch_initcall(shx3_devices_setup); void __init plat_early_device_setup(void) { - early_platform_add_devices(shx3_early_devices, + sh_early_platform_add_devices(shx3_early_devices, ARRAY_SIZE(shx3_early_devices)); } diff --git a/arch/sh/kernel/cpu/sh5/setup-sh5.c b/arch/sh/kernel/cpu/sh5/setup-sh5.c index 8ebd26a9fd90..034bb36bfdc2 100644 --- a/arch/sh/kernel/cpu/sh5/setup-sh5.c +++ b/arch/sh/kernel/cpu/sh5/setup-sh5.c @@ -119,6 +119,6 @@ arch_initcall(sh5_devices_setup); void __init plat_early_device_setup(void) { - early_platform_add_devices(sh5_early_devices, + sh_early_platform_add_devices(sh5_early_devices, ARRAY_SIZE(sh5_early_devices)); } diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index c9610a2b0888..4713d544b4c4 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -329,7 +329,7 @@ void __init setup_arch(char **cmdline_p) sh_mv_setup(); /* Let earlyprintk output early console messages */ - early_platform_driver_probe("earlyprintk", 1, 1); + sh_early_platform_driver_probe("earlyprintk", 1, 1); #ifdef CONFIG_OF_FLATTREE #ifdef CONFIG_USE_BUILTIN_DTB diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index 674d8413491b..9c460a74e3c2 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c @@ -105,8 +105,8 @@ static void __init sh_late_time_init(void) * clocksource and the jiffies clocksource is used transparently * instead. No error handling is necessary here. */ - early_platform_driver_register_all("earlytimer"); - early_platform_driver_probe("earlytimer", 2, 0); + sh_early_platform_driver_register_all("earlytimer"); + sh_early_platform_driver_probe("earlytimer", 2, 0); } void __init time_init(void) diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 70b3cf8e23d0..1048653db6d3 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -1043,7 +1043,7 @@ static int sh_cmt_probe(struct platform_device *pdev) struct sh_cmt_device *cmt = platform_get_drvdata(pdev); int ret; - if (!is_early_platform_device(pdev)) { + if (!is_sh_early_platform_device(pdev)) { pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); } @@ -1063,7 +1063,7 @@ static int sh_cmt_probe(struct platform_device *pdev) pm_runtime_idle(&pdev->dev); return ret; } - if (is_early_platform_device(pdev)) + if (is_sh_early_platform_device(pdev)) return 0; out: @@ -1100,7 +1100,7 @@ static void __exit sh_cmt_exit(void) platform_driver_unregister(&sh_cmt_device_driver); } -early_platform_init("earlytimer", &sh_cmt_device_driver); +sh_early_platform_init("earlytimer", &sh_cmt_device_driver); subsys_initcall(sh_cmt_init); module_exit(sh_cmt_exit); diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c index ad53df35bf47..8af26b6e21da 100644 --- a/drivers/clocksource/sh_mtu2.c +++ b/drivers/clocksource/sh_mtu2.c @@ -452,7 +452,7 @@ static int sh_mtu2_probe(struct platform_device *pdev) struct sh_mtu2_device *mtu = platform_get_drvdata(pdev); int ret; - if (!is_early_platform_device(pdev)) { + if (!is_sh_early_platform_device(pdev)) { pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); } @@ -472,7 +472,7 @@ static int sh_mtu2_probe(struct platform_device *pdev) pm_runtime_idle(&pdev->dev); return ret; } - if (is_early_platform_device(pdev)) + if (is_sh_early_platform_device(pdev)) return 0; out: @@ -521,7 +521,7 @@ static void __exit sh_mtu2_exit(void) platform_driver_unregister(&sh_mtu2_device_driver); } -early_platform_init("earlytimer", &sh_mtu2_device_driver); +sh_early_platform_init("earlytimer", &sh_mtu2_device_driver); subsys_initcall(sh_mtu2_init); module_exit(sh_mtu2_exit); diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 25f72124b737..389038a1eb0b 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c @@ -608,7 +608,7 @@ static int sh_tmu_probe(struct platform_device *pdev) struct sh_tmu_device *tmu = platform_get_drvdata(pdev); int ret; - if (!is_early_platform_device(pdev)) { + if (!is_sh_early_platform_device(pdev)) { pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); } @@ -628,7 +628,7 @@ static int sh_tmu_probe(struct platform_device *pdev) pm_runtime_idle(&pdev->dev); return ret; } - if (is_early_platform_device(pdev)) + if (is_sh_early_platform_device(pdev)) return 0; out: @@ -678,7 +678,7 @@ static void __exit sh_tmu_exit(void) platform_driver_unregister(&sh_tmu_device_driver); } -early_platform_init("earlytimer", &sh_tmu_device_driver); +sh_early_platform_init("earlytimer", &sh_tmu_device_driver); subsys_initcall(sh_tmu_init); module_exit(sh_tmu_exit); diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 702c370c3694..a22144f07738 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -3193,7 +3193,7 @@ static int sci_probe(struct platform_device *dev) * the special early probe. We don't have sufficient device state * to make it beyond this yet. */ - if (is_early_platform_device(dev)) + if (is_sh_early_platform_device(dev)) return sci_probe_earlyprintk(dev); if (dev->dev.of_node) { @@ -3291,7 +3291,7 @@ static void __exit sci_exit(void) } #ifdef CONFIG_SERIAL_SH_SCI_CONSOLE -early_platform_init_buffer("earlyprintk", &sci_driver, +sh_early_platform_init_buffer("earlyprintk", &sci_driver, early_serial_buf, ARRAY_SIZE(early_serial_buf)); #endif #ifdef CONFIG_SERIAL_SH_SCI_EARLYCON -- 2.17.0