Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / x86 / kernel / x86_init.c
1 /*
2  * Copyright (C) 2009 Thomas Gleixner <tglx@linutronix.de>
3  *
4  *  For licencing details see kernel-base/COPYING
5  */
6 #include <linux/init.h>
7 #include <linux/ioport.h>
8 #include <linux/module.h>
9
10 #include <asm/bios_ebda.h>
11 #include <asm/paravirt.h>
12 #include <asm/pci_x86.h>
13 #include <asm/mpspec.h>
14 #include <asm/setup.h>
15 #include <asm/apic.h>
16 #include <asm/e820.h>
17 #include <asm/time.h>
18 #include <asm/irq.h>
19 #include <asm/pat.h>
20 #include <asm/tsc.h>
21 #include <asm/iommu.h>
22
23 void __cpuinit x86_init_noop(void) { }
24 void __init x86_init_uint_noop(unsigned int unused) { }
25 void __init x86_init_pgd_noop(pgd_t *unused) { }
26 int __init iommu_init_noop(void) { return 0; }
27 void iommu_shutdown_noop(void) { }
28
29 /*
30  * The platform setup functions are preset with the default functions
31  * for standard PC hardware.
32  */
33 struct x86_init_ops x86_init __initdata = {
34
35         .resources = {
36                 .probe_roms             = x86_init_noop,
37                 .reserve_resources      = reserve_standard_io_resources,
38                 .memory_setup           = default_machine_specific_memory_setup,
39         },
40
41         .mpparse = {
42                 .mpc_record             = x86_init_uint_noop,
43                 .setup_ioapic_ids       = x86_init_noop,
44                 .mpc_apic_id            = default_mpc_apic_id,
45                 .smp_read_mpc_oem       = default_smp_read_mpc_oem,
46                 .mpc_oem_bus_info       = default_mpc_oem_bus_info,
47                 .find_smp_config        = default_find_smp_config,
48                 .get_smp_config         = default_get_smp_config,
49         },
50
51         .irqs = {
52                 .pre_vector_init        = init_ISA_irqs,
53                 .intr_init              = native_init_IRQ,
54                 .trap_init              = x86_init_noop,
55         },
56
57         .oem = {
58                 .arch_setup             = x86_init_noop,
59                 .banner                 = default_banner,
60         },
61
62         .paging = {
63                 .pagetable_setup_start  = native_pagetable_setup_start,
64                 .pagetable_setup_done   = native_pagetable_setup_done,
65         },
66
67         .timers = {
68                 .setup_percpu_clockev   = setup_boot_APIC_clock,
69                 .tsc_pre_init           = x86_init_noop,
70                 .timer_init             = hpet_time_init,
71         },
72
73         .iommu = {
74                 .iommu_init             = iommu_init_noop,
75         },
76
77         .pci = {
78                 .init                   = x86_default_pci_init,
79                 .init_irq               = x86_default_pci_init_irq,
80                 .fixup_irqs             = x86_default_pci_fixup_irqs,
81         },
82 };
83
84 struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
85         .setup_percpu_clockev           = setup_secondary_APIC_clock,
86 };
87
88 static void default_nmi_init(void) { };
89 static int default_i8042_detect(void) { return 1; };
90
91 struct x86_platform_ops x86_platform = {
92         .calibrate_tsc                  = native_calibrate_tsc,
93         .get_wallclock                  = mach_get_cmos_time,
94         .set_wallclock                  = mach_set_rtc_mmss,
95         .iommu_shutdown                 = iommu_shutdown_noop,
96         .is_untracked_pat_range         = is_ISA_range,
97         .nmi_init                       = default_nmi_init,
98         .i8042_detect                   = default_i8042_detect
99 };
100
101 EXPORT_SYMBOL_GPL(x86_platform);