diff options
Diffstat (limited to 'arch/x86/platform/ce4100/ce4100.c')
-rw-r--r-- | arch/x86/platform/ce4100/ce4100.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c index 4c61b52191eb..f8ab4945892e 100644 --- a/arch/x86/platform/ce4100/ce4100.c +++ b/arch/x86/platform/ce4100/ce4100.c | |||
@@ -21,12 +21,25 @@ | |||
21 | #include <asm/i8259.h> | 21 | #include <asm/i8259.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/io_apic.h> | 23 | #include <asm/io_apic.h> |
24 | #include <asm/emergency-restart.h> | ||
24 | 25 | ||
25 | static int ce4100_i8042_detect(void) | 26 | static int ce4100_i8042_detect(void) |
26 | { | 27 | { |
27 | return 0; | 28 | return 0; |
28 | } | 29 | } |
29 | 30 | ||
31 | /* | ||
32 | * The CE4100 platform has an internal 8051 Microcontroller which is | ||
33 | * responsible for signaling to the external Power Management Unit the | ||
34 | * intention to reset, reboot or power off the system. This 8051 device has | ||
35 | * its command register mapped at I/O port 0xcf9 and the value 0x4 is used | ||
36 | * to power off the system. | ||
37 | */ | ||
38 | static void ce4100_power_off(void) | ||
39 | { | ||
40 | outb(0x4, 0xcf9); | ||
41 | } | ||
42 | |||
30 | #ifdef CONFIG_SERIAL_8250 | 43 | #ifdef CONFIG_SERIAL_8250 |
31 | 44 | ||
32 | static unsigned int mem_serial_in(struct uart_port *p, int offset) | 45 | static unsigned int mem_serial_in(struct uart_port *p, int offset) |
@@ -92,8 +105,11 @@ static void ce4100_serial_fixup(int port, struct uart_port *up, | |||
92 | up->membase = | 105 | up->membase = |
93 | (void __iomem *)__fix_to_virt(FIX_EARLYCON_MEM_BASE); | 106 | (void __iomem *)__fix_to_virt(FIX_EARLYCON_MEM_BASE); |
94 | up->membase += up->mapbase & ~PAGE_MASK; | 107 | up->membase += up->mapbase & ~PAGE_MASK; |
108 | up->mapbase += port * 0x100; | ||
109 | up->membase += port * 0x100; | ||
95 | up->iotype = UPIO_MEM32; | 110 | up->iotype = UPIO_MEM32; |
96 | up->regshift = 2; | 111 | up->regshift = 2; |
112 | up->irq = 4; | ||
97 | } | 113 | } |
98 | #endif | 114 | #endif |
99 | up->iobase = 0; | 115 | up->iobase = 0; |
@@ -139,8 +155,19 @@ void __init x86_ce4100_early_setup(void) | |||
139 | x86_init.mpparse.find_smp_config = x86_init_noop; | 155 | x86_init.mpparse.find_smp_config = x86_init_noop; |
140 | x86_init.pci.init = ce4100_pci_init; | 156 | x86_init.pci.init = ce4100_pci_init; |
141 | 157 | ||
158 | /* | ||
159 | * By default, the reboot method is ACPI which is supported by the | ||
160 | * CE4100 bootloader CEFDK using FADT.ResetReg Address and ResetValue | ||
161 | * the bootloader will however issue a system power off instead of | ||
162 | * reboot. By using BOOT_KBD we ensure proper system reboot as | ||
163 | * expected. | ||
164 | */ | ||
165 | reboot_type = BOOT_KBD; | ||
166 | |||
142 | #ifdef CONFIG_X86_IO_APIC | 167 | #ifdef CONFIG_X86_IO_APIC |
143 | x86_init.pci.init_irq = sdv_pci_init; | 168 | x86_init.pci.init_irq = sdv_pci_init; |
144 | x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck; | 169 | x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck; |
145 | #endif | 170 | #endif |
171 | |||
172 | pm_power_off = ce4100_power_off; | ||
146 | } | 173 | } |