linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add a check for keyboard/mouse device nodes in check_legacy_ioport()
@ 2007-06-20  0:15 Wade Farnsworth
  2007-06-20  9:57 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: Wade Farnsworth @ 2007-06-20  0:15 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

The device tree for the MPC8641 HPCN does not implement the device type
property for I8042 nodes.

In addition to checking the I8042 node's device type, also match the
keyboard and/or mouse nodes' compatible property.

Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>

---

The previous version of this patch also removed the device type test.
This version keeps the test, per Segher's comments.

 arch/powerpc/kernel/setup-common.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Index: linux-2.6-powerpc-8641/arch/powerpc/kernel/setup-common.c
===================================================================
--- linux-2.6-powerpc-8641.orig/arch/powerpc/kernel/setup-common.c
+++ linux-2.6-powerpc-8641/arch/powerpc/kernel/setup-common.c
@@ -486,6 +486,14 @@ int check_legacy_ioport(unsigned long ba
 
 	switch(base_port) {
 	case I8042_DATA_REG:
+		if (!(np = of_find_compatible_node(NULL, NULL, "pnpPNP,303")))
+			np = of_find_compatible_node(NULL, NULL, "pnpPNP,f03");
+		if (np) {
+			parent = of_get_parent(np);
+			of_node_put(np);
+			np = parent;
+			break;
+		}
 		np = of_find_node_by_type(NULL, "8042");
 		break;
 	case FDC_BASE: /* FDC1 */

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

* Re: [PATCH] Add a check for keyboard/mouse device nodes in check_legacy_ioport()
  2007-06-20  0:15 [PATCH] Add a check for keyboard/mouse device nodes in check_legacy_ioport() Wade Farnsworth
@ 2007-06-20  9:57 ` Segher Boessenkool
  0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2007-06-20  9:57 UTC (permalink / raw)
  To: Wade Farnsworth; +Cc: linuxppc-dev, paulus

> The device tree for the MPC8641 HPCN does not implement the device type
> property for I8042 nodes.
>
> In addition to checking the I8042 node's device type, also match the
> keyboard and/or mouse nodes' compatible property.
>
> Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>

Looks good.


Segher

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

end of thread, other threads:[~2007-06-20  9:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-20  0:15 [PATCH] Add a check for keyboard/mouse device nodes in check_legacy_ioport() Wade Farnsworth
2007-06-20  9:57 ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).