aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 21:51:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 21:51:19 -0400
commit79eb238c76782a59d51adf8a3dd7f6444245b475 (patch)
tree73bd8c89a1ef19ec01a7592f189bbc0f52847185 /arch/arc
parent53ee983378ff23e8f3ff95ecf99dea7c6c221900 (diff)
parent5a64096700dc9761b57e767c9f0b740eb2cb84dd (diff)
Merge tag 'tty-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty / serial driver update from Greg KH: "Here's the big tty / serial driver update for 3.17-rc1. Nothing major, just a number of fixes and new features for different serial drivers, and some more tty core fixes and documentation of the tty locks. All of these have been in linux-next for a while" * tag 'tty-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (82 commits) tty/n_gsm.c: fix a memory leak in gsmld_open pch_uart: don't hardcode PCI slot to get DMA device tty: n_gsm, use setup_timer Revert "ARC: [arcfpga] stdout-path now suffices for earlycon/console" serial: sc16is7xx: Correct initialization of s->clk serial: 8250_dw: Add support for deferred probing serial: 8250_dw: Add optional reset control support serial: st-asc: Fix overflow in baudrate calculation serial: st-asc: Don't call BUG in asc_console_setup() tty: serial: msm: Make of_device_id array const tty/n_gsm.c: get gsm->num after gsm_activate_mux serial/core: Fix too big allocation for attribute member drivers/tty/serial: use correct type for dma_map/unmap serial: altera_jtaguart: Fix putchar function passed to uart_console_write() serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers Serial: allow port drivers to have a default attribute group tty: kgdb_nmi: Automatically manage tty enable serial: altera_jtaguart: Adpot uart_console_write() serial: samsung: improve code clarity by defining a variable serial: samsung: correct the case and default order in switch ...
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/boot/dts/angel4.dts2
-rw-r--r--arch/arc/plat-arcfpga/Kconfig7
-rw-r--r--arch/arc/plat-arcfpga/platform.c97
3 files changed, 3 insertions, 103 deletions
diff --git a/arch/arc/boot/dts/angel4.dts b/arch/arc/boot/dts/angel4.dts
index 5bb2fdaca02f..6b57475967a6 100644
--- a/arch/arc/boot/dts/angel4.dts
+++ b/arch/arc/boot/dts/angel4.dts
@@ -17,7 +17,7 @@
17 interrupt-parent = <&intc>; 17 interrupt-parent = <&intc>;
18 18
19 chosen { 19 chosen {
20 bootargs = "console=ttyARC0,115200n8 earlyprintk=ttyARC0"; 20 bootargs = "earlycon=arc_uart,mmio32,0xc0fc1000,115200n8 console=ttyARC0,115200n8";
21 }; 21 };
22 22
23 aliases { 23 aliases {
diff --git a/arch/arc/plat-arcfpga/Kconfig b/arch/arc/plat-arcfpga/Kconfig
index e27bb5cc3c1e..b9f34cf55acf 100644
--- a/arch/arc/plat-arcfpga/Kconfig
+++ b/arch/arc/plat-arcfpga/Kconfig
@@ -41,11 +41,4 @@ config ISS_SMP_EXTN
41 -XTL (To enable CPU start/stop/set-PC for another CPU) 41 -XTL (To enable CPU start/stop/set-PC for another CPU)
42 It doesn't provide coherent Caches and/or Atomic Ops (LLOCK/SCOND) 42 It doesn't provide coherent Caches and/or Atomic Ops (LLOCK/SCOND)
43 43
44config ARC_SERIAL_BAUD
45 int "UART Baud rate"
46 default "115200"
47 depends on SERIAL_ARC || SERIAL_ARC_CONSOLE
48 help
49 Baud rate for the ARC UART
50
51endif 44endif
diff --git a/arch/arc/plat-arcfpga/platform.c b/arch/arc/plat-arcfpga/platform.c
index 61c7e5997387..b8d0d456627f 100644
--- a/arch/arc/plat-arcfpga/platform.c
+++ b/arch/arc/plat-arcfpga/platform.c
@@ -22,115 +22,22 @@
22#include <plat/smp.h> 22#include <plat/smp.h>
23#include <plat/irq.h> 23#include <plat/irq.h>
24 24
25/*----------------------- Platform Devices -----------------------------*/
26
27#if IS_ENABLED(CONFIG_SERIAL_ARC)
28static unsigned long arc_uart_info[] = {
29 0, /* uart->is_emulated (runtime @running_on_hw) */
30 0, /* uart->port.uartclk */
31 0, /* uart->baud */
32 0
33};
34
35#if defined(CONFIG_SERIAL_ARC_CONSOLE)
36/*
37 * static platform data - but only for early serial
38 * TBD: derive this from a special DT node
39 */
40static struct resource arc_uart0_res[] = {
41 {
42 .start = UART0_BASE,
43 .end = UART0_BASE + 0xFF,
44 .flags = IORESOURCE_MEM,
45 },
46 {
47 .start = UART0_IRQ,
48 .end = UART0_IRQ,
49 .flags = IORESOURCE_IRQ,
50 },
51};
52
53static struct platform_device arc_uart0_dev = {
54 .name = "arc-uart",
55 .id = 0,
56 .num_resources = ARRAY_SIZE(arc_uart0_res),
57 .resource = arc_uart0_res,
58 .dev = {
59 .platform_data = &arc_uart_info,
60 },
61};
62
63static struct platform_device *fpga_early_devs[] __initdata = {
64 &arc_uart0_dev,
65};
66#endif /* CONFIG_SERIAL_ARC_CONSOLE */
67
68static void arc_fpga_serial_init(void)
69{
70 /* To let driver workaround ISS bug: baudh Reg can't be set to 0 */
71 arc_uart_info[0] = !running_on_hw;
72
73 arc_uart_info[1] = arc_get_core_freq();
74
75 arc_uart_info[2] = CONFIG_ARC_SERIAL_BAUD;
76
77#if defined(CONFIG_SERIAL_ARC_CONSOLE)
78 early_platform_add_devices(fpga_early_devs,
79 ARRAY_SIZE(fpga_early_devs));
80
81 /*
82 * ARC console driver registers (build time) as an early platform driver
83 * of class "earlyprintk". However it needs explicit cmdline toggle
84 * "earlyprintk=ttyARC0" to be successfuly runtime registered.
85 * Otherwise the early probe below fails to find the driver
86 */
87 early_platform_driver_probe("earlyprintk", 1, 0);
88
89 /*
90 * This is to make sure that arc uart would be preferred console
91 * despite one/more of following:
92 * -command line lacked "console=ttyARC0" or
93 * -CONFIG_VT_CONSOLE was enabled (for no reason whatsoever)
94 * Note that this needs to be done after above early console is reg,
95 * otherwise the early console never gets a chance to run.
96 */
97 add_preferred_console("ttyARC", 0, "115200");
98#endif /* CONFIG_SERIAL_ARC_CONSOLE */
99}
100#else /* !IS_ENABLED(CONFIG_SERIAL_ARC) */
101static void arc_fpga_serial_init(void)
102{
103}
104#endif
105
106static void __init plat_fpga_early_init(void) 25static void __init plat_fpga_early_init(void)
107{ 26{
108 pr_info("[plat-arcfpga]: registering early dev resources\n"); 27 pr_info("[plat-arcfpga]: registering early dev resources\n");
109 28
110 arc_fpga_serial_init();
111
112#ifdef CONFIG_ISS_SMP_EXTN 29#ifdef CONFIG_ISS_SMP_EXTN
113 iss_model_init_early_smp(); 30 iss_model_init_early_smp();
114#endif 31#endif
115} 32}
116 33
117static struct of_dev_auxdata plat_auxdata_lookup[] __initdata = {
118#if IS_ENABLED(CONFIG_SERIAL_ARC)
119 OF_DEV_AUXDATA("snps,arc-uart", UART0_BASE, "arc-uart", arc_uart_info),
120#endif
121 {}
122};
123
124static void __init plat_fpga_populate_dev(void) 34static void __init plat_fpga_populate_dev(void)
125{ 35{
126 pr_info("[plat-arcfpga]: registering device resources\n");
127
128 /* 36 /*
129 * Traverses flattened DeviceTree - registering platform devices 37 * Traverses flattened DeviceTree - registering platform devices
130 * complete with their resources 38 * (if any) complete with their resources
131 */ 39 */
132 of_platform_populate(NULL, of_default_bus_match_table, 40 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
133 plat_auxdata_lookup, NULL);
134} 41}
135 42
136/*----------------------- Machine Descriptions ------------------------------ 43/*----------------------- Machine Descriptions ------------------------------