From: horms@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] ARM: shmobile: sh73a0 pinmux platform device cleanup
Date: Tue, 11 Jun 2013 13:48:47 +0900 [thread overview]
Message-ID: <20130611044847.GH15593@verge.net.au> (raw)
In-Reply-To: <1722811.MCTrRecTtK@avalon>
On Mon, Jun 10, 2013 at 02:31:31PM +0200, Laurent Pinchart wrote:
> Hi Simon,
>
> On Tuesday 04 June 2013 22:20:59 Simon Horman wrote:
> > On Tue, Jun 04, 2013 at 02:20:43PM +0900, Simon Horman wrote:
> > > On Mon, May 27, 2013 at 09:02:43PM -0700, Olof Johansson wrote:
> > > > On Mon, May 27, 2013 at 06:13:22PM +0400, Sergei Shtylyov wrote:
> > > > > On 27-05-2013 13:00, Simon Horman wrote:
> > > > > >From: Magnus Damm <damm@opensource.se>
> > > > > >
> > > > > >Use DEFINE_RES_MEM() and platform_device_register_simple()
> > > > > >to save a couple of lines of code.
> > > > > >
> > > > > >Signed-off-by: Magnus Damm <damm@opensource.se>
> > > > > >Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > > > >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > > > >---
> > > > > >
> > > > > > arch/arm/mach-shmobile/setup-sh73a0.c | 25
> > > > > > ++++++-------------------
> > > > > > 1 file changed, 6 insertions(+), 19 deletions(-)
> > > > > >
> > > > > >diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c
> > > > > >b/arch/arm/mach-shmobile/setup-sh73a0.c index fdf3894..f8f4261
> > > > > >100644
> > > > > >--- a/arch/arm/mach-shmobile/setup-sh73a0.c
> > > > > >+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
> > > > > >@@ -61,29 +61,16 @@ void __init sh73a0_map_io(void)
> > > > >
> > > > > [...]
> > > > >
> > > > > >+/* PFC */
> > > > > >+static const struct resource pfc_resources[] = {
> > > > > >
> > > > > Should have been annotated as __initdata... too late, need
> > > > >
> > > > > another patch.
> > > >
> > > > See comments on other patches/pull requests, I think there's time to
> > > > revisit this. I.e. I'll hold off on pulling this based on the other
> > > > feedback.
> > >
> > > As I am respining I will fix this.
> > >
> > > However, it had been reviewed and I think that ordinarily
> > > it would be reasonable to perform further clean-up
> > > work in a subsequent patch.
> >
> > I decided to simply drop the patch and revisit it later.
>
> This patch (as well as the sh7372 equivalent) is pretty simple. What about
> just adding __initdata and resubmitting them ? Otherwise they will get lost.
Sure. I took a look at doing this but with the patch below applied I see:
# make kzm9g_defconfig
# make
In file included from arch/arm/mach-shmobile/setup-sh73a0.c:27:
include/linux/platform_device.h: In function ?sh73a0_pinmux_init?:
arch/arm/mach-shmobile/setup-sh73a0.c:65: error: pfc_resources causes a section type conflict
>From 23ea305bcb4513e33ad636b1c735439993fcff74 Mon Sep 17 00:00:00 2001
From: Magnus Damm <damm@opensource.se>
Date: Mon, 27 May 2013 09:00:45 +0000
Subject: [PATCH] ARM: shmobile: sh73a0 pinmux platform device cleanup
Use DEFINE_RES_MEM() and platform_device_register_simple()
to save a couple of lines of code.
Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[ Annotate pfc_resources with __initdata: causes section missmatch! ]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-sh73a0.c | 25 ++++++-------------------
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index c5028f1f..7d90eed 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -61,29 +61,16 @@ void __init sh73a0_map_io(void)
iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
}
-static struct resource sh73a0_pfc_resources[] = {
- [0] = {
- .start = 0xe6050000,
- .end = 0xe6057fff,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = 0xe605801c,
- .end = 0xe6058027,
- .flags = IORESOURCE_MEM,
- }
-};
-
-static struct platform_device sh73a0_pfc_device = {
- .name = "pfc-sh73a0",
- .id = -1,
- .resource = sh73a0_pfc_resources,
- .num_resources = ARRAY_SIZE(sh73a0_pfc_resources),
+/* PFC */
+static const struct resource pfc_resources[] __initdata = {
+ DEFINE_RES_MEM(0xe6050000, 0x8000),
+ DEFINE_RES_MEM(0xe605801c, 0x000c),
};
void __init sh73a0_pinmux_init(void)
{
- platform_device_register(&sh73a0_pfc_device);
+ platform_device_register_simple("pfc-sh73a0", -1, pfc_resources,
+ ARRAY_SIZE(pfc_resources));
}
static struct plat_sci_port scif0_platform_data = {
--
1.8.2.1
next prev parent reply other threads:[~2013-06-11 4:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 9:00 [GIT PULL] Renesas ARM based sh73a0 SoC updates for v3.11 Simon Horman
2013-05-27 9:00 ` [PATCH 1/8] ARM: shmobile: sh73a0 pinmux platform device cleanup Simon Horman
2013-05-27 14:13 ` Sergei Shtylyov
2013-05-28 4:02 ` Olof Johansson
2013-06-04 5:20 ` Simon Horman
2013-06-04 13:20 ` Simon Horman
2013-06-10 12:31 ` Laurent Pinchart
2013-06-11 4:48 ` Simon Horman [this message]
2013-06-19 0:37 ` Laurent Pinchart
2013-05-27 9:00 ` [PATCH 2/8] ARM: shmobile: sh73a0: add support for adjusting CPU frequency Simon Horman
2013-05-27 9:00 ` [PATCH 3/8] ARM: shmobile: sh73a0: add CPUFreq support Simon Horman
2013-05-27 9:00 ` [PATCH 4/8] ARM: shmobile: sh73a0: Use DEFINE_RES_MEM*() everywhere Simon Horman
2013-05-27 9:00 ` [PATCH 5/8] ARM: shmobile: sh73a0: Remove init_irq declaration in machine description Simon Horman
2013-05-27 9:00 ` [PATCH 6/8] ARM: shmobile: sh73a0: Always use shmobile_setup_delay() Simon Horman
2013-05-27 9:00 ` [PATCH 7/8] ARM: shmobile: sh73a0: do not overwrite all div4 clock operations Simon Horman
2013-05-27 9:00 ` [PATCH 8/8] ARM: shmobile: sh73a0: div4 clocks must check the kick bit before changing rate Simon Horman
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=20130611044847.GH15593@verge.net.au \
--to=horms@verge.net.au \
--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