From bbefd8f358b4833dbda69f2a5f308c960c54c21c Mon Sep 17 00:00:00 2001 From: Leonard Mai Date: Mon, 28 Nov 2011 09:39:58 -0800 Subject: [PATCH] mfd: add probing support for cloverview BZ: 15592 Cloverview SOC use different PCI Device ID for HS-UART hence existing HS-UART driver won't be successfully probed on Cloverview SOC. This patch adds HS-UART probing support for Cloverview SOC Change-Id: Ic6ee5b73239445b81758a7dac26b2c5121fb472e Signed-off-by: Leonard D Mai Tested-by: Siva Prasath Ponnusamy Reviewed-on: http://android.intel.com:8080/25452 Reviewed-by: Yang, Bin Reviewed-by: Gross, Mark Tested-by: Seibel, Eric Reviewed-by: buildbot Tested-by: buildbot --- drivers/tty/serial/mfd.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/mfd.c b/drivers/tty/serial/mfd.c index 7933d3b..53e753d 100644 --- a/drivers/tty/serial/mfd.c +++ b/drivers/tty/serial/mfd.c @@ -1555,15 +1555,19 @@ static int serial_hsu_probe(struct pci_dev *pdev, switch (pdev->device) { case 0x081B: + case 0x08FC: index = 0; break; case 0x081C: + case 0x08FD: index = 1; break; case 0x081D: + case 0x08FE: index = 2; break; case 0x081E: + case 0x08FF: /* internal DMA controller */ index = 3; break; @@ -1793,7 +1797,7 @@ static void serial_hsu_remove(struct pci_dev *pdev) return; /* For port 0/1/2, priv is the address of uart_hsu_port */ - if (pdev->device != 0x081E) { + if ((pdev->device != 0x081E) && (pdev->device != 0x08FF)) { up = priv; /* Moved cancel_work_sync call after up initialization */ cancel_work_sync(&up->qwork); @@ -1815,10 +1819,17 @@ static void serial_hsu_remove(struct pci_dev *pdev) /* First 3 are UART ports, and the 4th is the DMA */ static const struct pci_device_id pci_ids[] __devinitdata = { + /* Penwell support */ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081B) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081C) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081D) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081E) }, + + /* Cloverview support */ + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x08FC) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x08FD) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x08FE) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x08FF) }, {}, }; @@ -1933,7 +1944,7 @@ static int hsu_suspend_noirq(struct device *dev) struct uart_hsu_port *up; /* Make sure this is not the internal dma controller */ - if (priv && (pdev->device != 0x081E)) { + if (priv && (pdev->device != 0x081E) && (pdev->device != 0x08FF)) { up = priv; if (!allow_for_suspend(up)) return -EBUSY; @@ -1958,7 +1969,7 @@ static int hsu_suspend(struct device *dev) struct uart_hsu_port *up; /* Make sure this is not the internal dma controller */ - if (priv && (pdev->device != 0x081E)) { + if (priv && (pdev->device != 0x081E) && (pdev->device != 0x08FF)) { up = priv; if (query_q(up)) @@ -2006,7 +2017,7 @@ static int hsu_resume(struct device *dev) void *priv = pci_get_drvdata(pdev); struct uart_hsu_port *up; - if (priv && (pdev->device != 0x081E)) { + if (priv && (pdev->device != 0x081E) && (pdev->device != 0x08FF)) { up = priv; if (up->suspended) -- 2.7.4