[PATCH 3/8] intel_mid_ssp_spi: Implement the MRST quirk

From: Alan Cox
Date: Wed Feb 09 2011 - 05:36:57 EST


From: Alan Cox <alan@xxxxxxxxxxxxxxx>

This quirk simply changes the ID we use to find the DMA controller. Rename
the define and select a different ID IFF the MRST quirk is set

Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx>
---

drivers/spi/intel_mid_ssp_spi.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)


diff --git a/drivers/spi/intel_mid_ssp_spi.c b/drivers/spi/intel_mid_ssp_spi.c
index f201edd..a7548e7 100644
--- a/drivers/spi/intel_mid_ssp_spi.c
+++ b/drivers/spi/intel_mid_ssp_spi.c
@@ -35,7 +35,8 @@

#define DRIVER_NAME "intel_mid_ssp_spi"
#define PCI_DMAC_MAXDI 2047
-#define PCI_DMAC_ID 0x0827
+#define PCI_MDFL_DMAC_ID 0x0827
+#define PCI_MRST_DMAC_ID 0x0814
/* PM QoS define */
#define MIN_EXIT_LATENCY 20

@@ -463,15 +464,18 @@ static void intel_mid_ssp_spi_dma_init(struct driver_data *drv_data)
{
struct intel_mid_dma_slave *rxs, *txs;
dma_cap_mask_t mask;
+ u16 id = PCI_MDFL_DMAC_ID;

if (drv_data->dma_inited)
return;

- drv_data->dmac1 = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DMAC_ID,
+ if (drv_data->quirks & QUIRKS_PLATFORM_MRST)
+ id = PCI_MRST_DMAC_ID;
+
+ drv_data->dmac1 = pci_get_device(PCI_VENDOR_ID_INTEL, id,
NULL);
if (!drv_data->dmac1) {
- dev_warn(&drv_data->pdev->dev, "Can't find DMAC %x",
- PCI_DMAC_ID);
+ dev_warn(&drv_data->pdev->dev, "Can't find DMAC %x", id);
return;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/