From patchwork Sat Feb 20 19:20:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Liddy X-Patchwork-Id: 8367841 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 93435C0553 for ; Sat, 20 Feb 2016 19:21:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3AAD204AB for ; Sat, 20 Feb 2016 19:21:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA7D7204EB for ; Sat, 20 Feb 2016 19:21:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752921AbcBTTVK (ORCPT ); Sat, 20 Feb 2016 14:21:10 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:33817 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559AbcBTTVI (ORCPT ); Sat, 20 Feb 2016 14:21:08 -0500 Received: by mail-wm0-f54.google.com with SMTP id b205so107941565wmb.1 for ; Sat, 20 Feb 2016 11:21:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=pUUisC2RXKdcrKjYmh0c+oTSrV48LAnPEhyK1+h22+0=; b=hnuWHlDfRvt0QDJ9fFChnZ953ag0BHDSZOIH2hfEgbI2/skeyVC3KvMYNkE4ykmk/W ikci5/Xr2EHtVpCPCX8UagD2aKaesZa7erXCkHqZNfF85XoJo5BkwOWw2DSWhVcYLkNJ gxzA9Vc/Vm+Hf1rdsucjrbGiqR8B7u4b5gV2Y8sNMAmlb3LcyLDVSDktYImpGF7vvPxI QhmnPFwmMB7ahkxCoWJkpRZERKgvQxg09ha9Qza+g3omLIAmJYMeZ0X3LYaHMXirvLDa dS+SMUebUhymfRIa02zspo2f0w5lzXgYL4sEcKwrddy+tW2Sd+UBxWOCegrKcfTswdk2 aqng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=pUUisC2RXKdcrKjYmh0c+oTSrV48LAnPEhyK1+h22+0=; b=ZHllNEDWU/53znuWnG/YL+2L756wfweNiqh1rKW0rQLV2dcGZOVxWkdbdwTrXuCQWm +FmGyJD1LLoGlVpHDqp10SYxiV5J4aOdvvSCYHxb45EhS3EJAmx7/7NfyBP0xDgBFhmo uGHs+Q42lC2DvCgXjFXC5UVtXKshjanNd8NqIlkqlAKN8HL9cUuDTG82R3AtE+OTudMs ahtRnIzCFL4hfpW7PgwKu2oUH4Pzksc/CC17TtxKkL+N/yUb+YCqsvyx60WmzkmiNNJg RRwrXWekPcVdSdM0o8GH2dYnAeMEB57VTXHWIDd+9jIFAVB2l2L5Js1uV45RsyKoXyNG wgRg== X-Gm-Message-State: AG10YOTOuqaNLY+A51+teBGADozsAjs98wt+b5ARn0uhx1VKPtrKhP9qTn5O17pxgFE0kQ== X-Received: by 10.28.212.9 with SMTP id l9mr4068344wmg.75.1455996065482; Sat, 20 Feb 2016 11:21:05 -0800 (PST) Received: from black.example.com ([2a02:8070:4b8:200:c460:3585:3391:f953]) by smtp.gmail.com with ESMTPSA id 77sm2800776wmp.18.2016.02.20.11.21.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Feb 2016 11:21:04 -0800 (PST) From: Leif Liddy To: broonie@kernel.org Cc: daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, linux-spi@vger.kernel.org, andriy.shevchenko@linux.intel.com, Leif Liddy Subject: [PATCH] spi: spi-pxa2xx-pci: Add ID and driver type for WildcatPoint PCH Date: Sat, 20 Feb 2016 20:20:22 +0100 Message-Id: <1455996022-19773-1-git-send-email-leif.liddy@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP WildcatPoint PCH as seen on MacBook 12-inch (Early 2015) has a PCI enabled SPI controller. Enable it by adding its ID to the corresponding driver. The ACPI enumerated name for this SPI controller (found in spi-pxa2xx.c) is INT33C1. Therefore, we associate the SPI controller with the corresponding type of LPSS_LPT_SSP. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=108331 Signed-off-by: Leif Liddy --- drivers/spi/spi-pxa2xx-pci.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c index d19d7f2..520ed1d 100644 --- a/drivers/spi/spi-pxa2xx-pci.c +++ b/drivers/spi/spi-pxa2xx-pci.c @@ -19,6 +19,7 @@ enum { PORT_BSW1, PORT_BSW2, PORT_QUARK_X1000, + PORT_LPT, }; struct pxa_spi_info { @@ -42,6 +43,9 @@ static struct dw_dma_slave bsw1_rx_param = { .src_id = 7 }; static struct dw_dma_slave bsw2_tx_param = { .dst_id = 8 }; static struct dw_dma_slave bsw2_rx_param = { .src_id = 9 }; +static struct dw_dma_slave lpt_tx_param = { .dst_id = 0 }; +static struct dw_dma_slave lpt_rx_param = { .src_id = 1 }; + static bool lpss_dma_filter(struct dma_chan *chan, void *param) { struct dw_dma_slave *dws = param; @@ -98,6 +102,14 @@ static struct pxa_spi_info spi_info_configs[] = { .num_chipselect = 1, .max_clk_rate = 50000000, }, + [PORT_LPT] = { + .type = LPSS_LPT_SSP, + .port_id = 0, + .num_chipselect = 1, + .max_clk_rate = 50000000, + .tx_param = &lpt_tx_param, + .rx_param = &lpt_rx_param, + }, }; static int pxa2xx_spi_pci_probe(struct pci_dev *dev, @@ -202,6 +214,7 @@ static const struct pci_device_id pxa2xx_spi_pci_devices[] = { { PCI_VDEVICE(INTEL, 0x228e), PORT_BSW0 }, { PCI_VDEVICE(INTEL, 0x2290), PORT_BSW1 }, { PCI_VDEVICE(INTEL, 0x22ac), PORT_BSW2 }, + { PCI_VDEVICE(INTEL, 0x9ce6), PORT_LPT }, { }, }; MODULE_DEVICE_TABLE(pci, pxa2xx_spi_pci_devices);