All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] serial: remove calls to serial_assign()
@ 2012-10-25 23:30 Allen Martin
  2012-10-25 23:39 ` Joe Hershberger
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Allen Martin @ 2012-10-25 23:30 UTC (permalink / raw)
  To: u-boot

Remove calls to serial_assign() that are failing now that it returns a
proper error code.  This calls were not actually doing anything
because they passed the name of a stdio_dev when a serial_device name
is exptectd.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 common/cmd_nvedit.c |    3 ---
 common/iomux.c      |   10 ----------
 2 files changed, 13 deletions(-)

diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 1f9c674..68c38f4 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -238,9 +238,6 @@ int env_check_apply(const char *name, const char *oldval,
 		/* Try assigning specified device */
 		if (console_assign(console, newval) < 0)
 			return 1;
-
-		if (serial_assign(newval) < 0)
-			return 1;
 #endif /* CONFIG_CONSOLE_MUX */
 	}
 
diff --git a/common/iomux.c b/common/iomux.c
index dbc2312..6a75704 100644
--- a/common/iomux.c
+++ b/common/iomux.c
@@ -135,16 +135,6 @@ int iomux_doenv(const int console, const char *arg)
 		 */
 		if (console_assign(console, start[j]) < 0)
 			continue;
-		/*
-		 * This was taken from common/cmd_nvedit.c.
-		 * This will never work because serial_assign() returns
-		 * 1 upon error, not -1.
-		 * This would almost always return an error anyway because
-		 * serial_assign() expects the name of a serial device, like
-		 * serial_smc, but the user generally only wants to set serial.
-		 */
-		if (serial_assign(start[j]) < 0)
-			continue;
 		cons_set[cs_idx++] = dev;
 	}
 	free(console_args);
-- 
1.7.10.4

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

* [U-Boot] [PATCH] serial: remove calls to serial_assign()
  2012-10-25 23:30 [U-Boot] [PATCH] serial: remove calls to serial_assign() Allen Martin
@ 2012-10-25 23:39 ` Joe Hershberger
  2012-10-26  7:10   ` Marek Vasut
  2012-10-26 16:35 ` Tom Rini
  2012-10-26 22:12 ` Tom Warren
  2 siblings, 1 reply; 9+ messages in thread
From: Joe Hershberger @ 2012-10-25 23:39 UTC (permalink / raw)
  To: u-boot

Hi Allen,

On Thu, Oct 25, 2012 at 6:30 PM, Allen Martin <amartin@nvidia.com> wrote:
> Remove calls to serial_assign() that are failing now that it returns a
> proper error code.  This calls were not actually doing anything
> because they passed the name of a stdio_dev when a serial_device name
> is exptectd.
>
> Signed-off-by: Allen Martin <amartin@nvidia.com>
> ---

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

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

* [U-Boot] [PATCH] serial: remove calls to serial_assign()
  2012-10-25 23:39 ` Joe Hershberger
@ 2012-10-26  7:10   ` Marek Vasut
  2012-10-26 14:53     ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2012-10-26  7:10 UTC (permalink / raw)
  To: u-boot

Dear Joe Hershberger,

> Hi Allen,
> 
> On Thu, Oct 25, 2012 at 6:30 PM, Allen Martin <amartin@nvidia.com> wrote:
> > Remove calls to serial_assign() that are failing now that it returns a
> > proper error code.  This calls were not actually doing anything
> > because they passed the name of a stdio_dev when a serial_device name
> > is exptectd.
> > 
> > Signed-off-by: Allen Martin <amartin@nvidia.com>
> > ---
> 
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] serial: remove calls to serial_assign()
  2012-10-26  7:10   ` Marek Vasut
@ 2012-10-26 14:53     ` Tom Rini
  2012-10-26 15:50       ` Simon Glass
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2012-10-26 14:53 UTC (permalink / raw)
  To: u-boot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/26/12 00:10, Marek Vasut wrote:
> Dear Joe Hershberger,
> 
>> Hi Allen,
>> 
>> On Thu, Oct 25, 2012 at 6:30 PM, Allen Martin 
>> <amartin@nvidia.com> wrote:
>>> Remove calls to serial_assign() that are failing now that it 
>>> returns a proper error code.  This calls were not actually 
>>> doing anything because they passed the name of a stdio_dev
>>> when a serial_device name is exptectd.
>>> 
>>> Signed-off-by: Allen Martin <amartin@nvidia.com> ---
>> 
>> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
> 
> Acked-by: Marek Vasut <marex@denx.de>

And this indeed fixes Tegra, right?

- -- 
Tom

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQiqPmAAoJENk4IS6UOR1WKDYP/3MhXxoz2CvBGSKk707eVxVi
5v27gFuLxds759Ozd8gf+zZmUFQRiOp7egufVqp0Uhhs6uFG1iyCvT85eTWKT5qb
1qceEEmz50P4znGBuFk+0dsna1KazuCoa0lM0u0KxkyuUR0nnyGLriZBdO/t+ckG
4mYgi0tQtoHQH7rg49ABp0NN60U6VckGZf2OZ5TCg36qSa5ZrDAzmVTHv6tN2S4I
VfMethuUIrEQfNELIMMTY/da8xQ144QBEo9zWeRtvRoSJxwBJUIXTVOSIPN7PHCI
3X3bZsj30WnCWXrYHGvj9Iuh9UnzJoRtxNAH1WNKsaUthjt7JhX3WqnRjfho3Ba2
pGmIrItIUv7cjiofiPg26t3hPB3trtMji0rnSiqMrU6Aw4n9hHQc44WzdBTXQebY
+vPFTRpB7C/JAn8CvOjZ/+Tudkp2qGatqXsS6YARBkR+cA2bUDw6AOugKz1b9uAI
P2lAq762HD08f1J4bk2LOL8zKxBWXQWXTJMpy9G2sxlGKaCICmxULb6oah2sOCU5
TM6oqLe8tUYqN5BQ9Oavab/riCur9GIPfyneS1g7bIoEg3aB+GI4s0PTk1A+BFOA
gVeVNtrbpY/n2Cq83no+k5nep6zMjPs4RR040t3D6PmIpnt42daOJEuaCaCRz8g5
Hk0aqM53wYjEBiNODb9U
=4y6h
-----END PGP SIGNATURE-----

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

* [U-Boot] [PATCH] serial: remove calls to serial_assign()
  2012-10-26 14:53     ` Tom Rini
@ 2012-10-26 15:50       ` Simon Glass
  2012-10-26 16:23         ` Stephen Warren
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2012-10-26 15:50 UTC (permalink / raw)
  To: u-boot

Hi,

On Fri, Oct 26, 2012 at 7:53 AM, Tom Rini <trini@ti.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 10/26/12 00:10, Marek Vasut wrote:
>> Dear Joe Hershberger,
>>
>>> Hi Allen,
>>>
>>> On Thu, Oct 25, 2012 at 6:30 PM, Allen Martin
>>> <amartin@nvidia.com> wrote:
>>>> Remove calls to serial_assign() that are failing now that it
>>>> returns a proper error code.  This calls were not actually
>>>> doing anything because they passed the name of a stdio_dev
>>>> when a serial_device name is exptectd.
>>>>
>>>> Signed-off-by: Allen Martin <amartin@nvidia.com> ---
>>>
>>> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
>>
>> Acked-by: Marek Vasut <marex@denx.de>
>
> And this indeed fixes Tegra, right?

It fixes the serial hang we discussed. I think Tegra still has the SPL
problem that Stephen reported (the need for serial_initialize()), or
at least I haven't seen a patch for that.

Tested on seaboard.

Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>

Regards,
Simon

>
> - --
> Tom
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iQIcBAEBAgAGBQJQiqPmAAoJENk4IS6UOR1WKDYP/3MhXxoz2CvBGSKk707eVxVi
> 5v27gFuLxds759Ozd8gf+zZmUFQRiOp7egufVqp0Uhhs6uFG1iyCvT85eTWKT5qb
> 1qceEEmz50P4znGBuFk+0dsna1KazuCoa0lM0u0KxkyuUR0nnyGLriZBdO/t+ckG
> 4mYgi0tQtoHQH7rg49ABp0NN60U6VckGZf2OZ5TCg36qSa5ZrDAzmVTHv6tN2S4I
> VfMethuUIrEQfNELIMMTY/da8xQ144QBEo9zWeRtvRoSJxwBJUIXTVOSIPN7PHCI
> 3X3bZsj30WnCWXrYHGvj9Iuh9UnzJoRtxNAH1WNKsaUthjt7JhX3WqnRjfho3Ba2
> pGmIrItIUv7cjiofiPg26t3hPB3trtMji0rnSiqMrU6Aw4n9hHQc44WzdBTXQebY
> +vPFTRpB7C/JAn8CvOjZ/+Tudkp2qGatqXsS6YARBkR+cA2bUDw6AOugKz1b9uAI
> P2lAq762HD08f1J4bk2LOL8zKxBWXQWXTJMpy9G2sxlGKaCICmxULb6oah2sOCU5
> TM6oqLe8tUYqN5BQ9Oavab/riCur9GIPfyneS1g7bIoEg3aB+GI4s0PTk1A+BFOA
> gVeVNtrbpY/n2Cq83no+k5nep6zMjPs4RR040t3D6PmIpnt42daOJEuaCaCRz8g5
> Hk0aqM53wYjEBiNODb9U
> =4y6h
> -----END PGP SIGNATURE-----

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

* [U-Boot] [PATCH] serial: remove calls to serial_assign()
  2012-10-26 15:50       ` Simon Glass
@ 2012-10-26 16:23         ` Stephen Warren
  2012-10-26 16:35           ` Simon Glass
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Warren @ 2012-10-26 16:23 UTC (permalink / raw)
  To: u-boot

On 10/26/2012 09:50 AM, Simon Glass wrote:
> Hi,
> 
> On Fri, Oct 26, 2012 at 7:53 AM, Tom Rini <trini@ti.com> wrote: On
> 10/26/12 00:10, Marek Vasut wrote:
>>>> Dear Joe Hershberger,
>>>> 
>>>>> Hi Allen,
>>>>> 
>>>>> On Thu, Oct 25, 2012 at 6:30 PM, Allen Martin 
>>>>> <amartin@nvidia.com> wrote:
>>>>>> Remove calls to serial_assign() that are failing now that
>>>>>> it returns a proper error code.  This calls were not
>>>>>> actually doing anything because they passed the name of a
>>>>>> stdio_dev when a serial_device name is exptectd.
>>>>>> 
>>>>>> Signed-off-by: Allen Martin <amartin@nvidia.com> ---
>>>>> 
>>>>> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
>>>> 
>>>> Acked-by: Marek Vasut <marex@denx.de>
> 
> And this indeed fixes Tegra, right?
> 
>> It fixes the serial hang we discussed. I think Tegra still has
>> the SPL problem that Stephen reported (the need for
>> serial_initialize()), or at least I haven't seen a patch for
>> that.

Allen posted 3 patches to rework Tegra's SPL:

tegra20: initialize variable to avoid compiler warning
tegra: move to common SPL framework
SPL: make jump_to_image_no_args a weak symbol

I also posted 5 patches to solve an oversized-SPL issue on Seaboard
and Ventana:

ARM: tegra: don't request GPIO from Seaboard's SPL
ARM: tegra: select between Seaboard/Ventana at compile time
ARM: tegra: derive CONFIG_SPL_MAX_SIZE instead of hard-coding it
ARM: enhance u-boot.lds to detect over-sized SPL
ARM: fix u-boot.lds for -ffunction-sections/-fdata-sections

I tested this current patch with all of those applied.

>> Tested on seaboard.
> 
>> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass
>> <sjg@chromium.org>

This patch,
Tested-by: Stephen Warren <swarren@nvidia.com>

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

* [U-Boot] [PATCH] serial: remove calls to serial_assign()
  2012-10-25 23:30 [U-Boot] [PATCH] serial: remove calls to serial_assign() Allen Martin
  2012-10-25 23:39 ` Joe Hershberger
@ 2012-10-26 16:35 ` Tom Rini
  2012-10-26 22:12 ` Tom Warren
  2 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2012-10-26 16:35 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 25, 2012 at 04:30:14PM -0700, Allen Martin wrote:

> Remove calls to serial_assign() that are failing now that it returns a
> proper error code.  This calls were not actually doing anything
> because they passed the name of a stdio_dev when a serial_device name
> is exptectd.
> 
> Signed-off-by: Allen Martin <amartin@nvidia.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121026/4765fee2/attachment.pgp>

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

* [U-Boot] [PATCH] serial: remove calls to serial_assign()
  2012-10-26 16:23         ` Stephen Warren
@ 2012-10-26 16:35           ` Simon Glass
  0 siblings, 0 replies; 9+ messages in thread
From: Simon Glass @ 2012-10-26 16:35 UTC (permalink / raw)
  To: u-boot

Hi Stephen,

On Fri, Oct 26, 2012 at 9:23 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 10/26/2012 09:50 AM, Simon Glass wrote:
>> Hi,
>>
>> On Fri, Oct 26, 2012 at 7:53 AM, Tom Rini <trini@ti.com> wrote: On
>> 10/26/12 00:10, Marek Vasut wrote:
>>>>> Dear Joe Hershberger,
>>>>>
>>>>>> Hi Allen,
>>>>>>
>>>>>> On Thu, Oct 25, 2012 at 6:30 PM, Allen Martin
>>>>>> <amartin@nvidia.com> wrote:
>>>>>>> Remove calls to serial_assign() that are failing now that
>>>>>>> it returns a proper error code.  This calls were not
>>>>>>> actually doing anything because they passed the name of a
>>>>>>> stdio_dev when a serial_device name is exptectd.
>>>>>>>
>>>>>>> Signed-off-by: Allen Martin <amartin@nvidia.com> ---
>>>>>>
>>>>>> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
>>>>>
>>>>> Acked-by: Marek Vasut <marex@denx.de>
>>
>> And this indeed fixes Tegra, right?
>>
>>> It fixes the serial hang we discussed. I think Tegra still has
>>> the SPL problem that Stephen reported (the need for
>>> serial_initialize()), or at least I haven't seen a patch for
>>> that.
>
> Allen posted 3 patches to rework Tegra's SPL:
>
> tegra20: initialize variable to avoid compiler warning
> tegra: move to common SPL framework
> SPL: make jump_to_image_no_args a weak symbol

OK thank you, I might have missed these, perhaps wasn't copied. I just
tried them out and it indeed fixes the SPL serial problem.

>
> I also posted 5 patches to solve an oversized-SPL issue on Seaboard
> and Ventana:
>
> ARM: tegra: don't request GPIO from Seaboard's SPL
> ARM: tegra: select between Seaboard/Ventana at compile time
> ARM: tegra: derive CONFIG_SPL_MAX_SIZE instead of hard-coding it
> ARM: enhance u-boot.lds to detect over-sized SPL
> ARM: fix u-boot.lds for -ffunction-sections/-fdata-sections
>
> I tested this current patch with all of those applied.

Yes I got your ones ok. I tested with this patch with and without them.

>
>>> Tested on seaboard.
>>
>>> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass
>>> <sjg@chromium.org>
>
> This patch,
> Tested-by: Stephen Warren <swarren@nvidia.com>

Regards,
Simon

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

* [U-Boot] [PATCH] serial: remove calls to serial_assign()
  2012-10-25 23:30 [U-Boot] [PATCH] serial: remove calls to serial_assign() Allen Martin
  2012-10-25 23:39 ` Joe Hershberger
  2012-10-26 16:35 ` Tom Rini
@ 2012-10-26 22:12 ` Tom Warren
  2 siblings, 0 replies; 9+ messages in thread
From: Tom Warren @ 2012-10-26 22:12 UTC (permalink / raw)
  To: u-boot

Allen,

> -----Original Message-----
> From: Allen Martin [mailto:amartin at nvidia.com]
> Sent: Thursday, October 25, 2012 4:30 PM
> To: Tom Warren; swarren at wwwdotorg.org; marex at denx.de; trini at ti.com;
> joe.hershberger at ni.com; sjg at google.com
> Cc: u-boot at lists.denx.de; Allen Martin
> Subject: [PATCH] serial: remove calls to serial_assign()

I've applied this to u-boot-tegra/next to get it to boot fully. I'll remove it once it's in arm/master and/or before my next pull request to Albert.

Tom
> 
> Remove calls to serial_assign() that are failing now that it returns a
> proper error code.  This calls were not actually doing anything because they
> passed the name of a stdio_dev when a serial_device name is exptectd.
> 
> Signed-off-by: Allen Martin <amartin@nvidia.com>
> ---
>  common/cmd_nvedit.c |    3 ---
>  common/iomux.c      |   10 ----------
>  2 files changed, 13 deletions(-)
> 
> diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index
> 1f9c674..68c38f4 100644
> --- a/common/cmd_nvedit.c
> +++ b/common/cmd_nvedit.c
> @@ -238,9 +238,6 @@ int env_check_apply(const char *name, const char
> *oldval,
>  		/* Try assigning specified device */
>  		if (console_assign(console, newval) < 0)
>  			return 1;
> -
> -		if (serial_assign(newval) < 0)
> -			return 1;
>  #endif /* CONFIG_CONSOLE_MUX */
>  	}
> 
> diff --git a/common/iomux.c b/common/iomux.c index dbc2312..6a75704 100644
> --- a/common/iomux.c
> +++ b/common/iomux.c
> @@ -135,16 +135,6 @@ int iomux_doenv(const int console, const char *arg)
>  		 */
>  		if (console_assign(console, start[j]) < 0)
>  			continue;
> -		/*
> -		 * This was taken from common/cmd_nvedit.c.
> -		 * This will never work because serial_assign() returns
> -		 * 1 upon error, not -1.
> -		 * This would almost always return an error anyway because
> -		 * serial_assign() expects the name of a serial device, like
> -		 * serial_smc, but the user generally only wants to set serial.
> -		 */
> -		if (serial_assign(start[j]) < 0)
> -			continue;
>  		cons_set[cs_idx++] = dev;
>  	}
>  	free(console_args);
> --
> 1.7.10.4
-- 
nvpublic

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

end of thread, other threads:[~2012-10-26 22:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-25 23:30 [U-Boot] [PATCH] serial: remove calls to serial_assign() Allen Martin
2012-10-25 23:39 ` Joe Hershberger
2012-10-26  7:10   ` Marek Vasut
2012-10-26 14:53     ` Tom Rini
2012-10-26 15:50       ` Simon Glass
2012-10-26 16:23         ` Stephen Warren
2012-10-26 16:35           ` Simon Glass
2012-10-26 16:35 ` Tom Rini
2012-10-26 22:12 ` Tom Warren

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.