diff options
Diffstat (limited to 'drivers/acpi/acpi_lpss.c')
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 357a0b8f860b..552010288135 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c | |||
@@ -75,6 +75,7 @@ struct lpss_device_desc { | |||
75 | const char *clk_con_id; | 75 | const char *clk_con_id; |
76 | unsigned int prv_offset; | 76 | unsigned int prv_offset; |
77 | size_t prv_size_override; | 77 | size_t prv_size_override; |
78 | struct property_entry *properties; | ||
78 | void (*setup)(struct lpss_private_data *pdata); | 79 | void (*setup)(struct lpss_private_data *pdata); |
79 | }; | 80 | }; |
80 | 81 | ||
@@ -163,11 +164,19 @@ static const struct lpss_device_desc lpt_i2c_dev_desc = { | |||
163 | .prv_offset = 0x800, | 164 | .prv_offset = 0x800, |
164 | }; | 165 | }; |
165 | 166 | ||
167 | static struct property_entry uart_properties[] = { | ||
168 | PROPERTY_ENTRY_U32("reg-io-width", 4), | ||
169 | PROPERTY_ENTRY_U32("reg-shift", 2), | ||
170 | PROPERTY_ENTRY_BOOL("snps,uart-16550-compatible"), | ||
171 | { }, | ||
172 | }; | ||
173 | |||
166 | static const struct lpss_device_desc lpt_uart_dev_desc = { | 174 | static const struct lpss_device_desc lpt_uart_dev_desc = { |
167 | .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR, | 175 | .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR, |
168 | .clk_con_id = "baudclk", | 176 | .clk_con_id = "baudclk", |
169 | .prv_offset = 0x800, | 177 | .prv_offset = 0x800, |
170 | .setup = lpss_uart_setup, | 178 | .setup = lpss_uart_setup, |
179 | .properties = uart_properties, | ||
171 | }; | 180 | }; |
172 | 181 | ||
173 | static const struct lpss_device_desc lpt_sdio_dev_desc = { | 182 | static const struct lpss_device_desc lpt_sdio_dev_desc = { |
@@ -189,6 +198,7 @@ static const struct lpss_device_desc byt_uart_dev_desc = { | |||
189 | .clk_con_id = "baudclk", | 198 | .clk_con_id = "baudclk", |
190 | .prv_offset = 0x800, | 199 | .prv_offset = 0x800, |
191 | .setup = lpss_uart_setup, | 200 | .setup = lpss_uart_setup, |
201 | .properties = uart_properties, | ||
192 | }; | 202 | }; |
193 | 203 | ||
194 | static const struct lpss_device_desc bsw_uart_dev_desc = { | 204 | static const struct lpss_device_desc bsw_uart_dev_desc = { |
@@ -197,6 +207,7 @@ static const struct lpss_device_desc bsw_uart_dev_desc = { | |||
197 | .clk_con_id = "baudclk", | 207 | .clk_con_id = "baudclk", |
198 | .prv_offset = 0x800, | 208 | .prv_offset = 0x800, |
199 | .setup = lpss_uart_setup, | 209 | .setup = lpss_uart_setup, |
210 | .properties = uart_properties, | ||
200 | }; | 211 | }; |
201 | 212 | ||
202 | static const struct lpss_device_desc byt_spi_dev_desc = { | 213 | static const struct lpss_device_desc byt_spi_dev_desc = { |
@@ -440,6 +451,12 @@ static int acpi_lpss_create_device(struct acpi_device *adev, | |||
440 | goto err_out; | 451 | goto err_out; |
441 | } | 452 | } |
442 | 453 | ||
454 | if (dev_desc->properties) { | ||
455 | ret = device_add_properties(&adev->dev, dev_desc->properties); | ||
456 | if (ret) | ||
457 | goto err_out; | ||
458 | } | ||
459 | |||
443 | adev->driver_data = pdata; | 460 | adev->driver_data = pdata; |
444 | pdev = acpi_create_platform_device(adev); | 461 | pdev = acpi_create_platform_device(adev); |
445 | if (!IS_ERR_OR_NULL(pdev)) { | 462 | if (!IS_ERR_OR_NULL(pdev)) { |