public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc4xx: Remove now unused CONFIG_UART1_CONSOLE
@ 2010-09-21  8:53 Stefan Roese
  2010-09-22  9:04 ` Stefan Roese
  2010-10-06 14:35 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Roese @ 2010-09-21  8:53 UTC (permalink / raw)
  To: u-boot

CONFIG_UART1_CONSOLE was a PPC4xx specific implementation and is now
removed since the move from the 4xx UART driver to the common NS16550
UART driver. Let's remove all references to this define now.

Signed-off-by: Stefan Roese <sr@denx.de>
---
 README                         |    7 -------
 common/serial.c                |    5 +----
 drivers/serial/serial_netarm.c |    5 -----
 3 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/README b/README
index aa11c37..c7a8e9d 100644
--- a/README
+++ b/README
@@ -544,13 +544,6 @@ The following options need to be configured:
 		Leave undefined to disable this feature, including
 		disable the buffer and hardware handshake.
 
-- Console UART Number:
-		CONFIG_UART1_CONSOLE
-
-		AMCC PPC4xx only.
-		If defined internal UART1 (and not UART0) is used
-		as default U-Boot console.
-
 - Boot Delay:	CONFIG_BOOTDELAY - in seconds
 		Delay before automatically booting the default image;
 		set to -1 to disable autoboot.
diff --git a/common/serial.c b/common/serial.c
index dbc74bd..25b235a 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -54,10 +54,7 @@ struct serial_device *__default_serial_console (void)
 #else
 #error "Bad CONFIG_CONS_INDEX."
 #endif
-#elif defined(CONFIG_UART1_CONSOLE)
-		return &serial1_device;
-#else
-		return &serial0_device;
+	return &serial0_device;
 #endif
 #elif defined(CONFIG_MPC512X)
 #if (CONFIG_PSC_CONSOLE == 3)
diff --git a/drivers/serial/serial_netarm.c b/drivers/serial/serial_netarm.c
index 2eb5393..d04790d 100644
--- a/drivers/serial/serial_netarm.c
+++ b/drivers/serial/serial_netarm.c
@@ -51,13 +51,8 @@ DECLARE_GLOBAL_DATA_PTR;
 }
 
 
-#ifndef CONFIG_UART1_CONSOLE
 volatile netarm_serial_channel_t *serial_reg_ch1 = get_serial_channel(0);
 volatile netarm_serial_channel_t *serial_reg_ch2 = get_serial_channel(1);
-#else
-volatile netarm_serial_channel_t *serial_reg_ch1 = get_serial_channel(1);
-volatile netarm_serial_channel_t *serial_reg_ch2 = get_serial_channel(0);
-#endif
 
 extern void _netarm_led_FAIL1(void);
 
-- 
1.7.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ppc4xx: Remove now unused CONFIG_UART1_CONSOLE
  2010-09-21  8:53 [U-Boot] [PATCH] ppc4xx: Remove now unused CONFIG_UART1_CONSOLE Stefan Roese
@ 2010-09-22  9:04 ` Stefan Roese
  2010-10-06 14:35 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2010-09-22  9:04 UTC (permalink / raw)
  To: u-boot

On Tuesday 21 September 2010 10:53:10 Stefan Roese wrote:
> CONFIG_UART1_CONSOLE was a PPC4xx specific implementation and is now
> removed since the move from the 4xx UART driver to the common NS16550
> UART driver. Let's remove all references to this define now.

Applied to u-boot-ppc4xx/next. Thanks.
 
Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ppc4xx: Remove now unused CONFIG_UART1_CONSOLE
  2010-09-21  8:53 [U-Boot] [PATCH] ppc4xx: Remove now unused CONFIG_UART1_CONSOLE Stefan Roese
  2010-09-22  9:04 ` Stefan Roese
@ 2010-10-06 14:35 ` Wolfgang Denk
  2010-10-06 15:38   ` Stefan Roese
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-10-06 14:35 UTC (permalink / raw)
  To: u-boot

Dear Stefan Roese,

In message <1285059190-10056-1-git-send-email-sr@denx.de> you wrote:
> CONFIG_UART1_CONSOLE was a PPC4xx specific implementation and is now
> removed since the move from the 4xx UART driver to the common NS16550
> UART driver. Let's remove all references to this define now.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
>  README                         |    7 -------
>  common/serial.c                |    5 +----
>  drivers/serial/serial_netarm.c |    5 -----
>  3 files changed, 1 insertions(+), 16 deletions(-)

This commit breaks some boards, for example:

-> ./MAKEALL TB5200
Configuring for TB5200 board...
serial.c: In function '__default_serial_console':
serial.c:94: warning: no return statement in function returning non-void

The warning is actually an uncaught error (which is not a surprize in
this mess^H^H^H^Hmaze of #ifdeffery.


>  		set to -1 to disable autoboot.
> diff --git a/common/serial.c b/common/serial.c
> index dbc74bd..25b235a 100644
> --- a/common/serial.c
> +++ b/common/serial.c
> @@ -54,10 +54,7 @@ struct serial_device *__default_serial_console (void)
>  #else
>  #error "Bad CONFIG_CONS_INDEX."
>  #endif
> -#elif defined(CONFIG_UART1_CONSOLE)
> -		return &serial1_device;
> -#else
> -		return &serial0_device;

I think you should not remove the "#else" and "return
&serial0_device;" lines here (but I may be wrong).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
First study the enemy.  Seek weakness.
	-- Romulan Commander, "Balance of Terror", stardate 1709.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ppc4xx: Remove now unused CONFIG_UART1_CONSOLE
  2010-10-06 14:35 ` Wolfgang Denk
@ 2010-10-06 15:38   ` Stefan Roese
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2010-10-06 15:38 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Wednesday 06 October 2010 16:35:38 Wolfgang Denk wrote:
> This commit breaks some boards, for example:
> 
> -> ./MAKEALL TB5200
> Configuring for TB5200 board...
> serial.c: In function '__default_serial_console':
> serial.c:94: warning: no return statement in function returning non-void
> 
> The warning is actually an uncaught error (which is not a surprize in
> this mess^H^H^H^Hmaze of #ifdeffery.

Yes, pretty ugly.
 
> >  		set to -1 to disable autoboot.
> > 
> > diff --git a/common/serial.c b/common/serial.c
> > index dbc74bd..25b235a 100644
> > --- a/common/serial.c
> > +++ b/common/serial.c
> > @@ -54,10 +54,7 @@ struct serial_device *__default_serial_console (void)
> > 
> >  #else
> >  #error "Bad CONFIG_CONS_INDEX."
> >  #endif
> > 
> > -#elif defined(CONFIG_UART1_CONSOLE)
> > -		return &serial1_device;
> > -#else
> > -		return &serial0_device;
> 
> I think you should not remove the "#else" and "return
> &serial0_device;" lines here (but I may be wrong).

I'll check and send a patch to fix this. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-06 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21  8:53 [U-Boot] [PATCH] ppc4xx: Remove now unused CONFIG_UART1_CONSOLE Stefan Roese
2010-09-22  9:04 ` Stefan Roese
2010-10-06 14:35 ` Wolfgang Denk
2010-10-06 15:38   ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox