[U-Boot] [PATCH] serial: remove calls to serial_assign()

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);

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

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

-----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

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-----

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

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

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!

Allen,
-----Original Message----- From: Allen Martin [mailto:amartin@nvidia.com] Sent: Thursday, October 25, 2012 4:30 PM To: Tom Warren; swarren@wwwdotorg.org; marex@denx.de; trini@ti.com; joe.hershberger@ni.com; sjg@google.com Cc: u-boot@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)
cons_set[cs_idx++] = dev; } free(console_args);continue;
-- 1.7.10.4
participants (7)
-
Allen Martin
-
Joe Hershberger
-
Marek Vasut
-
Simon Glass
-
Stephen Warren
-
Tom Rini
-
Tom Warren