-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 54834 b: refs/heads/master c: 7e92b4f h: refs/heads/master v: v3
- Loading branch information
Bjorn Helgaas
authored and
Linus Torvalds
committed
May 8, 2007
1 parent
2b94cec
commit 8a37098
Showing
8 changed files
with
85 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: d0d4f69bb65a8c1c1430c577a583632709b874c6 | ||
refs/heads/master: 7e92b4fc345f5b6f57585fbe5ffdb0f24d7c9b26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Legacy COM port devices for x86 platforms without PNPBIOS or ACPI. | ||
* Data taken from include/asm-i386/serial.h. | ||
* | ||
* (c) Copyright 2007 Hewlett-Packard Development Company, L.P. | ||
* Bjorn Helgaas <bjorn.helgaas@hp.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
#include <linux/module.h> | ||
#include <linux/init.h> | ||
#include <linux/pnp.h> | ||
#include <linux/serial_8250.h> | ||
|
||
/* Standard COM flags (except for COM4, because of the 8514 problem) */ | ||
#ifdef CONFIG_SERIAL_DETECT_IRQ | ||
#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ) | ||
#define COM4_FLAGS (UPF_BOOT_AUTOCONF | UPF_AUTO_IRQ) | ||
#else | ||
#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST) | ||
#define COM4_FLAGS UPF_BOOT_AUTOCONF | ||
#endif | ||
|
||
#define PORT(_base,_irq,_flags) \ | ||
{ \ | ||
.iobase = _base, \ | ||
.irq = _irq, \ | ||
.uartclk = 1843200, \ | ||
.iotype = UPIO_PORT, \ | ||
.flags = _flags, \ | ||
} | ||
|
||
static struct plat_serial8250_port x86_com_data[] = { | ||
PORT(0x3F8, 4, COM_FLAGS), | ||
PORT(0x2F8, 3, COM_FLAGS), | ||
PORT(0x3E8, 4, COM_FLAGS), | ||
PORT(0x2E8, 3, COM4_FLAGS), | ||
{ }, | ||
}; | ||
|
||
static struct platform_device x86_com_device = { | ||
.name = "serial8250", | ||
.id = PLAT8250_DEV_PLATFORM, | ||
.dev = { | ||
.platform_data = x86_com_data, | ||
}, | ||
}; | ||
|
||
static int force_legacy_probe; | ||
module_param_named(force, force_legacy_probe, bool, 0); | ||
MODULE_PARM_DESC(force, "Force legacy serial port probe"); | ||
|
||
static int __init serial8250_x86_com_init(void) | ||
{ | ||
if (pnp_platform_devices && !force_legacy_probe) | ||
return -ENODEV; | ||
|
||
return platform_device_register(&x86_com_device); | ||
} | ||
|
||
module_init(serial8250_x86_com_init); | ||
|
||
MODULE_AUTHOR("Bjorn Helgaas"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_DESCRIPTION("Generic 8250/16x50 legacy probe module"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters