linux/debian/patches/bugfix/powerpc/serial.patch

51 lines
1.3 KiB
Diff

#! /bin/sh -e
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Description: Disables legacy serial driver on powermacs.
## DP: Patch author: Sven Luther <luther@debian.org>
## DP: Patch author: adapted from the SuSE kernel tree.
## DP: Forward ported to 2.6.17 by Mark Hymers <mark@hymers.org.uk>
## DP: Upstream status: workaround hack waiting for a clean legacy device solution.
diff -aurN a/drivers/serial/8250.c b/drivers/serial/8250.c
--- a/drivers/serial/8250.c 2005-06-17 15:48:29.000000000 -0400
+++ b/drivers/serial/8250.c 2005-06-18 12:05:39.000000000 -0400
@@ -45,6 +45,10 @@
#include <asm/io.h>
#include <asm/irq.h>
+#ifdef CONFIG_PPC_PMAC
+#include <asm/machdep.h>
+#endif
+
#include "8250.h"
/*
@@ -2307,6 +2312,12 @@
static int __init serial8250_console_init(void)
{
+#ifdef CONFIG_PPC_PMAC
+ if(machine_is(powermac)) {
+ printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
+ return -ENODEV;
+ }
+#endif
serial8250_isa_init_ports();
register_console(&serial8250_console);
return 0;
@@ -2617,6 +2628,13 @@
{
int ret, i;
+#ifdef CONFIG_PPC_PMAC
+ if(machine_is(powermac)) {
+ printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
+ return -ENODEV;
+ }
+#endif
+
if (nr_uarts > UART_NR)
nr_uarts = UART_NR;