aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-02-23 09:24:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-06 21:25:18 -0500
commit1bd187de536494a27925902b9653e9ef0ace4774 (patch)
treebe95e32c5f15a7d47fef7a98ee00c0c9823e940c /arch/x86
parentf549e94effa163ea170d2f0c12d307cb602431c6 (diff)
x86, intel-mid: remove Intel MID specific serial support
Since we have a native 8250 driver carrying the Intel MID serial devices the specific support is not needed anymore. This patch removes it for Intel MID. Note that the console device name is changed from ttyMFDx to ttySx. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/Kconfig.debug4
-rw-r--r--arch/x86/include/asm/intel-mid.h3
-rw-r--r--arch/x86/kernel/early_printk.c6
-rw-r--r--arch/x86/platform/intel-mid/Makefile1
-rw-r--r--arch/x86/platform/intel-mid/early_printk_intel_mid.c112
5 files changed, 0 insertions, 126 deletions
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 20028da8ae18..72484a645f05 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -43,10 +43,6 @@ config EARLY_PRINTK
43 with klogd/syslogd or the X server. You should normally N here, 43 with klogd/syslogd or the X server. You should normally N here,
44 unless you want to debug such a crash. 44 unless you want to debug such a crash.
45 45
46config EARLY_PRINTK_INTEL_MID
47 bool "Early printk for Intel MID platform support"
48 depends on EARLY_PRINTK && X86_INTEL_MID
49
50config EARLY_PRINTK_DBGP 46config EARLY_PRINTK_DBGP
51 bool "Early printk via EHCI debug port" 47 bool "Early printk via EHCI debug port"
52 depends on EARLY_PRINTK && PCI 48 depends on EARLY_PRINTK && PCI
diff --git a/arch/x86/include/asm/intel-mid.h b/arch/x86/include/asm/intel-mid.h
index 705d35708a50..7c5af123bdbd 100644
--- a/arch/x86/include/asm/intel-mid.h
+++ b/arch/x86/include/asm/intel-mid.h
@@ -136,9 +136,6 @@ extern enum intel_mid_timer_options intel_mid_timer_options;
136#define SFI_MTMR_MAX_NUM 8 136#define SFI_MTMR_MAX_NUM 8
137#define SFI_MRTC_MAX 8 137#define SFI_MRTC_MAX 8
138 138
139extern struct console early_hsu_console;
140extern void hsu_early_console_init(const char *);
141
142extern void intel_scu_devices_create(void); 139extern void intel_scu_devices_create(void);
143extern void intel_scu_devices_destroy(void); 140extern void intel_scu_devices_destroy(void);
144 141
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index a62536a1be88..f85e3fb50f28 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -375,12 +375,6 @@ static int __init setup_early_printk(char *buf)
375 if (!strncmp(buf, "xen", 3)) 375 if (!strncmp(buf, "xen", 3))
376 early_console_register(&xenboot_console, keep); 376 early_console_register(&xenboot_console, keep);
377#endif 377#endif
378#ifdef CONFIG_EARLY_PRINTK_INTEL_MID
379 if (!strncmp(buf, "hsu", 3)) {
380 hsu_early_console_init(buf + 3);
381 early_console_register(&early_hsu_console, keep);
382 }
383#endif
384#ifdef CONFIG_EARLY_PRINTK_EFI 378#ifdef CONFIG_EARLY_PRINTK_EFI
385 if (!strncmp(buf, "efi", 3)) 379 if (!strncmp(buf, "efi", 3))
386 early_console_register(&early_efi_console, keep); 380 early_console_register(&early_efi_console, keep);
diff --git a/arch/x86/platform/intel-mid/Makefile b/arch/x86/platform/intel-mid/Makefile
index 0a8ee703b9fa..0ce1b1913673 100644
--- a/arch/x86/platform/intel-mid/Makefile
+++ b/arch/x86/platform/intel-mid/Makefile
@@ -1,5 +1,4 @@
1obj-$(CONFIG_X86_INTEL_MID) += intel-mid.o intel_mid_vrtc.o mfld.o mrfl.o 1obj-$(CONFIG_X86_INTEL_MID) += intel-mid.o intel_mid_vrtc.o mfld.o mrfl.o
2obj-$(CONFIG_EARLY_PRINTK_INTEL_MID) += early_printk_intel_mid.o
3 2
4# SFI specific code 3# SFI specific code
5ifdef CONFIG_X86_INTEL_MID 4ifdef CONFIG_X86_INTEL_MID
diff --git a/arch/x86/platform/intel-mid/early_printk_intel_mid.c b/arch/x86/platform/intel-mid/early_printk_intel_mid.c
deleted file mode 100644
index 4e720829ab90..000000000000
--- a/arch/x86/platform/intel-mid/early_printk_intel_mid.c
+++ /dev/null
@@ -1,112 +0,0 @@
1/*
2 * early_printk_intel_mid.c - early consoles for Intel MID platforms
3 *
4 * Copyright (c) 2008-2010, Intel Corporation
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; version 2
9 * of the License.
10 */
11
12/*
13 * This file implements early console named hsu.
14 * hsu is based on a High Speed UART device which only exists in the Medfield
15 * platform
16 */
17
18#include <linux/serial_reg.h>
19#include <linux/serial_mfd.h>
20#include <linux/console.h>
21#include <linux/kernel.h>
22#include <linux/delay.h>
23#include <linux/io.h>
24
25#include <asm/fixmap.h>
26#include <asm/pgtable.h>
27#include <asm/intel-mid.h>
28
29/*
30 * Following is the early console based on Medfield HSU (High
31 * Speed UART) device.
32 */
33#define HSU_PORT_BASE 0xffa28080
34
35static void __iomem *phsu;
36
37void hsu_early_console_init(const char *s)
38{
39 unsigned long paddr, port = 0;
40 u8 lcr;
41
42 /*
43 * Select the early HSU console port if specified by user in the
44 * kernel command line.
45 */
46 if (*s && !kstrtoul(s, 10, &port))
47 port = clamp_val(port, 0, 2);
48
49 paddr = HSU_PORT_BASE + port * 0x80;
50 phsu = (void __iomem *)set_fixmap_offset_nocache(FIX_EARLYCON_MEM_BASE, paddr);
51
52 /* Disable FIFO */
53 writeb(0x0, phsu + UART_FCR);
54
55 /* Set to default 115200 bps, 8n1 */
56 lcr = readb(phsu + UART_LCR);
57 writeb((0x80 | lcr), phsu + UART_LCR);
58 writeb(0x18, phsu + UART_DLL);
59 writeb(lcr, phsu + UART_LCR);
60 writel(0x3600, phsu + UART_MUL*4);
61
62 writeb(0x8, phsu + UART_MCR);
63 writeb(0x7, phsu + UART_FCR);
64 writeb(0x3, phsu + UART_LCR);
65
66 /* Clear IRQ status */
67 readb(phsu + UART_LSR);
68 readb(phsu + UART_RX);
69 readb(phsu + UART_IIR);
70 readb(phsu + UART_MSR);
71
72 /* Enable FIFO */
73 writeb(0x7, phsu + UART_FCR);
74}
75
76#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
77
78static void early_hsu_putc(char ch)
79{
80 unsigned int timeout = 10000; /* 10ms */
81 u8 status;
82
83 while (--timeout) {
84 status = readb(phsu + UART_LSR);
85 if (status & BOTH_EMPTY)
86 break;
87 udelay(1);
88 }
89
90 /* Only write the char when there was no timeout */
91 if (timeout)
92 writeb(ch, phsu + UART_TX);
93}
94
95static void early_hsu_write(struct console *con, const char *str, unsigned n)
96{
97 int i;
98
99 for (i = 0; i < n && *str; i++) {
100 if (*str == '\n')
101 early_hsu_putc('\r');
102 early_hsu_putc(*str);
103 str++;
104 }
105}
106
107struct console early_hsu_console = {
108 .name = "earlyhsu",
109 .write = early_hsu_write,
110 .flags = CON_PRINTBUFFER,
111 .index = -1,
112};