Skip to contentSkip to conversation

powerpc: legacy_serial: reg-offset & shift aren't used

PATCH Stephen Neuendorffer 3 participants 4 messages Jul 1, 2008 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines

-----Original Message-----
From: John Linn [mailto:[email protected]]
Sent: Tuesday, July 01, 2008 9:32 AM
To: [email protected]; [email protected];

[email protected]; [email protected];

Quoted 3 lines

[email protected]; [email protected]; Stephen Neuendorffer
Cc: John Linn
Subject: [PATCH] powerpc: legacy_serial: reg-offset & shift aren't

used

Quoted 11 lines

=

The legacy serial driver does not work with an 8250 type UART that uses reg-offset and reg-shift. This change updates the driver so it doesn't find the UART when those properties are present on the UART in the device tree for soc devices.
=

Review

Quoted 8 lines

---
=

 arch/powerpc/kernel/legacy_serial.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

=

(quoted diff) +0 -0

b/arch/powerpc/kernel/legacy_serial.c

arch/powerpc/kernel/legacy_serial.c static int __init add_legacy_soc_port(struct

Quoted 4 lines

index 61dd174..b43235f 100644

arch/powerpc/kernel/legacy_serial.c +0 -0
@@ -136,6 +136,11 @@ static int __init add_legacy_soc_port(struct

device_node *np,

arch/powerpc/kernel/legacy_serial.c

Quoted 8 lines
arch/powerpc/kernel/legacy_serial.c +0 -0
 	if (of_get_property(np, "clock-frequency", NULL) =3D=3D NULL)
 		return -1;

=

arch/powerpc/kernel/legacy_serial.c +4 -0
+	/* if reg-shift and offset, don't try to use it */
+	if ((of_get_property(np, "reg-shift", NULL) !=3D NULL) &&
+		(of_get_property(np, "reg-offset", NULL) !=3D NULL))
+		return -1;

Um, shouldn't this be || ?

Quoted 7 lines
arch/powerpc/kernel/legacy_serial.c +1 -1
+
 	/* if rtas uses this device, don't try to use it as well */
 	if (of_get_property(np, "used-by-rtas", NULL) !=3D NULL)
 		return -1;
--

1.5.2.1
=

This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.

A message that is not in the archive (sent off-list or not yet received): 977C41F842E66D4CB2E41332313B6150062A2DB4@XSJ-EXCHVS1.xlnx.xilinx.com

#3 lore raw

It could be "||" but I didn't know if there were cases where that wouldn't be true. I don't know that code that well so I was being conservative and maybe shouldn't be. =

Our specific case works fine with "&&" since we have both in the device tree. =

-- John

-----Original Message-----
From: Stephen Neuendorffer =

Sent: Tuesday, July 01, 2008 10:48 AM
To: John Linn; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH] powerpc: legacy_serial: reg-offset & shift aren't used

Quoted 4 lines

-----Original Message-----
From: John Linn [mailto:[email protected]]
Sent: Tuesday, July 01, 2008 9:32 AM
To: [email protected]; [email protected];

[email protected]; [email protected];

Quoted 3 lines

[email protected]; [email protected]; Stephen Neuendorffer
Cc: John Linn
Subject: [PATCH] powerpc: legacy_serial: reg-offset & shift aren't

used

Quoted 11 lines

=

The legacy serial driver does not work with an 8250 type UART that uses reg-offset and reg-shift. This change updates the driver so it doesn't find the UART when those properties are present on the UART in the device tree for soc devices.
=

Review

Quoted 8 lines

---
=

 arch/powerpc/kernel/legacy_serial.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

=

(quoted diff) +0 -0

b/arch/powerpc/kernel/legacy_serial.c

arch/powerpc/kernel/legacy_serial.c static int __init add_legacy_soc_port(struct

Quoted 4 lines

index 61dd174..b43235f 100644

arch/powerpc/kernel/legacy_serial.c +0 -0
@@ -136,6 +136,11 @@ static int __init add_legacy_soc_port(struct

device_node *np,

arch/powerpc/kernel/legacy_serial.c

Quoted 8 lines
arch/powerpc/kernel/legacy_serial.c +0 -0
 	if (of_get_property(np, "clock-frequency", NULL) =3D=3D NULL)
 		return -1;

=

arch/powerpc/kernel/legacy_serial.c +4 -0
+	/* if reg-shift and offset, don't try to use it */
+	if ((of_get_property(np, "reg-shift", NULL) !=3D NULL) &&
+		(of_get_property(np, "reg-offset", NULL) !=3D NULL))
+		return -1;

Um, shouldn't this be || ?

Quoted 7 lines
arch/powerpc/kernel/legacy_serial.c +1 -1
+
 	/* if rtas uses this device, don't try to use it as well */
 	if (of_get_property(np, "used-by-rtas", NULL) !=3D NULL)
 		return -1;
--

1.5.2.1
=

This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.

#4 lore raw
Quoted 3 lines · John Linn

It could be "||" but I didn't know if there were cases where that wouldn't be true. I don't know that code that well so I was being conservative and maybe shouldn't be.

No, Stephen is right. It should be ||

g.

#5 lore raw

I'll respin the patch and send again.

-- John

-----Original Message-----
From: Grant Likely [mailto:[email protected]] On Behalf Of Grant Likely
Sent: Tuesday, July 01, 2008 11:06 AM
To: John Linn
Cc: Stephen Neuendorffer; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] powerpc: legacy_serial: reg-offset & shift aren't used

Quoted 3 lines · John Linn

It could be "||" but I didn't know if there were cases where that wouldn't be true. I don't know that code that well so I was being conservative and maybe shouldn't be. =

No, Stephen is right. It should be ||

g.

This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.