From: magnus.damm@gmail.com (Magnus Damm)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case
Date: Fri, 09 Aug 2013 18:48:32 +0900 [thread overview]
Message-ID: <20130809094832.6530.9438.sendpatchset@w520> (raw)
In-Reply-To: <20130809094748.6530.16511.sendpatchset@w520>
From: Magnus Damm <damm@opensource.se>
No need to special case sh73a0 ->init_machine(),
so get rid of undesired cpufreq platform device
from the generic long term sh73a0 DT support code.
For short term support on KZM9D the DT reference
implementation now adds a "cpufreq-cpu0" platform
device so that can be used for development.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/board-kzm9g-reference.c | 9 ++++++++-
arch/arm/mach-shmobile/include/mach/sh73a0.h | 2 +-
arch/arm/mach-shmobile/setup-sh73a0.c | 23 ++++++-----------------
3 files changed, 15 insertions(+), 19 deletions(-)
--- 0001/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ work/arch/arm/mach-shmobile/board-kzm9g-reference.c 2013-08-08 15:56:28.000000000 +0900
@@ -33,7 +33,14 @@
static void __init kzm_init(void)
{
- sh73a0_add_standard_devices_dt();
+ /* clocks are setup late during boot in the case of DT */
+ sh73a0_clock_init();
+
+ sh73a0_add_dt_devices();
+
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
#ifdef CONFIG_CACHE_L2X0
/* Early BRESP enable, Shared attribute override enable, 64K*8way */
--- 0001/arch/arm/mach-shmobile/include/mach/sh73a0.h
+++ work/arch/arm/mach-shmobile/include/mach/sh73a0.h 2013-08-08 15:54:26.000000000 +0900
@@ -78,7 +78,7 @@ extern void sh73a0_map_io(void);
extern void sh73a0_earlytimer_init(void);
extern void sh73a0_add_early_devices(void);
extern void sh73a0_add_standard_devices(void);
-extern void sh73a0_add_standard_devices_dt(void);
+extern void sh73a0_add_dt_devices(void);
extern void sh73a0_clock_init(void);
extern void sh73a0_pinmux_init(void);
extern void sh73a0_pm_init(void);
--- 0001/arch/arm/mach-shmobile/setup-sh73a0.c
+++ work/arch/arm/mach-shmobile/setup-sh73a0.c 2013-08-08 15:57:42.000000000 +0900
@@ -23,7 +23,6 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/platform_device.h>
-#include <linux/of_platform.h>
#include <linux/delay.h>
#include <linux/input.h>
#include <linux/io.h>
@@ -901,6 +900,12 @@ static struct platform_device *sh73a0_la
#define SRCR2 IOMEM(0xe61580b0)
+void __init sh73a0_add_dt_devices(void)
+{
+ platform_add_devices(sh73a0_devices_dt,
+ ARRAY_SIZE(sh73a0_devices_dt));
+}
+
void __init sh73a0_add_standard_devices(void)
{
/* Clear software reset bit on SY-DMAC module */
@@ -943,21 +948,6 @@ void __init sh73a0_add_early_devices(voi
#ifdef CONFIG_USE_OF
-void __init sh73a0_add_standard_devices_dt(void)
-{
- struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, };
-
- /* clocks are setup late during boot in the case of DT */
- sh73a0_clock_init();
-
- platform_add_devices(sh73a0_devices_dt,
- ARRAY_SIZE(sh73a0_devices_dt));
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
- /* Instantiate cpufreq-cpu0 */
- platform_device_register_full(&devinfo);
-}
-
static const char *sh73a0_boards_compat_dt[] __initdata = {
"renesas,sh73a0",
NULL,
@@ -968,7 +958,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH7
.map_io = sh73a0_map_io,
.init_early = sh73a0_init_delay,
.nr_irqs = NR_IRQS_LEGACY,
- .init_machine = sh73a0_add_standard_devices_dt,
.dt_compat = sh73a0_boards_compat_dt,
MACHINE_END
#endif /* CONFIG_USE_OF */
next prev parent reply other threads:[~2013-08-09 9:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
2013-08-09 9:47 ` [PATCH 01/14] ARM: shmobile: r8a7779: Remove ->init_machine() special case Magnus Damm
2013-08-09 9:48 ` [PATCH 02/14] ARM: shmobile: r8a7740: " Magnus Damm
2013-08-09 9:48 ` [PATCH 03/14] ARM: shmobile: sh7372: " Magnus Damm
2013-08-09 9:48 ` Magnus Damm [this message]
2013-08-09 10:47 ` [PATCH 04/14] ARM: shmobile: sh73a0: " Laurent Pinchart
2013-08-28 6:40 ` Magnus Damm
2013-08-28 12:08 ` Laurent Pinchart
2013-08-28 12:19 ` Magnus Damm
2013-08-30 0:30 ` Laurent Pinchart
2013-08-30 6:58 ` Magnus Damm
2013-08-09 9:48 ` [PATCH 05/14] ARM: shmobile: Remove r8a7740_add_early_devices_dt() Magnus Damm
2013-08-09 9:48 ` [PATCH 06/14] ARM: shmobile: Remove sh73a0_init_irq_dt() Magnus Damm
2013-08-09 9:49 ` [PATCH 07/14] ARM: shmobile: Remove r8a7779 ->nr_irqs Magnus Damm
2013-08-09 9:49 ` [PATCH 08/14] ARM: shmobile: Remove sh73a0 ->nr_irqs Magnus Damm
2013-08-09 9:49 ` [PATCH 09/14] ARM: shmobile: Rename to sh7372_init_early() Magnus Damm
2013-08-09 10:40 ` Laurent Pinchart
2013-08-09 9:49 ` [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops() Magnus Damm
2013-08-09 10:41 ` Laurent Pinchart
2013-08-28 7:03 ` Magnus Damm
2013-08-28 7:53 ` Laurent Pinchart
2013-08-09 9:49 ` [PATCH 11/14] ARM: shmobile: Rename to r8a7779_init_early(), " Magnus Damm
2013-08-09 9:49 ` [PATCH 12/14] ARM: shmobile: Rename to r8a7740_init_early() Magnus Damm
2013-08-09 9:50 ` [PATCH 13/14] ARM: shmobile: Rename to r8a7778_init_early() Magnus Damm
2013-08-09 9:50 ` [PATCH 14/14] ARM: shmobile: Rename to sh73a0_init_early(), use smp_set_ops() Magnus Damm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130809094832.6530.9438.sendpatchset@w520 \
--to=magnus.damm@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).