summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/spcr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/spcr.c')
-rw-r--r--drivers/acpi/spcr.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
index 4ac3e06b41d8..98aa8c808a33 100644
--- a/drivers/acpi/spcr.c
+++ b/drivers/acpi/spcr.c
@@ -17,6 +17,16 @@
17#include <linux/serial_core.h> 17#include <linux/serial_core.h>
18 18
19/* 19/*
20 * Erratum 44 for QDF2432v1 and QDF2400v1 SoCs describes the BUSY bit as
21 * occasionally getting stuck as 1. To avoid the potential for a hang, check
22 * TXFE == 0 instead of BUSY == 1. This may not be suitable for all UART
23 * implementations, so only do so if an affected platform is detected in
24 * parse_spcr().
25 */
26bool qdf2400_e44_present;
27EXPORT_SYMBOL(qdf2400_e44_present);
28
29/*
20 * Some Qualcomm Datacenter Technologies SoCs have a defective UART BUSY bit. 30 * Some Qualcomm Datacenter Technologies SoCs have a defective UART BUSY bit.
21 * Detect them by examining the OEM fields in the SPCR header, similiar to PCI 31 * Detect them by examining the OEM fields in the SPCR header, similiar to PCI
22 * quirk detection in pci_mcfg.c. 32 * quirk detection in pci_mcfg.c.
@@ -147,8 +157,30 @@ int __init parse_spcr(bool earlycon)
147 goto done; 157 goto done;
148 } 158 }
149 159
150 if (qdf2400_erratum_44_present(&table->header)) 160 /*
151 uart = "qdf2400_e44"; 161 * If the E44 erratum is required, then we need to tell the pl011
162 * driver to implement the work-around.
163 *
164 * The global variable is used by the probe function when it
165 * creates the UARTs, whether or not they're used as a console.
166 *
167 * If the user specifies "traditional" earlycon, the qdf2400_e44
168 * console name matches the EARLYCON_DECLARE() statement, and
169 * SPCR is not used. Parameter "earlycon" is false.
170 *
171 * If the user specifies "SPCR" earlycon, then we need to update
172 * the console name so that it also says "qdf2400_e44". Parameter
173 * "earlycon" is true.
174 *
175 * For consistency, if we change the console name, then we do it
176 * for everyone, not just earlycon.
177 */
178 if (qdf2400_erratum_44_present(&table->header)) {
179 qdf2400_e44_present = true;
180 if (earlycon)
181 uart = "qdf2400_e44";
182 }
183
152 if (xgene_8250_erratum_present(table)) 184 if (xgene_8250_erratum_present(table))
153 iotype = "mmio32"; 185 iotype = "mmio32";
154 186