···377378 If unsure, choose "PC-compatible" instead.379000000000000380config X86_MRST381 bool "Moorestown MID platform"382 depends on PCI···397 depends on X86_EXTENDED_PLATFORM398 depends on X86_IO_APIC399 select APB_TIMER0000400 ---help---401 Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin402 Internet Device(MID) platform. Moorestown consists of two chips:···481 ---help---482 Support for Unisys ES7000 systems. Say 'Y' here if this kernel is483 supposed to run on an IA32-based Unisys ES7000 system.0000000000000484485config SCHED_OMIT_FRAME_POINTER486 def_bool y
···377378 If unsure, choose "PC-compatible" instead.379380+config X86_INTEL_CE381+ bool "CE4100 TV platform"382+ depends on PCI383+ depends on PCI_GODIRECT384+ depends on X86_32385+ depends on X86_EXTENDED_PLATFORM386+ select X86_REBOOTFIXUPS387+ ---help---388+ Select for the Intel CE media processor (CE4100) SOC.389+ This option compiles in support for the CE4100 SOC for settop390+ boxes and media devices.391+392config X86_MRST393 bool "Moorestown MID platform"394 depends on PCI···385 depends on X86_EXTENDED_PLATFORM386 depends on X86_IO_APIC387 select APB_TIMER388+ select I2C389+ select SPI390+ select INTEL_SCU_IPC391+ select X86_PLATFORM_DEVICES392 ---help---393 Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin394 Internet Device(MID) platform. Moorestown consists of two chips:···465 ---help---466 Support for Unisys ES7000 systems. Say 'Y' here if this kernel is467 supposed to run on an IA32-based Unisys ES7000 system.468+469+config X86_32_IRIS470+ tristate "Eurobraille/Iris poweroff module"471+ depends on X86_32472+ ---help---473+ The Iris machines from EuroBraille do not have APM or ACPI support474+ to shut themselves down properly. A special I/O sequence is475+ needed to do so, which is what this module does at476+ kernel shutdown.477+478+ This is only for Iris machines from EuroBraille.479+480+ If unused, say N.481482config SCHED_OMIT_FRAME_POINTER483 def_bool y
+2-1
arch/x86/include/asm/apic.h
···234extern void setup_local_APIC(void);235extern void end_local_APIC_setup(void);236extern void init_apic_mappings(void);0237extern void setup_boot_APIC_clock(void);238extern void setup_secondary_APIC_clock(void);239extern int APIC_init_uniprocessor(void);240extern void enable_NMI_through_LVT0(void);0241242/*243 * On 32bit this is mach-xxx local244 */245#ifdef CONFIG_X86_64246-extern void early_init_lapic_mapping(void);247extern int apic_is_clustered_box(void);248#else249static inline int apic_is_clustered_box(void)
···234extern void setup_local_APIC(void);235extern void end_local_APIC_setup(void);236extern void init_apic_mappings(void);237+void register_lapic_address(unsigned long address);238extern void setup_boot_APIC_clock(void);239extern void setup_secondary_APIC_clock(void);240extern int APIC_init_uniprocessor(void);241extern void enable_NMI_through_LVT0(void);242+extern int apic_force_enable(void);243244/*245 * On 32bit this is mach-xxx local246 */247#ifdef CONFIG_X86_640248extern int apic_is_clustered_box(void);249#else250static inline int apic_is_clustered_box(void)
···117 FIX_TEXT_POKE1, /* reserve 2 pages for text_poke() */118 FIX_TEXT_POKE0, /* first page is last, because allocation is backward */119 __end_of_permanent_fixed_addresses,0000120 /*121 * 256 temporary boot-time mappings, used by early_ioremap(),122 * before ioremap() is functional.
···117 FIX_TEXT_POKE1, /* reserve 2 pages for text_poke() */118 FIX_TEXT_POKE0, /* first page is last, because allocation is backward */119 __end_of_permanent_fixed_addresses,120+121+#ifdef CONFIG_X86_MRST122+ FIX_LNW_VRTC,123+#endif124 /*125 * 256 temporary boot-time mappings, used by early_ioremap(),126 * before ioremap() is functional.
···1+#ifndef _MRST_VRTC_H2+#define _MRST_VRTC_H3+4+extern unsigned char vrtc_cmos_read(unsigned char reg);5+extern void vrtc_cmos_write(unsigned char val, unsigned char reg);6+extern unsigned long vrtc_get_time(void);7+extern int vrtc_set_mmss(unsigned long nowtime);8+9+#endif
+13-1
arch/x86/include/asm/mrst.h
···14#include <linux/sfi.h>1516extern int pci_mrst_init(void);17-int __init sfi_parse_mrtc(struct sfi_table_header *table);001819/*20 * Medfield is the follow-up of Moorestown, it combines two chip solution into···5253extern struct console early_hsu_console;54extern void hsu_early_console_init(void);000000000055#endif /* _ASM_X86_MRST_H */
···14#include <linux/sfi.h>1516extern int pci_mrst_init(void);17+extern int __init sfi_parse_mrtc(struct sfi_table_header *table);18+extern int sfi_mrtc_num;19+extern struct sfi_rtc_table_entry sfi_mrtc_array[];2021/*22 * Medfield is the follow-up of Moorestown, it combines two chip solution into···5051extern struct console early_hsu_console;52extern void hsu_early_console_init(void);53+54+extern void intel_scu_devices_create(void);55+extern void intel_scu_devices_destroy(void);56+57+/* VRTC timer */58+#define MRST_VRTC_MAP_SZ (1024)59+/*#define MRST_VRTC_PGOFFSET (0xc00) */60+61+extern void mrst_rtc_init(void);62+63#endif /* _ASM_X86_MRST_H */
···315316 if (system_state == SYSTEM_BOOTING) {317 irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT);0318 /* APB timer irqs are set up as mp_irqs, timer is edge type */319 __set_irq_handler(adev->irq, handle_edge_irq, 0, "edge");320 if (request_irq(adev->irq, apbt_interrupt_handler,
···315316 if (system_state == SYSTEM_BOOTING) {317 irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT);318+ irq_set_affinity(adev->irq, cpumask_of(adev->cpu));319 /* APB timer irqs are set up as mp_irqs, timer is edge type */320 __set_irq_handler(adev->irq, handle_edge_irq, 0, "edge");321 if (request_irq(adev->irq, apbt_interrupt_handler,
+80-71
arch/x86/kernel/apic/apic.c
···1195 oldvalue, value);1196}11971198-1199/**1200 * setup_local_APIC - setup the local APIC0001201 */1202void __cpuinit setup_local_APIC(void)1203{01204 unsigned int value, queued;1205 int i, j, acked = 0;1206 unsigned long long tsc = 0, ntsc;···1227 }1228#endif1229 perf_events_lapic_init();1230-1231- preempt_disable();12321233 /*1234 * Double-check whether this APIC is really registered.···1343 * TODO: set up through-local-APIC from through-I/O-APIC? --macro1344 */1345 value = apic_read(APIC_LVT0) & APIC_LVT_MASKED;1346- if (!smp_processor_id() && (pic_mode || !value)) {1347 value = APIC_DM_EXTINT;1348- apic_printk(APIC_VERBOSE, "enabled ExtINT on CPU#%d\n",1349- smp_processor_id());1350 } else {1351 value = APIC_DM_EXTINT | APIC_LVT_MASKED;1352- apic_printk(APIC_VERBOSE, "masked ExtINT on CPU#%d\n",1353- smp_processor_id());1354 }1355 apic_write(APIC_LVT0, value);13561357 /*1358 * only the BP should see the LINT1 NMI signal, obviously.1359 */1360- if (!smp_processor_id())1361 value = APIC_DM_NMI;1362 else1363 value = APIC_DM_NMI | APIC_LVT_MASKED;···1363 value |= APIC_LVT_LEVEL_TRIGGER;1364 apic_write(APIC_LVT1, value);13651366- preempt_enable();1367-1368#ifdef CONFIG_X86_MCE_INTEL1369 /* Recheck CMCI information after local APIC is up on CPU #0 */1370- if (smp_processor_id() == 0)1371 cmci_recheck();1372#endif1373}···1527 return 0;1528}1529#else00000000000000000000000000000000000000000000000001530/*1531 * Detect and initialize APIC1532 */1533static int __init detect_init_APIC(void)1534{1535- u32 h, l, features;1536-1537 /* Disabled by kernel option? */1538 if (disable_apic)1539 return -1;···1610 "you can enable it with \"lapic\"\n");1611 return -1;1612 }1613- /*1614- * Some BIOSes disable the local APIC in the APIC_BASE1615- * MSR. This can only be done in software for Intel P6 or later1616- * and AMD K7 (Model > 1) or later.1617- */1618- rdmsr(MSR_IA32_APICBASE, l, h);1619- if (!(l & MSR_IA32_APICBASE_ENABLE)) {1620- pr_info("Local APIC disabled by BIOS -- reenabling.\n");1621- l &= ~MSR_IA32_APICBASE_BASE;1622- l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE;1623- wrmsr(MSR_IA32_APICBASE, l, h);1624- enabled_via_apicbase = 1;1625- }1626 }1627- /*1628- * The APIC feature bit should now be enabled1629- * in `cpuid'1630- */1631- features = cpuid_edx(1);1632- if (!(features & (1 << X86_FEATURE_APIC))) {1633- pr_warning("Could not enable APIC!\n");1634- return -1;1635- }1636- set_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);1637- mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;1638-1639- /* The BIOS may have set up the APIC at some other address */1640- rdmsr(MSR_IA32_APICBASE, l, h);1641- if (l & MSR_IA32_APICBASE_ENABLE)1642- mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;1643-1644- pr_info("Found and enabled local APIC!\n");16451646 apic_pm_activate();1647···1624no_apic:1625 pr_info("No local APIC present or hardware disabled\n");1626 return -1;1627-}1628-#endif1629-1630-#ifdef CONFIG_X86_641631-void __init early_init_lapic_mapping(void)1632-{1633- /*1634- * If no local APIC can be found then go out1635- * : it means there is no mpatable and MADT1636- */1637- if (!smp_found_config)1638- return;1639-1640- set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);1641- apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n",1642- APIC_BASE, mp_lapic_addr);1643-1644- /*1645- * Fetch the APIC ID of the BSP in case we have a1646- * default configuration (or the MP table is broken).1647- */1648- boot_cpu_physical_apicid = read_apic_id();1649}1650#endif1651···1652 * acpi_register_lapic_address()1653 */1654 if (!acpi_lapic && !smp_found_config)1655- set_fixmap_nocache(FIX_APIC_BASE, apic_phys);1656-1657- apic_printk(APIC_VERBOSE, "mapped APIC to %08lx (%08lx)\n",1658- APIC_BASE, apic_phys);1659 }16601661 /*···1670 * and disable smp mode1671 */1672 apic_version[new_apicid] =00000000000000001673 GET_APIC_VERSION(apic_read(APIC_LVR));1674 }1675}
···1195 oldvalue, value);1196}119701198/**1199 * setup_local_APIC - setup the local APIC1200+ *1201+ * Used to setup local APIC while initializing BSP or bringin up APs.1202+ * Always called with preemption disabled.1203 */1204void __cpuinit setup_local_APIC(void)1205{1206+ int cpu = smp_processor_id();1207 unsigned int value, queued;1208 int i, j, acked = 0;1209 unsigned long long tsc = 0, ntsc;···1224 }1225#endif1226 perf_events_lapic_init();0012271228 /*1229 * Double-check whether this APIC is really registered.···1342 * TODO: set up through-local-APIC from through-I/O-APIC? --macro1343 */1344 value = apic_read(APIC_LVT0) & APIC_LVT_MASKED;1345+ if (!cpu && (pic_mode || !value)) {1346 value = APIC_DM_EXTINT;1347+ apic_printk(APIC_VERBOSE, "enabled ExtINT on CPU#%d\n", cpu);01348 } else {1349 value = APIC_DM_EXTINT | APIC_LVT_MASKED;1350+ apic_printk(APIC_VERBOSE, "masked ExtINT on CPU#%d\n", cpu);01351 }1352 apic_write(APIC_LVT0, value);13531354 /*1355 * only the BP should see the LINT1 NMI signal, obviously.1356 */1357+ if (!cpu)1358 value = APIC_DM_NMI;1359 else1360 value = APIC_DM_NMI | APIC_LVT_MASKED;···1364 value |= APIC_LVT_LEVEL_TRIGGER;1365 apic_write(APIC_LVT1, value);1366001367#ifdef CONFIG_X86_MCE_INTEL1368 /* Recheck CMCI information after local APIC is up on CPU #0 */1369+ if (!cpu)1370 cmci_recheck();1371#endif1372}···1530 return 0;1531}1532#else1533+1534+static int apic_verify(void)1535+{1536+ u32 features, h, l;1537+1538+ /*1539+ * The APIC feature bit should now be enabled1540+ * in `cpuid'1541+ */1542+ features = cpuid_edx(1);1543+ if (!(features & (1 << X86_FEATURE_APIC))) {1544+ pr_warning("Could not enable APIC!\n");1545+ return -1;1546+ }1547+ set_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);1548+ mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;1549+1550+ /* The BIOS may have set up the APIC at some other address */1551+ rdmsr(MSR_IA32_APICBASE, l, h);1552+ if (l & MSR_IA32_APICBASE_ENABLE)1553+ mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;1554+1555+ pr_info("Found and enabled local APIC!\n");1556+ return 0;1557+}1558+1559+int apic_force_enable(void)1560+{1561+ u32 h, l;1562+1563+ if (disable_apic)1564+ return -1;1565+1566+ /*1567+ * Some BIOSes disable the local APIC in the APIC_BASE1568+ * MSR. This can only be done in software for Intel P6 or later1569+ * and AMD K7 (Model > 1) or later.1570+ */1571+ rdmsr(MSR_IA32_APICBASE, l, h);1572+ if (!(l & MSR_IA32_APICBASE_ENABLE)) {1573+ pr_info("Local APIC disabled by BIOS -- reenabling.\n");1574+ l &= ~MSR_IA32_APICBASE_BASE;1575+ l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE;1576+ wrmsr(MSR_IA32_APICBASE, l, h);1577+ enabled_via_apicbase = 1;1578+ }1579+ return apic_verify();1580+}1581+1582/*1583 * Detect and initialize APIC1584 */1585static int __init detect_init_APIC(void)1586{001587 /* Disabled by kernel option? */1588 if (disable_apic)1589 return -1;···1566 "you can enable it with \"lapic\"\n");1567 return -1;1568 }1569+ if (apic_force_enable())1570+ return -1;1571+ } else {1572+ if (apic_verify())1573+ return -1;000000001574 }00000000000000000015751576 apic_pm_activate();1577···1606no_apic:1607 pr_info("No local APIC present or hardware disabled\n");1608 return -1;00000000000000000000001609}1610#endif1611···1656 * acpi_register_lapic_address()1657 */1658 if (!acpi_lapic && !smp_found_config)1659+ register_lapic_address(apic_phys);0001660 }16611662 /*···1677 * and disable smp mode1678 */1679 apic_version[new_apicid] =1680+ GET_APIC_VERSION(apic_read(APIC_LVR));1681+ }1682+}1683+1684+void __init register_lapic_address(unsigned long address)1685+{1686+ mp_lapic_addr = address;1687+1688+ if (!x2apic_mode) {1689+ set_fixmap_nocache(FIX_APIC_BASE, address);1690+ apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n",1691+ APIC_BASE, mp_lapic_addr);1692+ }1693+ if (boot_cpu_physical_apicid == -1U) {1694+ boot_cpu_physical_apicid = read_apic_id();1695+ apic_version[boot_cpu_physical_apicid] =1696 GET_APIC_VERSION(apic_read(APIC_LVR));1697 }1698}
+46-16
arch/x86/kernel/apic/io_apic.c
···126}127early_param("noapic", parse_noapic);12800000000000000000000129struct irq_pin_list {130 int apic, pin;131 struct irq_pin_list *next;···155{156 return kzalloc_node(sizeof(struct irq_pin_list), GFP_KERNEL, node);157}0158159/* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */160#ifdef CONFIG_SPARSE_IRQ···1955 *1956 * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 19991957 */1958-1959-void __init setup_ioapic_ids_from_mpc(void)1960{1961 union IO_APIC_reg_00 reg_00;1962 physid_mask_t phys_id_present_map;···1964 unsigned char old_id;1965 unsigned long flags;19661967- if (acpi_ioapic)1968- return;1969- /*1970- * Don't check I/O APIC IDs for xAPIC systems. They have1971- * no meaning without the serial APIC bus.1972- */1973- if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)1974- || APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))1975- return;1976 /*1977 * This is broken; anything with a real cpu count has to1978 * circumvent this idiocy regardless.···2017 physids_or(phys_id_present_map, phys_id_present_map, tmp);2018 }20192020-2021 /*2022 * We need to adjust the IRQ routing table2023 * if the ID changed.···2028 = mp_ioapics[apic_id].apicid;20292030 /*2031- * Read the right value from the MPC table and2032- * write it into the ID register.2033 */0002034 apic_printk(APIC_VERBOSE, KERN_INFO2035 "...changing IO-APIC physical APIC ID to %d ...",2036 mp_ioapics[apic_id].apicid);···2054 else2055 apic_printk(APIC_VERBOSE, " ok.\n");2056 }0000000000000002057}2058#endif2059···3667 return reg_01.bits.entries + 1;3668}36693670-void __init probe_nr_irqs_gsi(void)3671{3672 int nr;3673···3984 return res;3985}39863987-void __init ioapic_init_mappings(void)3988{3989 unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0;3990 struct resource *ioapic_res;···4022 ioapic_res->end = ioapic_phys + IO_APIC_SLOT_SIZE - 1;4023 ioapic_res++;4024 }004025}40264027void __init ioapic_insert_resources(void)
···126}127early_param("noapic", parse_noapic);128129+/* Will be called in mpparse/acpi/sfi codes for saving IRQ info */130+void mp_save_irq(struct mpc_intsrc *m)131+{132+ int i;133+134+ apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x,"135+ " IRQ %02x, APIC ID %x, APIC INT %02x\n",136+ m->irqtype, m->irqflag & 3, (m->irqflag >> 2) & 3, m->srcbus,137+ m->srcbusirq, m->dstapic, m->dstirq);138+139+ for (i = 0; i < mp_irq_entries; i++) {140+ if (!memcmp(&mp_irqs[i], m, sizeof(*m)))141+ return;142+ }143+144+ memcpy(&mp_irqs[mp_irq_entries], m, sizeof(*m));145+ if (++mp_irq_entries == MAX_IRQ_SOURCES)146+ panic("Max # of irq sources exceeded!!\n");147+}148+149struct irq_pin_list {150 int apic, pin;151 struct irq_pin_list *next;···135{136 return kzalloc_node(sizeof(struct irq_pin_list), GFP_KERNEL, node);137}138+139140/* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */141#ifdef CONFIG_SPARSE_IRQ···1934 *1935 * by Matt Domsch <Matt_Domsch@dell.com> Tue Dec 21 12:25:05 CST 19991936 */1937+void __init setup_ioapic_ids_from_mpc_nocheck(void)01938{1939 union IO_APIC_reg_00 reg_00;1940 physid_mask_t phys_id_present_map;···1944 unsigned char old_id;1945 unsigned long flags;19460000000001947 /*1948 * This is broken; anything with a real cpu count has to1949 * circumvent this idiocy regardless.···2006 physids_or(phys_id_present_map, phys_id_present_map, tmp);2007 }200802009 /*2010 * We need to adjust the IRQ routing table2011 * if the ID changed.···2018 = mp_ioapics[apic_id].apicid;20192020 /*2021+ * Update the ID register according to the right value2022+ * from the MPC table if they are different.2023 */2024+ if (mp_ioapics[apic_id].apicid == reg_00.bits.ID)2025+ continue;2026+2027 apic_printk(APIC_VERBOSE, KERN_INFO2028 "...changing IO-APIC physical APIC ID to %d ...",2029 mp_ioapics[apic_id].apicid);···2041 else2042 apic_printk(APIC_VERBOSE, " ok.\n");2043 }2044+}2045+2046+void __init setup_ioapic_ids_from_mpc(void)2047+{2048+2049+ if (acpi_ioapic)2050+ return;2051+ /*2052+ * Don't check I/O APIC IDs for xAPIC systems. They have2053+ * no meaning without the serial APIC bus.2054+ */2055+ if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)2056+ || APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))2057+ return;2058+ setup_ioapic_ids_from_mpc_nocheck();2059}2060#endif2061···3639 return reg_01.bits.entries + 1;3640}36413642+static void __init probe_nr_irqs_gsi(void)3643{3644 int nr;3645···3956 return res;3957}39583959+void __init ioapic_and_gsi_init(void)3960{3961 unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0;3962 struct resource *ioapic_res;···3994 ioapic_res->end = ioapic_phys + IO_APIC_SLOT_SIZE - 1;3995 ioapic_res++;3996 }3997+3998+ probe_nr_irqs_gsi();3999}40004001void __init ioapic_insert_resources(void)
···43 outb(1, 0x92);44}4546+static void ce4100_reset(struct pci_dev *dev)47+{48+ int i;49+50+ for (i = 0; i < 10; i++) {51+ outb(0x2, 0xcf9);52+ udelay(50);53+ }54+}55+56struct device_fixup {57 unsigned int vendor;58 unsigned int device;59 void (*reboot_fixup)(struct pci_dev *);60};6162+/*63+ * PCI ids solely used for fixups_table go here64+ */65+#define PCI_DEVICE_ID_INTEL_CE4100 0x070866+67static const struct device_fixup fixups_table[] = {68{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset },69{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset },70{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE, cs5530a_warm_reset },71{ PCI_VENDOR_ID_RDC, PCI_DEVICE_ID_RDC_R6030, rdc321x_reset },72+{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CE4100, ce4100_reset },73};7475/*
+1-4
arch/x86/kernel/setup.c
···1035#endif10361037 init_apic_mappings();1038- ioapic_init_mappings();1039-1040- /* need to wait for io_apic is mapped */1041- probe_nr_irqs_gsi();10421043 kvm_guest_init();1044
···67 if (smp_found_config)68 early_get_smp_config();69#endif70- early_init_lapic_mapping();71}7273int __init amd_numa_init(unsigned long start_pfn, unsigned long end_pfn)
···67 if (smp_found_config)68 early_get_smp_config();69#endif070}7172int __init amd_numa_init(unsigned long start_pfn, unsigned long end_pfn)
···1+/*2+ * Intel CE4100 platform specific setup code3+ *4+ * (C) Copyright 2010 Intel Corporation5+ *6+ * This program is free software; you can redistribute it and/or7+ * modify it under the terms of the GNU General Public License8+ * as published by the Free Software Foundation; version 29+ * of the License.10+ */11+#include <linux/init.h>12+#include <linux/kernel.h>13+#include <linux/irq.h>14+#include <linux/module.h>15+#include <linux/serial_reg.h>16+#include <linux/serial_8250.h>17+18+#include <asm/setup.h>19+#include <asm/io.h>20+21+static int ce4100_i8042_detect(void)22+{23+ return 0;24+}25+26+static void __init sdv_find_smp_config(void)27+{28+}29+30+#ifdef CONFIG_SERIAL_825031+32+33+static unsigned int mem_serial_in(struct uart_port *p, int offset)34+{35+ offset = offset << p->regshift;36+ return readl(p->membase + offset);37+}38+39+/*40+ * The UART Tx interrupts are not set under some conditions and therefore serial41+ * transmission hangs. This is a silicon issue and has not been root caused. The42+ * workaround for this silicon issue checks UART_LSR_THRE bit and UART_LSR_TEMT43+ * bit of LSR register in interrupt handler to see whether at least one of these44+ * two bits is set, if so then process the transmit request. If this workaround45+ * is not applied, then the serial transmission may hang. This workaround is for46+ * errata number 9 in Errata - B step.47+*/48+49+static unsigned int ce4100_mem_serial_in(struct uart_port *p, int offset)50+{51+ unsigned int ret, ier, lsr;52+53+ if (offset == UART_IIR) {54+ offset = offset << p->regshift;55+ ret = readl(p->membase + offset);56+ if (ret & UART_IIR_NO_INT) {57+ /* see if the TX interrupt should have really set */58+ ier = mem_serial_in(p, UART_IER);59+ /* see if the UART's XMIT interrupt is enabled */60+ if (ier & UART_IER_THRI) {61+ lsr = mem_serial_in(p, UART_LSR);62+ /* now check to see if the UART should be63+ generating an interrupt (but isn't) */64+ if (lsr & (UART_LSR_THRE | UART_LSR_TEMT))65+ ret &= ~UART_IIR_NO_INT;66+ }67+ }68+ } else69+ ret = mem_serial_in(p, offset);70+ return ret;71+}72+73+static void ce4100_mem_serial_out(struct uart_port *p, int offset, int value)74+{75+ offset = offset << p->regshift;76+ writel(value, p->membase + offset);77+}78+79+static void ce4100_serial_fixup(int port, struct uart_port *up,80+ unsigned short *capabilites)81+{82+#ifdef CONFIG_EARLY_PRINTK83+ /*84+ * Over ride the legacy port configuration that comes from85+ * asm/serial.h. Using the ioport driver then switching to the86+ * PCI memmaped driver hangs the IOAPIC87+ */88+ if (up->iotype != UPIO_MEM32) {89+ up->uartclk = 14745600;90+ up->mapbase = 0xdffe0200;91+ set_fixmap_nocache(FIX_EARLYCON_MEM_BASE,92+ up->mapbase & PAGE_MASK);93+ up->membase =94+ (void __iomem *)__fix_to_virt(FIX_EARLYCON_MEM_BASE);95+ up->membase += up->mapbase & ~PAGE_MASK;96+ up->iotype = UPIO_MEM32;97+ up->regshift = 2;98+ }99+#endif100+ up->iobase = 0;101+ up->serial_in = ce4100_mem_serial_in;102+ up->serial_out = ce4100_mem_serial_out;103+104+ *capabilites |= (1 << 12);105+}106+107+static __init void sdv_serial_fixup(void)108+{109+ serial8250_set_isa_configurator(ce4100_serial_fixup);110+}111+112+#else113+static inline void sdv_serial_fixup(void);114+#endif115+116+static void __init sdv_arch_setup(void)117+{118+ sdv_serial_fixup();119+}120+121+/*122+ * CE4100 specific x86_init function overrides and early setup123+ * calls.124+ */125+void __init x86_ce4100_early_setup(void)126+{127+ x86_init.oem.arch_setup = sdv_arch_setup;128+ x86_platform.i8042_detect = ce4100_i8042_detect;129+ x86_init.resources.probe_roms = x86_init_noop;130+ x86_init.mpparse.get_smp_config = x86_init_uint_noop;131+ x86_init.mpparse.find_smp_config = sdv_find_smp_config;132+}
···1+/*2+ * Eurobraille/Iris power off support.3+ *4+ * Eurobraille's Iris machine is a PC with no APM or ACPI support.5+ * It is shutdown by a special I/O sequence which this module provides.6+ *7+ * Copyright (C) Shérab <Sebastien.Hinderer@ens-lyon.org>8+ *9+ * This program is free software ; you can redistribute it and/or modify10+ * it under the terms of the GNU General Public License as published by11+ * the Free Software Foundation ; either version 2 of the License, or12+ * (at your option) any later version.13+ *14+ * This program is distributed in the hope that it will be useful,15+ * but WITHOUT ANY WARRANTY ; without even the implied warranty of16+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17+ * GNU General Public License for more details.18+ *19+ * You should have received a copy of the GNU General Public License20+ * along with the program ; if not, write to the Free Software21+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.22+ */23+24+#include <linux/moduleparam.h>25+#include <linux/module.h>26+#include <linux/kernel.h>27+#include <linux/errno.h>28+#include <linux/delay.h>29+#include <linux/init.h>30+#include <linux/pm.h>31+#include <asm/io.h>32+33+#define IRIS_GIO_BASE 0x34034+#define IRIS_GIO_INPUT IRIS_GIO_BASE35+#define IRIS_GIO_OUTPUT (IRIS_GIO_BASE + 1)36+#define IRIS_GIO_PULSE 0x80 /* First byte to send */37+#define IRIS_GIO_REST 0x00 /* Second byte to send */38+#define IRIS_GIO_NODEV 0xff /* Likely not an Iris */39+40+MODULE_LICENSE("GPL");41+MODULE_AUTHOR("Sébastien Hinderer <Sebastien.Hinderer@ens-lyon.org>");42+MODULE_DESCRIPTION("A power_off handler for Iris devices from EuroBraille");43+MODULE_SUPPORTED_DEVICE("Eurobraille/Iris");44+45+static int force;46+47+module_param(force, bool, 0);48+MODULE_PARM_DESC(force, "Set to one to force poweroff handler installation.");49+50+static void (*old_pm_power_off)(void);51+52+static void iris_power_off(void)53+{54+ outb(IRIS_GIO_PULSE, IRIS_GIO_OUTPUT);55+ msleep(850);56+ outb(IRIS_GIO_REST, IRIS_GIO_OUTPUT);57+}58+59+/*60+ * Before installing the power_off handler, try to make sure the OS is61+ * running on an Iris. Since Iris does not support DMI, this is done62+ * by reading its input port and seeing whether the read value is63+ * meaningful.64+ */65+static int iris_init(void)66+{67+ unsigned char status;68+ if (force != 1) {69+ printk(KERN_ERR "The force parameter has not been set to 1 so the Iris poweroff handler will not be installed.\n");70+ return -ENODEV;71+ }72+ status = inb(IRIS_GIO_INPUT);73+ if (status == IRIS_GIO_NODEV) {74+ printk(KERN_ERR "This machine does not seem to be an Iris. Power_off handler not installed.\n");75+ return -ENODEV;76+ }77+ old_pm_power_off = pm_power_off;78+ pm_power_off = &iris_power_off;79+ printk(KERN_INFO "Iris power_off handler installed.\n");80+81+ return 0;82+}83+84+static void iris_exit(void)85+{86+ pm_power_off = old_pm_power_off;87+ printk(KERN_INFO "Iris power_off handler uninstalled.\n");88+}89+90+module_init(iris_init);91+module_exit(iris_exit);
···463 This driver can also be built as a module. If so, the module464 will be called rtc-cmos.465000000000000466config RTC_DRV_DS1216467 tristate "Dallas DS1216"468 depends on SNI_RM
···463 This driver can also be built as a module. If so, the module464 will be called rtc-cmos.465466+config RTC_DRV_VRTC467+ tristate "Virtual RTC for Moorestown platforms"468+ depends on X86_MRST469+ default y if X86_MRST470+471+ help472+ Say "yes" here to get direct support for the real time clock473+ found on Moorestown platforms. The VRTC is a emulated RTC that474+ derives its clock source from a real RTC in the PMIC. The MC146818475+ style programming interface is mostly conserved, but any476+ updates are done via IPC calls to the system controller FW.477+478config RTC_DRV_DS1216479 tristate "Dallas DS1216"480 depends on SNI_RM