Commit aea02e87 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Greg Kroah-Hartman

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: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ffc3ae6d
...@@ -36,9 +36,6 @@ ...@@ -36,9 +36,6 @@
#define DW_UART_CPR 0xf4 /* Component Parameter Register */ #define DW_UART_CPR 0xf4 /* Component Parameter Register */
#define DW_UART_UCV 0xf8 /* UART Component Version */ #define DW_UART_UCV 0xf8 /* UART Component Version */
/* Intel Low Power Subsystem specific */
#define LPSS_PRV_CLOCK_PARAMS 0x800
/* Component Parameter Register bits */ /* Component Parameter Register bits */
#define DW_UART_CPR_ABP_DATA_WIDTH (3 << 0) #define DW_UART_CPR_ABP_DATA_WIDTH (3 << 0)
#define DW_UART_CPR_AFCE_MODE (1 << 4) #define DW_UART_CPR_AFCE_MODE (1 << 4)
...@@ -226,7 +223,6 @@ static int dw8250_probe_acpi(struct uart_port *p) ...@@ -226,7 +223,6 @@ static int dw8250_probe_acpi(struct uart_port *p)
{ {
const struct acpi_device_id *id; const struct acpi_device_id *id;
acpi_status status; acpi_status status;
u32 reg;
id = acpi_match_device(p->dev->driver->acpi_match_table, p->dev); id = acpi_match_device(p->dev->driver->acpi_match_table, p->dev);
if (!id) if (!id)
...@@ -236,7 +232,9 @@ static int dw8250_probe_acpi(struct uart_port *p) ...@@ -236,7 +232,9 @@ static int dw8250_probe_acpi(struct uart_port *p)
p->serial_in = dw8250_serial_in32; p->serial_in = dw8250_serial_in32;
p->serial_out = dw8250_serial_out32; p->serial_out = dw8250_serial_out32;
p->regshift = 2; p->regshift = 2;
p->uartclk = (unsigned int)id->driver_data;
if (!p->uartclk)
p->uartclk = (unsigned int)id->driver_data;
status = acpi_walk_resources(ACPI_HANDLE(p->dev), METHOD_NAME__CRS, status = acpi_walk_resources(ACPI_HANDLE(p->dev), METHOD_NAME__CRS,
dw8250_acpi_walk_resource, p); dw8250_acpi_walk_resource, p);
...@@ -246,12 +244,6 @@ static int dw8250_probe_acpi(struct uart_port *p) ...@@ -246,12 +244,6 @@ static int dw8250_probe_acpi(struct uart_port *p)
return -ENODEV; return -ENODEV;
} }
/* Fix Haswell issue where the clocks do not get enabled */
if (!strcmp(id->id, "INT33C4") || !strcmp(id->id, "INT33C5")) {
reg = readl(p->membase + LPSS_PRV_CLOCK_PARAMS);
writel(reg | 1, p->membase + LPSS_PRV_CLOCK_PARAMS);
}
return 0; return 0;
} }
#else #else
...@@ -425,8 +417,8 @@ static const struct of_device_id dw8250_of_match[] = { ...@@ -425,8 +417,8 @@ static const struct of_device_id dw8250_of_match[] = {
MODULE_DEVICE_TABLE(of, dw8250_of_match); MODULE_DEVICE_TABLE(of, dw8250_of_match);
static const struct acpi_device_id dw8250_acpi_match[] = { static const struct acpi_device_id dw8250_acpi_match[] = {
{ "INT33C4", 100000000 }, { "INT33C4", 0 },
{ "INT33C5", 100000000 }, { "INT33C5", 0 },
{ }, { },
}; };
MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match); MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment