[PATCH 1/2] Parallel port init fix

Michael Neuling mikey at neuling.org
Fri Oct 28 17:55:40 EST 2005


Fixes init for the parallel port on ppc64

Signed-off-by: Michael Neuling <mikey at neuling.org>
--
 drivers/input/misc/pcspkr.c   |    5 +++++
 include/asm-powerpc/8253pit.h |   13 +++++++++++++
 2 files changed, 18 insertions(+)

Index: linux-2.6/drivers/input/misc/pcspkr.c
===================================================================
--- linux-2.6.orig/drivers/input/misc/pcspkr.c	2005-10-28 16:53:53.000000000 +1000
+++ linux-2.6/drivers/input/misc/pcspkr.c	2005-10-28 17:25:41.000000000 +1000
@@ -68,6 +68,11 @@
 
 static int __init pcspkr_init(void)
 {
+#ifdef HAS_PCSPKR_ARCH_INIT
+	int rc = pcspkr_arch_init();
+	if (rc)
+		return rc;
+#endif
 	pcspkr_dev.evbit[0] = BIT(EV_SND);
 	pcspkr_dev.sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
 	pcspkr_dev.event = pcspkr_event;
Index: linux-2.6/include/asm-powerpc/8253pit.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/8253pit.h	2005-10-28 16:53:53.000000000 +1000
+++ linux-2.6/include/asm-powerpc/8253pit.h	2005-10-28 16:57:37.000000000 +1000
@@ -5,6 +5,19 @@
  * 8253/8254 Programmable Interval Timer
  */
 
+#include <asm/prom.h>
+
 #define PIT_TICK_RATE	1193182UL
 
+#define HAS_PCSPKR_ARCH_INIT
+
+static inline int pcspkr_arch_init(void)
+{
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "pnpPNP,100");
+	of_node_put(np);
+	return np ? 0 : -ENODEV;
+}
+
 #endif	/* _ASM_POWERPC_8253PIT_H */



More information about the Linuxppc64-dev mailing list