Skip to contentSkip to conversation

net: Add \n before warning message so it prints on a new line.

PATCH New Philip Balister 5 participants 10 messages Sep 7, 2011 – Sep 8, 2011 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: Add \n before warning message so it prints on a new line.

---
 net/eth.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/eth.c +1 -1
index dbd1e2d..67a8039 100644
@@ -305,7 +305,7 @@ int eth_initialize(bd_t *bis)
 				puts("\nWarning: eth device name has a space!\n");
 
 			if (eth_write_hwaddr(dev, "eth", eth_number))
-				puts("Warning: failed to set MAC address\n");
+				puts("\nWarning: failed to set MAC address\n");
 
 			eth_number++;
 			dev = dev->next;
Signature · 1 line
1.7.4.4
#1 lore raw

PATCH 1/1 OMAP3: Overo: Update GPMC timing for ethernet chip.

The existing timing does not quite meet the minimum requirements in the LAN9221 datasheet. The timing in this patch solves problems noticed on some parts.

---
 board/overo/overo.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
board/overo/overo.h +3 -3
index 68e1243..617c0c3 100644
@@ -35,10 +35,10 @@ const omap3_sysinfo sysinfo = {
 
 /* GPMC CS 5 connected to an SMSC LAN9221 ethernet controller */
 #define NET_LAN9221_GPMC_CONFIG1    0x00001000
-#define NET_LAN9221_GPMC_CONFIG2    0x00080701
+#define NET_LAN9221_GPMC_CONFIG2    0x00060700
 #define NET_LAN9221_GPMC_CONFIG3    0x00020201
-#define NET_LAN9221_GPMC_CONFIG4    0x08030703
-#define NET_LAN9221_GPMC_CONFIG5    0x00060908
+#define NET_LAN9221_GPMC_CONFIG4    0x06000700
+#define NET_LAN9221_GPMC_CONFIG5    0x0006090A
 #define NET_LAN9221_GPMC_CONFIG6    0x87030000
 #define NET_LAN9221_GPMC_CONFIG7    0x00000f6c
 
Signature · 1 line
1.7.4.4
#2 lore raw

PATCH 1/1 OMAP3: Overo: Update GPMC timing for ethernet chip.

Quoted 5 lines · Philip Balister

The existing timing does not quite meet the minimum requirements in the LAN9221 datasheet. The timing in this patch solves problems noticed on some parts.

Quoted 30 lines

---
?board/overo/overo.h | ? ?6 +++---
?1 files changed, 3 insertions(+), 3 deletions(-)

board/overo/overo.h +0 -0
index 68e1243..617c0c3 100644
@@ -35,10 +35,10 @@ const omap3_sysinfo sysinfo = {
 

?/* GPMC CS 5 connected to an SMSC LAN9221 ethernet controller */ ?#define NET_LAN9221_GPMC_CONFIG1 ? ?0x00001000

board/overo/overo.h +1 -1
-#define NET_LAN9221_GPMC_CONFIG2 ? ?0x00080701
+#define NET_LAN9221_GPMC_CONFIG2 ? ?0x00060700

?#define NET_LAN9221_GPMC_CONFIG3 ? ?0x00020201

board/overo/overo.h +2 -2
-#define NET_LAN9221_GPMC_CONFIG4 ? ?0x08030703
-#define NET_LAN9221_GPMC_CONFIG5 ? ?0x00060908
+#define NET_LAN9221_GPMC_CONFIG4 ? ?0x06000700
+#define NET_LAN9221_GPMC_CONFIG5 ? ?0x0006090A

?#define NET_LAN9221_GPMC_CONFIG6 ? ?0x87030000
?#define NET_LAN9221_GPMC_CONFIG7 ? ?0x00000f6c

--
1.7.4.4

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

PATCH 1/1 OMAP3: Overo: Update GPMC timing for ethernet chip.

2011/9/8 Steve Sakoman <[email protected]>:

Quoted 35 lines · Philip Balister
Quoted 5 lines

The existing timing does not quite meet the minimum requirements in the LAN9221 datasheet. The timing in this patch solves problems noticed on some parts.

Quoted 25 lines

---
?board/overo/overo.h | ? ?6 +++---
?1 files changed, 3 insertions(+), 3 deletions(-)

board/overo/overo.h +0 -0
index 68e1243..617c0c3 100644
@@ -35,10 +35,10 @@ const omap3_sysinfo sysinfo = {
 

?/* GPMC CS 5 connected to an SMSC LAN9221 ethernet controller */ ?#define NET_LAN9221_GPMC_CONFIG1 ? ?0x00001000

board/overo/overo.h +1 -1
-#define NET_LAN9221_GPMC_CONFIG2 ? ?0x00080701
+#define NET_LAN9221_GPMC_CONFIG2 ? ?0x00060700

?#define NET_LAN9221_GPMC_CONFIG3 ? ?0x00020201

board/overo/overo.h +2 -2
-#define NET_LAN9221_GPMC_CONFIG4 ? ?0x08030703
-#define NET_LAN9221_GPMC_CONFIG5 ? ?0x00060908
+#define NET_LAN9221_GPMC_CONFIG4 ? ?0x06000700
+#define NET_LAN9221_GPMC_CONFIG5 ? ?0x0006090A

?#define NET_LAN9221_GPMC_CONFIG6 ? ?0x87030000
?#define NET_LAN9221_GPMC_CONFIG7 ? ?0x00000f6c

--
1.7.4.4

Quoted 10 lines
Quoted 5 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Other boards like IGEP v2 board uses the same LAN9221 ethernet controller, so this code is duplicated on overo.h and igep0020.h files. Maybe could be a good idea move this part to arch/arm/include/asm/arch-omap3/omap_gpmc.h or another file to not duplicate the code.

#4 lore raw

PATCH 1/1 OMAP3: Overo: Update GPMC timing for ethernet chip.

Quoted 47 lines · Enric Balletb? i Serra

2011/9/8 Steve Sakoman<[email protected]>:

Quoted 35 lines · Philip Balister
Quoted 5 lines

The existing timing does not quite meet the minimum requirements in the LAN9221 datasheet. The timing in this patch solves problems noticed on some parts.

Quoted 25 lines
---
  board/overo/overo.h |    6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)
board/overo/overo.h +3 -4
index 68e1243..617c0c3 100644
@@ -35,10 +35,10 @@ const omap3_sysinfo sysinfo = {
 
  /* GPMC CS 5 connected to an SMSC LAN9221 ethernet controller */
  #define NET_LAN9221_GPMC_CONFIG1    0x00001000
-#define NET_LAN9221_GPMC_CONFIG2    0x00080701
+#define NET_LAN9221_GPMC_CONFIG2    0x00060700
  #define NET_LAN9221_GPMC_CONFIG3    0x00020201
-#define NET_LAN9221_GPMC_CONFIG4    0x08030703
-#define NET_LAN9221_GPMC_CONFIG5    0x00060908
+#define NET_LAN9221_GPMC_CONFIG4    0x06000700
+#define NET_LAN9221_GPMC_CONFIG5    0x0006090A
  #define NET_LAN9221_GPMC_CONFIG6    0x87030000
  #define NET_LAN9221_GPMC_CONFIG7    0x00000f6c
 
--

1.7.4.4

Quoted 10 lines
Quoted 5 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Quoted 5 lines

Other boards like IGEP v2 board uses the same LAN9221 ethernet controller, so this code is duplicated on overo.h and igep0020.h files. Maybe could be a good idea move this part to arch/arm/include/asm/arch-omap3/omap_gpmc.h or another file to not duplicate the code.

Is there anyone around with an igep v2 board who could test/ack such a patch?

Philip

#5 lore raw

PATCH 1/1 OMAP3: Overo: Update GPMC timing for ethernet chip.

2011/9/8 Philip Balister <[email protected]>:

Quoted 58 lines · Enric Balletb? i Serra
Quoted 51 lines

2011/9/8 Steve Sakoman<[email protected]>:

Quoted 38 lines
Quoted 6 lines · On Wed, Sep 7, 2011 at 4:57 AM, Philip Balister<[email protected]> ?wrote:

The existing timing does not quite meet the minimum requirements in the LAN9221 datasheet. The timing in this patch solves problems noticed on some parts.

Quoted 25 lines

---
?board/overo/overo.h | ? ?6 +++---
?1 files changed, 3 insertions(+), 3 deletions(-)

board/overo/overo.h +0 -0
index 68e1243..617c0c3 100644
@@ -35,10 +35,10 @@ const omap3_sysinfo sysinfo = {
 

?/* GPMC CS 5 connected to an SMSC LAN9221 ethernet controller */ ?#define NET_LAN9221_GPMC_CONFIG1 ? ?0x00001000

board/overo/overo.h +1 -1
-#define NET_LAN9221_GPMC_CONFIG2 ? ?0x00080701
+#define NET_LAN9221_GPMC_CONFIG2 ? ?0x00060700

?#define NET_LAN9221_GPMC_CONFIG3 ? ?0x00020201

board/overo/overo.h +2 -2
-#define NET_LAN9221_GPMC_CONFIG4 ? ?0x08030703
-#define NET_LAN9221_GPMC_CONFIG5 ? ?0x00060908
+#define NET_LAN9221_GPMC_CONFIG4 ? ?0x06000700
+#define NET_LAN9221_GPMC_CONFIG5 ? ?0x0006090A

?#define NET_LAN9221_GPMC_CONFIG6 ? ?0x87030000
?#define NET_LAN9221_GPMC_CONFIG7 ? ?0x00000f6c

--
1.7.4.4

Quoted 10 lines
Quoted 5 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Quoted 5 lines

Other boards like IGEP v2 board uses the same LAN9221 ethernet controller, so this code is duplicated on overo.h and igep0020.h files. Maybe could be a good idea move this part to arch/arm/include/asm/arch-omap3/omap_gpmc.h or another file to not duplicate the code.

Quoted 5 lines

Is there anyone around with an igep v2 board who could test/ack such a patch?

Philip

Yes, I can, I expect test the patch tomorrow ...

Enric

#6 lore raw

PATCH 1/1 overo: Set IEN on GPMC_CLK to support CS's that use synchronous clocking.

In reply to Philip Balister

Without this change CS's configured for synchronous clocking cannot read data.

---
 board/overo/overo.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
board/overo/overo.h +1 -1
index 68e1243..1f94669 100644
@@ -128,7 +128,7 @@ const omap3_sysinfo sysinfo = {
 	MUX_VAL(CP(GPMC_NCS6),		(IEN  | PTD | DIS | M0)) /*GPMC_nCS6*/\
 	MUX_VAL(CP(GPMC_NCS7),		(IEN  | PTU | EN  | M0)) /*GPMC_nCS7*/\
 	MUX_VAL(CP(GPMC_NBE1),		(IEN  | PTD | DIS | M0)) /*GPMC_nCS3*/\
-	MUX_VAL(CP(GPMC_CLK),		(IDIS | PTU | EN  | M0)) /*GPMC_CLK*/\
+	MUX_VAL(CP(GPMC_CLK),		(IEN  | PTU | EN  | M0)) /*GPMC_CLK*/\
 	MUX_VAL(CP(GPMC_NADV_ALE),	(IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\
 	MUX_VAL(CP(GPMC_NOE),		(IDIS | PTD | DIS | M0)) /*GPMC_nOE*/\
 	MUX_VAL(CP(GPMC_NWE),		(IDIS | PTD | DIS | M0)) /*GPMC_nWE*/\
Signature · 1 line
1.7.4.4
#7 lore raw

PATCH 1/1 net: Add \n before warning message so it prints on a new line.

In reply to Philip Balister

Hi Philip,

Le 07/09/2011 13:57, Philip Balister a ?crit :

Quoted 10 lines
---
  net/eth.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
net/eth.c +0 -0
index dbd1e2d..67a8039 100644

net/eth.c int eth_initialize(bd_t *bis) · line 308

Quoted 5 lines
net/eth.c +1 -1
@@ -305,7 +305,7 @@ int eth_initialize(bd_t *bis)
  				puts("\nWarning: eth device name has a space!\n");
 
  			if (eth_write_hwaddr(dev, "eth", eth_number))
-				puts("Warning: failed to set MAC address\n");
+				puts("\nWarning: failed to set MAC address\n");

I believe warning messages with \n on more than one end are frowned upon.

net/eth.c int eth_initialize(bd_t *bis) · line 311

Quoted 2 lines
net/eth.c +0 -0
  			eth_number++;
  			dev = dev->next;

Amicalement,

Signature · 1 line
Albert.
#8 lore raw

PATCH 1/1 net: Add \n before warning message so it prints on a new line.

Quoted 15 lines · Albert ARIBAUD

Hi Philip,

Le 07/09/2011 13:57, Philip Balister a ?crit :

Quoted 12 lines

---
net/eth.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
net/eth.c +0 -0
index dbd1e2d..67a8039 100644
@@ -305,7 +305,7 @@ int eth_initialize(bd_t *bis)
 puts("\nWarning: eth device name has a space!\n");
 
Quoted 5 lines

net/eth.c int eth_initialize(bd_t *bis) · line 308

Quoted 3 lines
net/eth.c +1 -1
 if (eth_write_hwaddr(dev, "eth", eth_number))
- puts("Warning: failed to set MAC address\n");
+ puts("\nWarning: failed to set MAC address\n");

I believe warning messages with \n on more than one end are frowned upon.

Look closely at the patch, the warning message above has to do the same thing. Without the leading \n on the message, it prints directly after the ethernet chip name, with no space. This is not right. I chose to copy the existing code, rather than add a leading space.

Philip

Quoted 5 lines

net/eth.c int eth_initialize(bd_t *bis) · line 311

Quoted 3 lines
net/eth.c +0 -0
 eth_number++;
 dev = dev->next;

Amicalement,

#9 lore raw

PATCH 1/1 net: Add \n before warning message so it prints on a new line.

Le 08/09/2011 17:04, Philip Balister a ?crit :

Quoted 22 lines · Albert ARIBAUD
Quoted 15 lines

Hi Philip,

Le 07/09/2011 13:57, Philip Balister a ?crit :

Quoted 12 lines

---
net/eth.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
net/eth.c +0 -0
index dbd1e2d..67a8039 100644
@@ -305,7 +305,7 @@ int eth_initialize(bd_t *bis)
 puts("\nWarning: eth device name has a space!\n");
 
Quoted 5 lines

net/eth.c int eth_initialize(bd_t *bis) · line 308

Quoted 3 lines
net/eth.c +1 -1
 if (eth_write_hwaddr(dev, "eth", eth_number))
- puts("Warning: failed to set MAC address\n");
+ puts("\nWarning: failed to set MAC address\n");

I believe warning messages with \n on more than one end are frowned upon.

Quoted 4 lines

Look closely at the patch, the warning message above has to do the same thing. Without the leading \n on the message, it prints directly after the ethernet chip name, with no space. This is not right. I chose to copy the existing code, rather than add a leading space.

Just because original code has an error does not make it right to reproduce it. :)

More seriously, heterogeneous \n placement makes it complicated to get and keep printing right -- for instance here the warning messages have a trailing \n but the code loop adds one at the end.

I would prefer that the code do a first loop (while dev!= eth_devices) to try and set up ethernet devices, emitting simple "warning\n" messages as needed, then a second loop (for dev=0 to eth_number-1) to print a summary of the final list of eth devices found and initialized.

Amicalement,

Signature · 1 line
Albert.