2121#include <linux/pm_domain.h>
2222#include <linux/pm_runtime.h>
2323#include <linux/pwm.h>
24+ #include <linux/pxa2xx_ssp.h>
2425#include <linux/suspend.h>
2526#include <linux/delay.h>
2627
@@ -219,10 +220,16 @@ static void bsw_pwm_setup(struct lpss_private_data *pdata)
219220 pwm_add_table (bsw_pwm_lookup , ARRAY_SIZE (bsw_pwm_lookup ));
220221}
221222
222- static const struct lpss_device_desc lpt_dev_desc = {
223+ static const struct property_entry lpt_spi_properties [] = {
224+ PROPERTY_ENTRY_U32 ("intel,spi-pxa2xx-type" , LPSS_LPT_SSP ),
225+ { }
226+ };
227+
228+ static const struct lpss_device_desc lpt_spi_dev_desc = {
223229 .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR
224230 | LPSS_SAVE_CTX ,
225231 .prv_offset = 0x800 ,
232+ .properties = lpt_spi_properties ,
226233};
227234
228235static const struct lpss_device_desc lpt_i2c_dev_desc = {
@@ -282,9 +289,15 @@ static const struct lpss_device_desc bsw_uart_dev_desc = {
282289 .properties = uart_properties ,
283290};
284291
292+ static const struct property_entry byt_spi_properties [] = {
293+ PROPERTY_ENTRY_U32 ("intel,spi-pxa2xx-type" , LPSS_BYT_SSP ),
294+ { }
295+ };
296+
285297static const struct lpss_device_desc byt_spi_dev_desc = {
286298 .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX ,
287299 .prv_offset = 0x400 ,
300+ .properties = byt_spi_properties ,
288301};
289302
290303static const struct lpss_device_desc byt_sdio_dev_desc = {
@@ -305,11 +318,17 @@ static const struct lpss_device_desc bsw_i2c_dev_desc = {
305318 .resume_from_noirq = true,
306319};
307320
321+ static const struct property_entry bsw_spi_properties [] = {
322+ PROPERTY_ENTRY_U32 ("intel,spi-pxa2xx-type" , LPSS_BSW_SSP ),
323+ { }
324+ };
325+
308326static const struct lpss_device_desc bsw_spi_dev_desc = {
309327 .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX
310328 | LPSS_NO_D3_DELAY ,
311329 .prv_offset = 0x400 ,
312330 .setup = lpss_deassert_reset ,
331+ .properties = bsw_spi_properties ,
313332};
314333
315334static const struct x86_cpu_id lpss_cpu_ids [] = {
@@ -329,8 +348,8 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
329348 { "INTL9C60" , LPSS_ADDR (lpss_dma_desc ) },
330349
331350 /* Lynxpoint LPSS devices */
332- { "INT33C0" , LPSS_ADDR (lpt_dev_desc ) },
333- { "INT33C1" , LPSS_ADDR (lpt_dev_desc ) },
351+ { "INT33C0" , LPSS_ADDR (lpt_spi_dev_desc ) },
352+ { "INT33C1" , LPSS_ADDR (lpt_spi_dev_desc ) },
334353 { "INT33C2" , LPSS_ADDR (lpt_i2c_dev_desc ) },
335354 { "INT33C3" , LPSS_ADDR (lpt_i2c_dev_desc ) },
336355 { "INT33C4" , LPSS_ADDR (lpt_uart_dev_desc ) },
@@ -356,8 +375,8 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
356375 { "808622C1" , LPSS_ADDR (bsw_i2c_dev_desc ) },
357376
358377 /* Broadwell LPSS devices */
359- { "INT3430" , LPSS_ADDR (lpt_dev_desc ) },
360- { "INT3431" , LPSS_ADDR (lpt_dev_desc ) },
378+ { "INT3430" , LPSS_ADDR (lpt_spi_dev_desc ) },
379+ { "INT3431" , LPSS_ADDR (lpt_spi_dev_desc ) },
361380 { "INT3432" , LPSS_ADDR (lpt_i2c_dev_desc ) },
362381 { "INT3433" , LPSS_ADDR (lpt_i2c_dev_desc ) },
363382 { "INT3434" , LPSS_ADDR (lpt_uart_dev_desc ) },
@@ -366,7 +385,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
366385 { "INT3437" , },
367386
368387 /* Wildcat Point LPSS devices */
369- { "INT3438" , LPSS_ADDR (lpt_dev_desc ) },
388+ { "INT3438" , LPSS_ADDR (lpt_spi_dev_desc ) },
370389
371390 { }
372391};
0 commit comments