diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-07-31 03:38:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 18:39:38 -0400 |
commit | 57d4810ea0d9ca58a7bcc1336607f0cede0a2abf (patch) | |
tree | 6194ce01088fbd9852579a14bd8726d9c8eef73f /arch/i386/kernel | |
parent | a583f1b54249b11ad1ffd14c6e74d28fcbc59c07 (diff) |
revert "x86, serial: convert legacy COM ports to platform devices"
Revert 7e92b4fc345f5b6f57585fbe5ffdb0f24d7c9b26. It broke Sébastien Dugué's
machine and Jeff said (persuasively)
This seems like it will break decades-long-working stuff, in favor of
breaking new ground in our favorite area, "trusting the BIOS."
It's just not worth it for serial ports, IMO. Serial ports are something
that just shouldn't break at this late stage in the game. My new Intel
platform boxes don't even have serial ports, so I question the value of
messing with serial port probing even more... because... just wait a year,
and your box won't have a serial port either! :)
I certainly don't object to the use of platform devices (or isa_driver),
but the probe change seems questionable. That's sorta analagous to
rewriting the floppy driver probe routine. Sure you could do it... but why
risk all that damage and go through debugging all over again?
It seems clear from this report that we cannot, should not, trust BIOS for
something (a) so simple and (b) that has been working for over a decade.
Much discussion ensued and we've decided to have another go at all of this.
Cc: Sébastien Dugué <sebastien.dugue@bull.net>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r-- | arch/i386/kernel/Makefile | 1 | ||||
-rw-r--r-- | arch/i386/kernel/legacy_serial.c | 67 |
2 files changed, 0 insertions, 68 deletions
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index dbe5e87e0d66..9d33b00de659 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile | |||
@@ -35,7 +35,6 @@ obj-y += sysenter.o vsyscall.o | |||
35 | obj-$(CONFIG_ACPI_SRAT) += srat.o | 35 | obj-$(CONFIG_ACPI_SRAT) += srat.o |
36 | obj-$(CONFIG_EFI) += efi.o efi_stub.o | 36 | obj-$(CONFIG_EFI) += efi.o efi_stub.o |
37 | obj-$(CONFIG_DOUBLEFAULT) += doublefault.o | 37 | obj-$(CONFIG_DOUBLEFAULT) += doublefault.o |
38 | obj-$(CONFIG_SERIAL_8250) += legacy_serial.o | ||
39 | obj-$(CONFIG_VM86) += vm86.o | 38 | obj-$(CONFIG_VM86) += vm86.o |
40 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 39 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
41 | obj-$(CONFIG_HPET_TIMER) += hpet.o | 40 | obj-$(CONFIG_HPET_TIMER) += hpet.o |
diff --git a/arch/i386/kernel/legacy_serial.c b/arch/i386/kernel/legacy_serial.c deleted file mode 100644 index 21510118544e..000000000000 --- a/arch/i386/kernel/legacy_serial.c +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * Legacy COM port devices for x86 platforms without PNPBIOS or ACPI. | ||
3 | * Data taken from include/asm-i386/serial.h. | ||
4 | * | ||
5 | * (c) Copyright 2007 Hewlett-Packard Development Company, L.P. | ||
6 | * Bjorn Helgaas <bjorn.helgaas@hp.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/pnp.h> | ||
15 | #include <linux/serial_8250.h> | ||
16 | |||
17 | /* Standard COM flags (except for COM4, because of the 8514 problem) */ | ||
18 | #ifdef CONFIG_SERIAL_DETECT_IRQ | ||
19 | #define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ) | ||
20 | #define COM4_FLAGS (UPF_BOOT_AUTOCONF | UPF_AUTO_IRQ) | ||
21 | #else | ||
22 | #define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST) | ||
23 | #define COM4_FLAGS UPF_BOOT_AUTOCONF | ||
24 | #endif | ||
25 | |||
26 | #define PORT(_base,_irq,_flags) \ | ||
27 | { \ | ||
28 | .iobase = _base, \ | ||
29 | .irq = _irq, \ | ||
30 | .uartclk = 1843200, \ | ||
31 | .iotype = UPIO_PORT, \ | ||
32 | .flags = _flags, \ | ||
33 | } | ||
34 | |||
35 | static struct plat_serial8250_port x86_com_data[] = { | ||
36 | PORT(0x3F8, 4, COM_FLAGS), | ||
37 | PORT(0x2F8, 3, COM_FLAGS), | ||
38 | PORT(0x3E8, 4, COM_FLAGS), | ||
39 | PORT(0x2E8, 3, COM4_FLAGS), | ||
40 | { }, | ||
41 | }; | ||
42 | |||
43 | static struct platform_device x86_com_device = { | ||
44 | .name = "serial8250", | ||
45 | .id = PLAT8250_DEV_PLATFORM, | ||
46 | .dev = { | ||
47 | .platform_data = x86_com_data, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | static int force_legacy_probe; | ||
52 | module_param_named(force, force_legacy_probe, bool, 0); | ||
53 | MODULE_PARM_DESC(force, "Force legacy serial port probe"); | ||
54 | |||
55 | static int __init serial8250_x86_com_init(void) | ||
56 | { | ||
57 | if (pnp_platform_devices && !force_legacy_probe) | ||
58 | return -ENODEV; | ||
59 | |||
60 | return platform_device_register(&x86_com_device); | ||
61 | } | ||
62 | |||
63 | module_init(serial8250_x86_com_init); | ||
64 | |||
65 | MODULE_AUTHOR("Bjorn Helgaas"); | ||
66 | MODULE_LICENSE("GPL"); | ||
67 | MODULE_DESCRIPTION("Generic 8250/16x50 legacy probe module"); | ||