Skip to contentSkip to conversation

serial: remove calls to serial_assign()

PATCH New Allen Martin 7 participants 9 messages Oct 25, 2012 – Oct 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 common/cmd_nvedit.c |    3 ---
 common/iomux.c      |   10 ----------
 2 files changed, 13 deletions(-)
common/cmd_nvedit.c +0 -3
index 1f9c674..68c38f4 100644
@@ -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 */
 	}
 
common/iomux.c +0 -10
index dbc2312..6a75704 100644
@@ -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);
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 1/1 serial: remove calls to serial_assign()

Dear Joe Hershberger,

Quoted 8 lines

Hi Allen,

Quoted 5 lines · Allen Martin

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.

Quoted 4 lines
Quoted 2 lines

---

Best regards,
Marek Vasut

#3 lore raw

PATCH 1/1 serial: remove calls to serial_assign()

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

Quoted 11 lines · Marek Vasut

Dear Joe Hershberger,

Quoted 9 lines

Hi Allen,

Quoted 5 lines · Allen Martin

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.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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

#4 lore raw

PATCH 1/1 serial: remove calls to serial_assign()

Hi,

Quoted 15 lines · Tom Rini

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

Quoted 11 lines · Marek Vasut

Dear Joe Hershberger,

Quoted 9 lines

Hi Allen,

Quoted 5 lines · Allen Martin

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.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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.

Regards,
Simon

Quoted 22 lines

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

#5 lore raw

PATCH 1/1 serial: remove calls to serial_assign()

Quoted 15 lines · Simon Glass

Hi,

Quoted 11 lines · Marek Vasut
Quoted 11 lines
Quoted 11 lines

Dear Joe Hershberger,

Quoted 9 lines

Hi Allen,

Quoted 5 lines · Allen Martin

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.

Quoted 12 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

And this indeed fixes Tegra, right?

Quoted 4 lines

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.

Quoted 4 lines
Quoted 4 lines

Tested on seaboard.

<[email protected]>

This patch,

#6 lore raw

PATCH 1/1 serial: remove calls to serial_assign()

Hi Stephen,

Quoted 29 lines · Stephen Warren
Quoted 15 lines · Simon Glass

Hi,

Quoted 11 lines · Marek Vasut
Quoted 11 lines
Quoted 11 lines

Dear Joe Hershberger,

Quoted 9 lines

Hi Allen,

Quoted 5 lines · Allen Martin

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.

Quoted 12 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

And this indeed fixes Tegra, right?

Quoted 4 lines

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.

Quoted 5 lines

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.

Quoted 11 lines

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.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

Tested on seaboard.

<[email protected]>

This patch,

Regards,
Simon

#7 lore raw

PATCH 1/1 serial: remove calls to serial_assign()

In reply to Allen Martin
Quoted 6 lines · Allen Martin

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
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>
#8 lore raw

PATCH 1/1 serial: remove calls to serial_assign()

In reply to Allen Martin

Allen,

Quoted 7 lines

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

Quoted 48 lines

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.

---
 common/cmd_nvedit.c |    3 ---
 common/iomux.c      |   10 ----------
 2 files changed, 13 deletions(-)
common/cmd_nvedit.c index renamed from common/cmd_nvedit.c +0 -0

1f9c674..68c38f4 100644

common/cmd_nvedit.c +0 -3
@@ -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 */
 	}
common/iomux.c +0 -11
@@ -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

Signature · 1 line
nvpublic