* [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init
@ 2010-02-25 9:40 Thomas Weber
2010-02-25 18:43 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Weber @ 2010-02-25 9:40 UTC (permalink / raw)
To: linux-arm-kernel
The omap_serial_early_init prints the following errors:
Could not get uart4_ick
Could not get uart4_fck
because all the uarts available in omap_uart[] will be initialized.
Only omap4430 and omap3630 have 4 uarts at the moment.
This patch reduces the number of uarts when cpu is not omap4430 or
omap3630.
Signed-off-by: Thomas Weber <weber@corscience.de>
---
arch/arm/mach-omap2/serial.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index b79bc89..da77930 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -644,16 +644,21 @@ static void serial_out_override(struct uart_port *up, int offset, int value)
}
void __init omap_serial_early_init(void)
{
- int i;
+ int i, nr_ports;
char name[16];
+ if (!(cpu_is_omap3630() || cpu_is_omap4430()))
+ nr_ports = 3;
+ else
+ nr_ports = ARRAY_SIZE(omap_uart);
+
/*
* Make sure the serial ports are muxed on at this point.
* You have to mux them off in device drivers later on
* if not needed.
*/
- for (i = 0; i < ARRAY_SIZE(omap_uart); i++) {
+ for (i = 0; i < nr_ports; i++) {
struct omap_uart_state *uart = &omap_uart[i];
struct platform_device *pdev = &uart->pdev;
struct device *dev = &pdev->dev;
@@ -669,17 +674,17 @@ void __init omap_serial_early_init(void)
continue;
}
- sprintf(name, "uart%d_ick", i+1);
+ sprintf(name, "uart%d_ick", i + 1);
uart->ick = clk_get(NULL, name);
if (IS_ERR(uart->ick)) {
- printk(KERN_ERR "Could not get uart%d_ick\n", i+1);
+ printk(KERN_ERR "Could not get uart%d_ick\n", i + 1);
uart->ick = NULL;
}
sprintf(name, "uart%d_fck", i+1);
uart->fck = clk_get(NULL, name);
if (IS_ERR(uart->fck)) {
- printk(KERN_ERR "Could not get uart%d_fck\n", i+1);
+ printk(KERN_ERR "Could not get uart%d_fck\n", i + 1);
uart->fck = NULL;
}
--
1.6.4.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init
2010-02-25 9:40 [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init Thomas Weber
@ 2010-02-25 18:43 ` Tony Lindgren
2010-02-25 18:53 ` Shilimkar, Santosh
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2010-02-25 18:43 UTC (permalink / raw)
To: linux-arm-kernel
* Thomas Weber <swirl@gmx.li> [100225 01:36]:
>
> The omap_serial_early_init prints the following errors:
>
> Could not get uart4_ick
> Could not get uart4_fck
>
> because all the uarts available in omap_uart[] will be initialized.
> Only omap4430 and omap3630 have 4 uarts at the moment.
> This patch reduces the number of uarts when cpu is not omap4430 or
> omap3630.
..and I only patched omap_serial_init and forgot about
the omap_serial_early_init..
Looks good to me, Sergio, care to test and Ack this? Also, sounds
like we still need to patch omap4 for uart4 for the clocks.
Regards,
Tony
> Signed-off-by: Thomas Weber <weber@corscience.de>
> ---
> arch/arm/mach-omap2/serial.c | 15 ++++++++++-----
> 1 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index b79bc89..da77930 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -644,16 +644,21 @@ static void serial_out_override(struct uart_port *up, int offset, int value)
> }
> void __init omap_serial_early_init(void)
> {
> - int i;
> + int i, nr_ports;
> char name[16];
>
> + if (!(cpu_is_omap3630() || cpu_is_omap4430()))
> + nr_ports = 3;
> + else
> + nr_ports = ARRAY_SIZE(omap_uart);
> +
> /*
> * Make sure the serial ports are muxed on at this point.
> * You have to mux them off in device drivers later on
> * if not needed.
> */
>
> - for (i = 0; i < ARRAY_SIZE(omap_uart); i++) {
> + for (i = 0; i < nr_ports; i++) {
> struct omap_uart_state *uart = &omap_uart[i];
> struct platform_device *pdev = &uart->pdev;
> struct device *dev = &pdev->dev;
> @@ -669,17 +674,17 @@ void __init omap_serial_early_init(void)
> continue;
> }
>
> - sprintf(name, "uart%d_ick", i+1);
> + sprintf(name, "uart%d_ick", i + 1);
> uart->ick = clk_get(NULL, name);
> if (IS_ERR(uart->ick)) {
> - printk(KERN_ERR "Could not get uart%d_ick\n", i+1);
> + printk(KERN_ERR "Could not get uart%d_ick\n", i + 1);
> uart->ick = NULL;
> }
>
> sprintf(name, "uart%d_fck", i+1);
> uart->fck = clk_get(NULL, name);
> if (IS_ERR(uart->fck)) {
> - printk(KERN_ERR "Could not get uart%d_fck\n", i+1);
> + printk(KERN_ERR "Could not get uart%d_fck\n", i + 1);
> uart->fck = NULL;
> }
>
> --
> 1.6.4.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init
2010-02-25 18:43 ` Tony Lindgren
@ 2010-02-25 18:53 ` Shilimkar, Santosh
2010-02-25 18:57 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Shilimkar, Santosh @ 2010-02-25 18:53 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: Tony Lindgren [mailto:tony at atomide.com]
> Sent: Friday, February 26, 2010 12:14 AM
> To: Thomas Weber; Aguirre, Sergio
> Cc: linux-omap at vger.kernel.org; Russell King; Kevin Hilman; Shilimkar, Santosh; Pandita, Vikram;
> Syed, Rafiuddin; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Thomas Weber
> Subject: Re: [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init
>
> * Thomas Weber <swirl@gmx.li> [100225 01:36]:
> >
> > The omap_serial_early_init prints the following errors:
> >
> > Could not get uart4_ick
> > Could not get uart4_fck
> >
> > because all the uarts available in omap_uart[] will be initialized.
> > Only omap4430 and omap3630 have 4 uarts at the moment.
> > This patch reduces the number of uarts when cpu is not omap4430 or
> > omap3630.
>
> ..and I only patched omap_serial_init and forgot about
> the omap_serial_early_init..
>
> Looks good to me, Sergio, care to test and Ack this? Also, sounds
> like we still need to patch omap4 for uart4 for the clocks.
>
Clocks will be take care automatically by "nr_ports" for omap4 too
with this patch. Below clock changes are just cosmetic ones, isn't it ?
Am I missing something?
> Regards,
>
> Tony
>
> > Signed-off-by: Thomas Weber <weber@corscience.de>
> > ---
> > arch/arm/mach-omap2/serial.c | 15 ++++++++++-----
> > 1 files changed, 10 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> > index b79bc89..da77930 100644
> > --- a/arch/arm/mach-omap2/serial.c
> > +++ b/arch/arm/mach-omap2/serial.c
> > @@ -644,16 +644,21 @@ static void serial_out_override(struct uart_port *up, int offset, int value)
> > }
> > void __init omap_serial_early_init(void)
> > {
> > - int i;
> > + int i, nr_ports;
> > char name[16];
> >
> > + if (!(cpu_is_omap3630() || cpu_is_omap4430()))
> > + nr_ports = 3;
> > + else
> > + nr_ports = ARRAY_SIZE(omap_uart);
> > +
> > /*
> > * Make sure the serial ports are muxed on at this point.
> > * You have to mux them off in device drivers later on
> > * if not needed.
> > */
> >
> > - for (i = 0; i < ARRAY_SIZE(omap_uart); i++) {
> > + for (i = 0; i < nr_ports; i++) {
> > struct omap_uart_state *uart = &omap_uart[i];
> > struct platform_device *pdev = &uart->pdev;
> > struct device *dev = &pdev->dev;
> > @@ -669,17 +674,17 @@ void __init omap_serial_early_init(void)
> > continue;
> > }
> >
> > - sprintf(name, "uart%d_ick", i+1);
> > + sprintf(name, "uart%d_ick", i + 1);
> > uart->ick = clk_get(NULL, name);
> > if (IS_ERR(uart->ick)) {
> > - printk(KERN_ERR "Could not get uart%d_ick\n", i+1);
> > + printk(KERN_ERR "Could not get uart%d_ick\n", i + 1);
> > uart->ick = NULL;
> > }
> >
> > sprintf(name, "uart%d_fck", i+1);
> > uart->fck = clk_get(NULL, name);
> > if (IS_ERR(uart->fck)) {
> > - printk(KERN_ERR "Could not get uart%d_fck\n", i+1);
> > + printk(KERN_ERR "Could not get uart%d_fck\n", i + 1);
> > uart->fck = NULL;
> > }
> >
> > --
> > 1.6.4.4
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init
2010-02-25 18:53 ` Shilimkar, Santosh
@ 2010-02-25 18:57 ` Tony Lindgren
2010-02-25 18:58 ` Shilimkar, Santosh
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2010-02-25 18:57 UTC (permalink / raw)
To: linux-arm-kernel
* Shilimkar, Santosh <santosh.shilimkar@ti.com> [100225 10:51]:
>
> > -----Original Message-----
> > From: Tony Lindgren [mailto:tony at atomide.com]
> > Sent: Friday, February 26, 2010 12:14 AM
> > To: Thomas Weber; Aguirre, Sergio
> > Cc: linux-omap at vger.kernel.org; Russell King; Kevin Hilman; Shilimkar, Santosh; Pandita, Vikram;
> > Syed, Rafiuddin; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Thomas Weber
> > Subject: Re: [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init
> >
> > * Thomas Weber <swirl@gmx.li> [100225 01:36]:
> > >
> > > The omap_serial_early_init prints the following errors:
> > >
> > > Could not get uart4_ick
> > > Could not get uart4_fck
> > >
> > > because all the uarts available in omap_uart[] will be initialized.
> > > Only omap4430 and omap3630 have 4 uarts at the moment.
> > > This patch reduces the number of uarts when cpu is not omap4430 or
> > > omap3630.
> >
> > ..and I only patched omap_serial_init and forgot about
> > the omap_serial_early_init..
> >
> > Looks good to me, Sergio, care to test and Ack this? Also, sounds
> > like we still need to patch omap4 for uart4 for the clocks.
> >
> Clocks will be take care automatically by "nr_ports" for omap4 too
> with this patch. Below clock changes are just cosmetic ones, isn't it ?
>
> Am I missing something?
Yes sorry, I'm referring to "[RFC][PATCH 0/3] OMAP3630: UART4 startup"
series to fix the uart4 issues for 3630, not omap4.
Regards,
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init
2010-02-25 18:57 ` Tony Lindgren
@ 2010-02-25 18:58 ` Shilimkar, Santosh
0 siblings, 0 replies; 5+ messages in thread
From: Shilimkar, Santosh @ 2010-02-25 18:58 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: Tony Lindgren [mailto:tony at atomide.com]
> Sent: Friday, February 26, 2010 12:28 AM
> To: Shilimkar, Santosh
> Cc: Thomas Weber; Aguirre, Sergio; linux-omap at vger.kernel.org; Russell King; Kevin Hilman; Pandita,
> Vikram; Syed, Rafiuddin; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Thomas
> Weber
> Subject: Re: [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init
>
> * Shilimkar, Santosh <santosh.shilimkar@ti.com> [100225 10:51]:
> >
> > > -----Original Message-----
> > > From: Tony Lindgren [mailto:tony at atomide.com]
> > > Sent: Friday, February 26, 2010 12:14 AM
> > > To: Thomas Weber; Aguirre, Sergio
> > > Cc: linux-omap at vger.kernel.org; Russell King; Kevin Hilman; Shilimkar, Santosh; Pandita, Vikram;
> > > Syed, Rafiuddin; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Thomas Weber
> > > Subject: Re: [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init
> > >
> > > * Thomas Weber <swirl@gmx.li> [100225 01:36]:
> > > >
> > > > The omap_serial_early_init prints the following errors:
> > > >
> > > > Could not get uart4_ick
> > > > Could not get uart4_fck
> > > >
> > > > because all the uarts available in omap_uart[] will be initialized.
> > > > Only omap4430 and omap3630 have 4 uarts at the moment.
> > > > This patch reduces the number of uarts when cpu is not omap4430 or
> > > > omap3630.
> > >
> > > ..and I only patched omap_serial_init and forgot about
> > > the omap_serial_early_init..
> > >
> > > Looks good to me, Sergio, care to test and Ack this? Also, sounds
> > > like we still need to patch omap4 for uart4 for the clocks.
> > >
> > Clocks will be take care automatically by "nr_ports" for omap4 too
> > with this patch. Below clock changes are just cosmetic ones, isn't it ?
> >
> > Am I missing something?
>
> Yes sorry, I'm referring to "[RFC][PATCH 0/3] OMAP3630: UART4 startup"
> series to fix the uart4 issues for 3630, not omap4.
>
OK
Regards,
Santosh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-25 18:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25 9:40 [RESEND][PATCH/RFC] OMAP2: serial.c: Fix number of uarts in early_init Thomas Weber
2010-02-25 18:43 ` Tony Lindgren
2010-02-25 18:53 ` Shilimkar, Santosh
2010-02-25 18:57 ` Tony Lindgren
2010-02-25 18:58 ` Shilimkar, Santosh
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).