diff options
Diffstat (limited to 'drivers/spi/dw_spi_pci.c')
-rw-r--r-- | drivers/spi/dw_spi_pci.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/spi/dw_spi_pci.c b/drivers/spi/dw_spi_pci.c index 1f52755dc878..49ec3aa1219f 100644 --- a/drivers/spi/dw_spi_pci.c +++ b/drivers/spi/dw_spi_pci.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * mrst_spi_pci.c - PCI interface driver for DW SPI Core | 2 | * dw_spi_pci.c - PCI interface driver for DW SPI Core |
3 | * | 3 | * |
4 | * Copyright (c) 2009, Intel Corporation. | 4 | * Copyright (c) 2009, Intel Corporation. |
5 | * | 5 | * |
@@ -26,8 +26,8 @@ | |||
26 | #define DRIVER_NAME "dw_spi_pci" | 26 | #define DRIVER_NAME "dw_spi_pci" |
27 | 27 | ||
28 | struct dw_spi_pci { | 28 | struct dw_spi_pci { |
29 | struct pci_dev *pdev; | 29 | struct pci_dev *pdev; |
30 | struct dw_spi dws; | 30 | struct dw_spi dws; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | static int __devinit spi_pci_probe(struct pci_dev *pdev, | 33 | static int __devinit spi_pci_probe(struct pci_dev *pdev, |
@@ -72,9 +72,17 @@ static int __devinit spi_pci_probe(struct pci_dev *pdev, | |||
72 | dws->parent_dev = &pdev->dev; | 72 | dws->parent_dev = &pdev->dev; |
73 | dws->bus_num = 0; | 73 | dws->bus_num = 0; |
74 | dws->num_cs = 4; | 74 | dws->num_cs = 4; |
75 | dws->max_freq = 25000000; /* for Moorestwon */ | ||
76 | dws->irq = pdev->irq; | 75 | dws->irq = pdev->irq; |
77 | dws->fifo_len = 40; /* FIFO has 40 words buffer */ | 76 | |
77 | /* | ||
78 | * Specific handling for Intel MID paltforms, like dma setup, | ||
79 | * clock rate, FIFO depth. | ||
80 | */ | ||
81 | if (pdev->device == 0x0800) { | ||
82 | ret = dw_spi_mid_init(dws); | ||
83 | if (ret) | ||
84 | goto err_unmap; | ||
85 | } | ||
78 | 86 | ||
79 | ret = dw_spi_add_host(dws); | 87 | ret = dw_spi_add_host(dws); |
80 | if (ret) | 88 | if (ret) |
@@ -140,7 +148,7 @@ static int spi_resume(struct pci_dev *pdev) | |||
140 | #endif | 148 | #endif |
141 | 149 | ||
142 | static const struct pci_device_id pci_ids[] __devinitdata = { | 150 | static const struct pci_device_id pci_ids[] __devinitdata = { |
143 | /* Intel Moorestown platform SPI controller 0 */ | 151 | /* Intel MID platform SPI controller 0 */ |
144 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0800) }, | 152 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0800) }, |
145 | {}, | 153 | {}, |
146 | }; | 154 | }; |