aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2013-04-10 09:58:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 16:20:19 -0400
commitaea02e87f6076f2a29d537829503e1344e92a3b8 (patch)
treee9f1181f9faa201c6ddca0bad1a89f4a0f9d00c1 /drivers/tty
parentffc3ae6dd925b6a89b2f4f993a732e3b866e6aa0 (diff)
serial: 8250_dw: Support clk framework also with ACPI
The Lynxpoint LPSS peripheral clocks are now handled in clk framework so the drivers do not need to take care of them manually. In dw8250_probe_acpi(), the uartclk is now taken from the driver_data only if it was not already set. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index d6aea85a9b14..de7a1869c82c 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -36,9 +36,6 @@
36#define DW_UART_CPR 0xf4 /* Component Parameter Register */ 36#define DW_UART_CPR 0xf4 /* Component Parameter Register */
37#define DW_UART_UCV 0xf8 /* UART Component Version */ 37#define DW_UART_UCV 0xf8 /* UART Component Version */
38 38
39/* Intel Low Power Subsystem specific */
40#define LPSS_PRV_CLOCK_PARAMS 0x800
41
42/* Component Parameter Register bits */ 39/* Component Parameter Register bits */
43#define DW_UART_CPR_ABP_DATA_WIDTH (3 << 0) 40#define DW_UART_CPR_ABP_DATA_WIDTH (3 << 0)
44#define DW_UART_CPR_AFCE_MODE (1 << 4) 41#define DW_UART_CPR_AFCE_MODE (1 << 4)
@@ -226,7 +223,6 @@ static int dw8250_probe_acpi(struct uart_port *p)
226{ 223{
227 const struct acpi_device_id *id; 224 const struct acpi_device_id *id;
228 acpi_status status; 225 acpi_status status;
229 u32 reg;
230 226
231 id = acpi_match_device(p->dev->driver->acpi_match_table, p->dev); 227 id = acpi_match_device(p->dev->driver->acpi_match_table, p->dev);
232 if (!id) 228 if (!id)
@@ -236,7 +232,9 @@ static int dw8250_probe_acpi(struct uart_port *p)
236 p->serial_in = dw8250_serial_in32; 232 p->serial_in = dw8250_serial_in32;
237 p->serial_out = dw8250_serial_out32; 233 p->serial_out = dw8250_serial_out32;
238 p->regshift = 2; 234 p->regshift = 2;
239 p->uartclk = (unsigned int)id->driver_data; 235
236 if (!p->uartclk)
237 p->uartclk = (unsigned int)id->driver_data;
240 238
241 status = acpi_walk_resources(ACPI_HANDLE(p->dev), METHOD_NAME__CRS, 239 status = acpi_walk_resources(ACPI_HANDLE(p->dev), METHOD_NAME__CRS,
242 dw8250_acpi_walk_resource, p); 240 dw8250_acpi_walk_resource, p);
@@ -246,12 +244,6 @@ static int dw8250_probe_acpi(struct uart_port *p)
246 return -ENODEV; 244 return -ENODEV;
247 } 245 }
248 246
249 /* Fix Haswell issue where the clocks do not get enabled */
250 if (!strcmp(id->id, "INT33C4") || !strcmp(id->id, "INT33C5")) {
251 reg = readl(p->membase + LPSS_PRV_CLOCK_PARAMS);
252 writel(reg | 1, p->membase + LPSS_PRV_CLOCK_PARAMS);
253 }
254
255 return 0; 247 return 0;
256} 248}
257#else 249#else
@@ -425,8 +417,8 @@ static const struct of_device_id dw8250_of_match[] = {
425MODULE_DEVICE_TABLE(of, dw8250_of_match); 417MODULE_DEVICE_TABLE(of, dw8250_of_match);
426 418
427static const struct acpi_device_id dw8250_acpi_match[] = { 419static const struct acpi_device_id dw8250_acpi_match[] = {
428 { "INT33C4", 100000000 }, 420 { "INT33C4", 0 },
429 { "INT33C5", 100000000 }, 421 { "INT33C5", 0 },
430 { }, 422 { },
431}; 423};
432MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match); 424MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);