1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 3 * Intel CE4100 platform specific setup code 4 * 5 * (C) Copyright 2010 Intel Corporation 6 */ 7 #include <linux/init.h> 8 #include <linux/reboot.h> 9 10 #include <asm/ce4100.h> 11 #include <asm/prom.h> 12 #include <asm/setup.h> 13 #include <asm/io.h> 14 15 /* 16 * The CE4100 platform has an internal 8051 Microcontroller which is 17 * responsible for signaling to the external Power Management Unit the 18 * intention to reset, reboot or power off the system. This 8051 device has 19 * its command register mapped at I/O port 0xcf9 and the value 0x4 is used 20 * to power off the system. 21 */ ce4100_power_off(void)22static void ce4100_power_off(void) 23 { 24 outb(0x4, 0xcf9); 25 } 26 sdv_arch_setup(void)27static void __init sdv_arch_setup(void) 28 { 29 sdv_serial_fixup(); 30 } 31 sdv_pci_init(void)32static void sdv_pci_init(void) 33 { 34 x86_of_pci_init(); 35 } 36 37 /* 38 * CE4100 specific x86_init function overrides and early setup 39 * calls. 40 */ x86_ce4100_early_setup(void)41void __init x86_ce4100_early_setup(void) 42 { 43 x86_init.oem.arch_setup = sdv_arch_setup; 44 x86_init.resources.probe_roms = x86_init_noop; 45 x86_init.mpparse.find_mptable = x86_init_noop; 46 x86_init.mpparse.early_parse_smp_cfg = x86_init_noop; 47 x86_init.pci.init = ce4100_pci_init; 48 x86_init.pci.init_irq = sdv_pci_init; 49 50 /* 51 * By default, the reboot method is ACPI which is supported by the 52 * CE4100 bootloader CEFDK using FADT.ResetReg Address and ResetValue 53 * the bootloader will however issue a system power off instead of 54 * reboot. By using BOOT_KBD we ensure proper system reboot as 55 * expected. 56 */ 57 reboot_type = BOOT_KBD; 58 59 pm_power_off = ce4100_power_off; 60 } 61