From: Kevin Hilman <khilman@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Paul Walmsley <paul@pwsan.com>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] omap2+: Fix omap_serial_early_init to work with init_early hook
Date: Thu, 27 Jan 2011 10:01:08 -0800 [thread overview]
Message-ID: <87ei7yp6or.fsf@ti.com> (raw)
In-Reply-To: <20110125022528.GI13589@atomide.com> (Tony Lindgren's message of "Mon, 24 Jan 2011 18:25:28 -0800")
Hi Tony,
Tony Lindgren <tony@atomide.com> writes:
> The new init_early hook happens at the end of setup_arch,
> which is too early for kzalloc. However, there's no need
> to call omap_serial_early_init that early, so fix this
> by setting it up as a core_initcall.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
>
Tested-by: Kevin Hilman <khilman@ti.com>
I boot tested these on 3430/n900, 3630/Zoom3 and 4430ES1.0/PAB.
Kevin
> diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
> index 8f47609..5678c33 100644
> --- a/arch/arm/mach-omap2/io.c
> +++ b/arch/arm/mach-omap2/io.c
> @@ -400,8 +400,6 @@ void __init omap2_init_common_infrastructure(void)
> void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
> struct omap_sdrc_params *sdrc_cs1)
> {
> - omap_serial_early_init();
> -
> if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
> omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
> _omap2_init_reprogram_sdrc();
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 302da74..539ec9c 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -655,7 +655,7 @@ static void serial_out_override(struct uart_port *up, int offset, int value)
> }
> #endif
>
> -void __init omap_serial_early_init(void)
> +static int __init omap_serial_early_init(void)
> {
> int i = 0;
>
> @@ -672,7 +672,7 @@ void __init omap_serial_early_init(void)
>
> uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL);
> if (WARN_ON(!uart))
> - return;
> + return -ENODEV;
>
> uart->oh = oh;
> uart->num = i++;
> @@ -691,7 +691,10 @@ void __init omap_serial_early_init(void)
> */
> uart->oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET;
> } while (1);
> +
> + return 0;
> }
> +core_initcall(omap_serial_early_init);
>
> /**
> * omap_serial_init_port() - initialize single serial port
> diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
> index cec5d56..a1a118d 100644
> --- a/arch/arm/plat-omap/include/plat/serial.h
> +++ b/arch/arm/plat-omap/include/plat/serial.h
> @@ -96,7 +96,6 @@
>
> struct omap_board_data;
>
> -extern void __init omap_serial_early_init(void);
> extern void omap_serial_init(void);
> extern void omap_serial_init_port(struct omap_board_data *bdata);
> extern int omap_uart_can_sleep(void);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-01-27 18:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 17:13 [PATCH] ARM: OMAP2: use early init hook Russell King - ARM Linux
2011-01-23 17:48 ` Russell King - ARM Linux
2011-01-24 20:17 ` Tony Lindgren
2011-01-24 20:26 ` Tony Lindgren
2011-01-24 21:52 ` Russell King - ARM Linux
2011-01-25 2:21 ` Tony Lindgren
2011-01-25 2:24 ` [PATCH] omap2+: Make omap_hwmod_late_init into core_initcall Tony Lindgren
2011-01-25 2:25 ` [PATCH] omap2+: Fix omap_serial_early_init to work with init_early hook Tony Lindgren
2011-01-27 18:01 ` Kevin Hilman [this message]
2011-01-25 19:27 ` [PATCH] omap: hwmod: Populate _mpu_rt_va later on in omap_hwmod_late_init Tony Lindgren
2011-01-25 19:29 ` [PATCH] ARM: OMAP2: use early init hook Tony Lindgren
2011-01-25 15:46 ` Poddar, Sourav
2011-01-25 19:28 ` Tony Lindgren
2011-01-26 10:16 ` Poddar, Sourav
2011-02-14 23:45 ` Tony Lindgren
2011-02-14 23:52 ` [PATCH] omap: Move omap2_check_revision and omap_sram_init out of map_io Tony Lindgren
2011-02-15 1:53 ` Tony Lindgren
2011-02-16 17:20 ` Tony Lindgren
2011-01-24 20:19 ` [PATCH] ARM: OMAP2: use early init hook Tony Lindgren
2011-01-26 8:46 ` Uwe Kleine-König
2011-01-26 8:52 ` Russell King - ARM Linux
2011-01-26 9:11 ` Uwe Kleine-König
2011-01-26 10:31 ` Russell King - ARM Linux
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=87ei7yp6or.fsf@ti.com \
--to=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=paul@pwsan.com \
--cc=tony@atomide.com \
/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