From: "Heiko Stübner" <heiko@sntech.de>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Kukjin Kim <kgene.kim@samsung.com>,
linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
'Ben Dooks' <ben-linux@fluff.org>
Subject: Re: [PATCH 4/8] S3C2416: move io-init to SoC specific files
Date: Tue, 17 Jan 2012 23:23:12 +0100 [thread overview]
Message-ID: <201201172323.12958.heiko@sntech.de> (raw)
In-Reply-To: <20120117214336.GX1068@n2100.arm.linux.org.uk>
Am Dienstag 17 Januar 2012, 22:43:36 schrieb Russell King - ARM Linux:
> On Tue, Jan 17, 2012 at 10:13:26PM +0100, Heiko Stübner wrote:
> > +/* minimal IO mapping */
> > +
> > +static struct map_desc s3c_iodesc[] __initdata = {
> > + IODESC_ENT(GPIO),
> > + IODESC_ENT(IRQ),
> > + IODESC_ENT(MEMCTRL),
> > + IODESC_ENT(UART)
> > +};
> > +
> > +void __init s3c2416_init_io(struct map_desc *mach_desc, int size)
> > +{
> > + /* initialise the io descriptors we need for initialisation */
> > + iotable_init(mach_desc, size);
> > + iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
> > +
> > + samsung_cpu_id = __raw_readl(S3C24XX_GSTATUS1);
> > + s3c24xx_init_cpu();
> > +
> > + s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
> > +}
>
> Why do we need this implemented in every Samsung mach directory?
> Why not provide a new function in arch/arm/plat-s3c24xx/cpu.c:
>
> void __init s3c24xx_common_init_io(void __iomem *id_reg, struct cpu_table
> *ids, size_t nr_ids)
> {
> iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
>
> samsung_cpu_id = __raw_readl(id_reg);
> s3c24xx_init_cpu();
> s3c_init_cpu(samsung_cpu_id, ids, nr_ids);
> }
>
> and then this becomes:
>
> void __init s3c2416_init_io(struct map_desc *mach_desc, int size)
> {
> /* initialise the io descriptors we need for initialisation */
> iotable_init(mach_desc, size);
> s3c24xx_common_init_io(S3C24XX_GSTATUS1, cpu_ids, ARRAY_SIZE(cpu_ids));
> }
this looks nice, and you're right of course, this is much saner.
WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/8] S3C2416: move io-init to SoC specific files
Date: Tue, 17 Jan 2012 23:23:12 +0100 [thread overview]
Message-ID: <201201172323.12958.heiko@sntech.de> (raw)
In-Reply-To: <20120117214336.GX1068@n2100.arm.linux.org.uk>
Am Dienstag 17 Januar 2012, 22:43:36 schrieb Russell King - ARM Linux:
> On Tue, Jan 17, 2012 at 10:13:26PM +0100, Heiko St?bner wrote:
> > +/* minimal IO mapping */
> > +
> > +static struct map_desc s3c_iodesc[] __initdata = {
> > + IODESC_ENT(GPIO),
> > + IODESC_ENT(IRQ),
> > + IODESC_ENT(MEMCTRL),
> > + IODESC_ENT(UART)
> > +};
> > +
> > +void __init s3c2416_init_io(struct map_desc *mach_desc, int size)
> > +{
> > + /* initialise the io descriptors we need for initialisation */
> > + iotable_init(mach_desc, size);
> > + iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
> > +
> > + samsung_cpu_id = __raw_readl(S3C24XX_GSTATUS1);
> > + s3c24xx_init_cpu();
> > +
> > + s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
> > +}
>
> Why do we need this implemented in every Samsung mach directory?
> Why not provide a new function in arch/arm/plat-s3c24xx/cpu.c:
>
> void __init s3c24xx_common_init_io(void __iomem *id_reg, struct cpu_table
> *ids, size_t nr_ids)
> {
> iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
>
> samsung_cpu_id = __raw_readl(id_reg);
> s3c24xx_init_cpu();
> s3c_init_cpu(samsung_cpu_id, ids, nr_ids);
> }
>
> and then this becomes:
>
> void __init s3c2416_init_io(struct map_desc *mach_desc, int size)
> {
> /* initialise the io descriptors we need for initialisation */
> iotable_init(mach_desc, size);
> s3c24xx_common_init_io(S3C24XX_GSTATUS1, cpu_ids, ARRAY_SIZE(cpu_ids));
> }
this looks nice, and you're right of course, this is much saner.
next prev parent reply other threads:[~2012-01-17 22:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 21:10 [PATCH v2 0/8] S3C24XX: remove global plat/s3c24??.h SoC-headers Heiko Stübner
2012-01-17 21:10 ` Heiko Stübner
2012-01-17 21:11 ` [PATCH 1/8] S3C24XX: Remove extern declaration of clk_msysclk Heiko Stübner
2012-01-17 21:11 ` Heiko Stübner
2012-01-17 21:12 ` [PATCH 2/8] S3C24XX: move common S3C2443 clock definitions to clock.h Heiko Stübner
2012-01-17 21:12 ` Heiko Stübner
2012-01-17 21:12 ` [PATCH 3/8] S3C2410: move s3c2410_baseclk_add " Heiko Stübner
2012-01-17 21:12 ` Heiko Stübner
2012-01-17 21:13 ` [PATCH 4/8] S3C2416: move io-init to SoC specific files Heiko Stübner
2012-01-17 21:13 ` Heiko Stübner
2012-01-17 21:43 ` Russell King - ARM Linux
2012-01-17 21:43 ` Russell King - ARM Linux
2012-01-17 22:23 ` Heiko Stübner [this message]
2012-01-17 22:23 ` Heiko Stübner
2012-01-17 21:14 ` [PATCH 5/8] S3C2443: " Heiko Stübner
2012-01-17 21:14 ` Heiko Stübner
2012-01-17 21:15 ` [PATCH 6/8] S3C2440: " Heiko Stübner
2012-01-17 21:15 ` Heiko Stübner
2012-01-17 21:16 ` [PATCH 7/8] S3C2412: " Heiko Stübner
2012-01-17 21:16 ` Heiko Stübner
2012-01-17 21:50 ` Russell King - ARM Linux
2012-01-17 21:50 ` Russell King - ARM Linux
2012-01-17 21:16 ` [PATCH 8/8] S3C2410: " Heiko Stübner
2012-01-17 21:16 ` Heiko Stübner
2012-01-17 21:58 ` [PATCH v2 0/8] S3C24XX: remove global plat/s3c24??.h SoC-headers Russell King - ARM Linux
2012-01-17 21:58 ` Russell King - ARM Linux
-- strict thread matches above, loose matches on Subject: below --
2012-01-06 23:22 [PATCH " Heiko Stübner
2012-01-06 23:26 ` [PATCH 4/8] S3C2416: move io-init to SoC specific files Heiko Stübner
2012-01-06 23:26 ` Heiko Stübner
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=201201172323.12958.heiko@sntech.de \
--to=heiko@sntech.de \
--cc=ben-linux@fluff.org \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.