1 diff -Nru a/drivers/serial/8250_acpi.c b/drivers/serial/8250_acpi.c
2 --- a/drivers/serial/8250_acpi.c Fri Jan 16 22:06:23 2004
3 +++ b/drivers/serial/8250_acpi.c Fri Jan 16 22:06:23 2004
7 * Copyright (c) 2002-2003 Matthew Wilcox for Hewlett-Packard
8 + * Copyright (C) 2004 Hewlett-Packard Co
9 + * Bjorn Helgaas <bjorn.helgaas@hp.com>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
14 #include <linux/acpi.h>
15 #include <linux/init.h>
16 #include <linux/module.h>
17 +#include <linux/tty.h>
18 #include <linux/serial.h>
19 +#include <linux/tty.h>
20 +#include <linux/serial_core.h>
22 #include <acpi/acpi_bus.h>
25 #include <asm/serial.h>
27 +struct serial_private {
32 static acpi_status acpi_serial_mmio(struct serial_struct *req,
33 struct acpi_resource_address64 *addr)
37 static int acpi_serial_add(struct acpi_device *device)
39 + struct serial_private *priv;
41 struct serial_struct serial_req;
45 memset(&serial_req, 0, sizeof(serial_req));
47 + priv = kmalloc(sizeof(struct serial_private), GFP_KERNEL);
52 + memset(priv, 0, sizeof(*priv));
54 status = acpi_walk_resources(device->handle, METHOD_NAME__CRS,
55 acpi_serial_resource, &serial_req);
56 - if (ACPI_FAILURE(status))
58 + if (ACPI_FAILURE(status)) {
63 - if (!serial_req.iomem_base && !serial_req.port) {
64 + if (serial_req.iomem_base)
65 + priv->iomem_base = serial_req.iomem_base;
66 + else if (!serial_req.port) {
67 printk(KERN_ERR "%s: no iomem or port address in %s _CRS\n",
68 __FUNCTION__, device->pnp.bus_id);
74 serial_req.baud_base = BASE_BAUD;
75 - serial_req.flags = ASYNC_SKIP_TEST|ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ;
76 + serial_req.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF |
77 + UPF_AUTO_IRQ | UPF_RESOURCES;
79 - line = register_serial(&serial_req);
81 - printk(KERN_WARNING "Couldn't register serial port %s: %d",
82 - device->pnp.bus_id, line);
84 + priv->line = register_serial(&serial_req);
85 + if (priv->line < 0) {
86 + printk(KERN_WARNING "Couldn't register serial port %s: %d\n",
87 + device->pnp.bus_id, priv->line);
92 + acpi_driver_data(device) = priv;
96 + if (serial_req.iomem_base)
97 + iounmap(serial_req.iomem_base);
103 static int acpi_serial_remove(struct acpi_device *device, int type)
105 + struct serial_private *priv;
107 + if (!device || !acpi_driver_data(device))
110 + priv = acpi_driver_data(device);
111 + unregister_serial(priv->line);
112 + if (priv->iomem_base)
113 + iounmap(priv->iomem_base);
119 diff -Nru a/drivers/serial/8250_hcdp.c b/drivers/serial/8250_hcdp.c
120 --- a/drivers/serial/8250_hcdp.c Fri Jan 16 22:06:23 2004
121 +++ b/drivers/serial/8250_hcdp.c Fri Jan 16 22:06:23 2004
126 - port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
127 + port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_RESOURCES;
129 port.flags |= ASYNC_AUTO_IRQ;
131 diff -Nru a/drivers/serial/Kconfig b/drivers/serial/Kconfig
132 --- a/drivers/serial/Kconfig Fri Jan 16 22:06:23 2004
133 +++ b/drivers/serial/Kconfig Fri Jan 16 22:06:23 2004
138 +config SERIAL_8250_HCDP
139 + bool "Console device discovery via EFI HCDP table"
141 + depends on SERIAL_8250_CONSOLE=y
143 + If you wish to make the serial console port described by the EFI
144 + HCDP table available for use as serial console, say Y here. See
145 + <http://www.dig64.org/specifications/DIG64_HCDPv10a_01.pdf>.
147 config SERIAL_8250_CS
148 tristate "8250/16550 PCMCIA device support"
149 depends on PCMCIA && SERIAL_8250
152 If you wish to enable serial port discovery via the ACPI
153 namespace, say Y here. If unsure, say N.
155 -config SERIAL_8250_HCDP
156 - bool "8250/16550 device discovery support via EFI HCDP table"
157 - depends on IA64 && SERIAL_8250
159 - If you wish to make the serial console port described by the EFI
160 - HCDP table available for use as serial console or general
161 - purpose port, say Y here. See
162 - <http://www.dig64.org/specifications/DIG64_HCDPv10a_01.pdf>.
164 config SERIAL_8250_NR_UARTS
165 int "Maximum number of non-legacy 8250/16550 serial ports"