- Remove SPCR gunk, we can't use it without infringing microsoft's copyright. diff -urpNX dontdiff linux-2.5.29/arch/ia64/kernel/acpi.c linux-2.5.29-scsi/arch/ia64/kernel/acpi.c --- linux-2.5.29/arch/ia64/kernel/acpi.c 2002-06-20 16:53:52.000000000 -0600 +++ linux-2.5.29-scsi/arch/ia64/kernel/acpi.c 2002-07-28 10:24:05.000000000 -0600 @@ -460,70 +460,6 @@ acpi_find_rsdp (unsigned long *rsdp_phys } -#ifdef CONFIG_SERIAL_ACPI - -#include - -static int __init -acpi_parse_spcr (unsigned long phys_addr, unsigned long size) -{ - acpi_ser_t *spcr = NULL; - unsigned long global_int = 0; - - if (!phys_addr || !size) - return -EINVAL; - - if (!iosapic_register_irq) - return -ENODEV; - - /* - * ACPI is able to describe serial ports that live at non-standard - * memory addresses and use non-standard interrupts, either via - * direct SAPIC mappings or via PCI interrupts. We handle interrupt - * routing for SAPIC-based (non-PCI) devices here. Interrupt routing - * for PCI devices will be handled when processing the PCI Interrupt - * Routing Table (PRT). - */ - - spcr = (acpi_ser_t *) __va(phys_addr); - if (!spcr) { - printk(KERN_WARNING PREFIX "Unable to map SPCR\n"); - return -ENODEV; - } - - setup_serial_acpi(spcr); - - if (spcr->length < sizeof(acpi_ser_t)) - /* Table not long enough for full info, thus no interrupt */ - return -ENODEV; - - if ((spcr->base_addr.space_id != ACPI_SERIAL_PCICONF_SPACE) && - (spcr->int_type == ACPI_SERIAL_INT_SAPIC)) - { - u32 irq_base = 0; - char *iosapic_address = NULL; - int vector = 0; - - /* We have a UART in memory space with an SAPIC interrupt */ - - global_int = ( (spcr->global_int[3] << 24) | - (spcr->global_int[2] << 16) | - (spcr->global_int[1] << 8) | - (spcr->global_int[0]) ); - - /* Which iosapic does this IRQ belong to? */ - - if (0 == acpi_find_iosapic(global_int, &irq_base, &iosapic_address)) { - vector = iosapic_register_irq (global_int, 1, 1, - irq_base, iosapic_address); - } - } - return 0; -} - -#endif /*CONFIG_SERIAL_ACPI*/ - - int __init acpi_boot_init (char *cmdline) { @@ -594,16 +530,6 @@ acpi_boot_init (char *cmdline) return result; } -#ifdef CONFIG_SERIAL_ACPI - /* - * TBD: Need phased approach to table parsing (only do those absolutely - * required during boot-up). Recommend expanding concept of fix- - * feature devices (LDM) to include table-based devices such as - * serial ports, EC, SMBus, etc. - */ - acpi_table_parse(ACPI_SPCR, acpi_parse_spcr); -#endif /*CONFIG_SERIAL_ACPI*/ - #ifdef CONFIG_SMP if (available_cpus == 0) { printk("ACPI: Found 0 CPUS; assuming 1\n"); diff -urpNX dontdiff linux-2.5.29/include/linux/acpi_serial.h linux-2.5.29-scsi/include/linux/acpi_serial.h --- linux-2.5.29/include/linux/acpi_serial.h 2002-06-20 16:53:53.000000000 -0600 +++ linux-2.5.29-scsi/include/linux/acpi_serial.h 1969-12-31 17:00:00.000000000 -0700 @@ -1,105 +0,0 @@ -/* - * linux/include/linux/acpi_serial.h - * - * Copyright (C) 2000 Hewlett-Packard Co. - * Copyright (C) 2000 Khalid Aziz - * - * Definitions for ACPI defined serial ports (headless console and - * debug ports) - * - */ - -extern void setup_serial_acpi(void *); - -#define ACPI_SIG_LEN 4 - -/* ACPI table signatures */ -#define ACPI_SPCRT_SIGNATURE "SPCR" -#define ACPI_DBGPT_SIGNATURE "DBGP" - -/* Interface type as defined in ACPI serial port tables */ -#define ACPI_SERIAL_INTFC_16550 0 -#define ACPI_SERIAL_INTFC_16450 1 - -/* Interrupt types for ACPI serial port tables */ -#define ACPI_SERIAL_INT_PCAT 0x01 -#define ACPI_SERIAL_INT_APIC 0x02 -#define ACPI_SERIAL_INT_SAPIC 0x04 - -/* Baud rates as defined in ACPI serial port tables */ -#define ACPI_SERIAL_BAUD_9600 3 -#define ACPI_SERIAL_BAUD_19200 4 -#define ACPI_SERIAL_BAUD_57600 6 -#define ACPI_SERIAL_BAUD_115200 7 - -/* Parity as defined in ACPI serial port tables */ -#define ACPI_SERIAL_PARITY_NONE 0 - -/* Flow control methods as defined in ACPI serial port tables */ -#define ACPI_SERIAL_FLOW_DCD 0x01 -#define ACPI_SERIAL_FLOW_RTS 0x02 -#define ACPI_SERIAL_FLOW_XON 0x04 - -/* Terminal types as defined in ACPI serial port tables */ -#define ACPI_SERIAL_TERM_VT100 0 -#define ACPI_SERIAL_TERM_VT100X 1 - -/* PCI Flags as defined by SPCR table */ -#define ACPI_SERIAL_PCIFLAG_PNP 0x00000001 - -/* Space ID as defined in base address structure in ACPI serial port tables */ -#define ACPI_SERIAL_MEM_SPACE 0 -#define ACPI_SERIAL_IO_SPACE 1 -#define ACPI_SERIAL_PCICONF_SPACE 2 - -/* - * Generic Register Address Structure - as defined by Microsoft - * in http://www.microsoft.com/hwdev/onnow/download/LFreeACPI.doc - * -*/ -typedef struct { - u8 space_id; - u8 bit_width; - u8 bit_offset; - u8 resv; - u32 addrl; - u32 addrh; -} gen_regaddr; - -/* Space ID for generic register address structure */ -#define REGADDR_SPACE_SYSMEM 0 -#define REGADDR_SPACE_SYSIO 1 -#define REGADDR_SPACE_PCICONFIG 2 - -/* Serial Port Console Redirection and Debug Port Table formats */ -typedef struct { - u8 signature[4]; - u32 length; - u8 rev; - u8 chksum; - u8 oemid[6]; - u8 oem_tabid[8]; - u32 oem_rev; - u8 creator_id[4]; - u32 creator_rev; - u8 intfc_type; - u8 resv1[3]; - gen_regaddr base_addr; - u8 int_type; - u8 irq; - u8 global_int[4]; - u8 baud; - u8 parity; - u8 stop_bits; - u8 flow_ctrl; - u8 termtype; - u8 language; - u16 pci_dev_id; - u16 pci_vendor_id; - u8 pci_bus; - u8 pci_dev; - u8 pci_func; - u8 pci_flags[4]; - u8 pci_seg; - u32 resv2; -} acpi_ser_t;