From patchwork Thu Oct 20 16:26:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13013753 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64EBCC4332F for ; Thu, 20 Oct 2022 16:28:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+nLaSJGOPM/i7eJvtXecVoZcN/6ZFGIVoqw16X5Uk7Y=; b=CMvwPyic5IM4S+ Az2/hYuWBlaQfJahVpsptBPqPXlC0tOpaYqxH15AxES2xHJkVbNNQQRIJX7ffT9tJWZr3mOANxk6I coM0VE6VBBYkB1UffrKfdfw9KFLftp2ew58TQhZXsV4dFbn1/JnvZHtdeCZgk9xp5dtI5aFO+effj JnSvmttxJw3BCBs+RVfEMAlypvV5XQyTuq37u/Gw4+cG2PVD7ZDNsGMqaDmE2P997OBD0d3t3wXfg ufl5T+gtDQbsy3RV7fVu391QTxZgKEh5zTkvohzDiU976HVqmrb8IysHUJpVQ5knnx5MFDyWwaqcC 9cYiyVQkOM/svmtcIpXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYOg-000JtK-I0; Thu, 20 Oct 2022 16:27:55 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYN9-000J7v-8V for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 16:26:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666283179; x=1697819179; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hWe3aaoOgf+xq5Pq0douiTL3qv6/yUoCMHsfExvmaKw=; b=CVes5yyVdAecKa062UYyWEy2iPYGShy6PPJHSAmzT+WM5tFRpEOBH5xU hUuZ3YEjOt1u+Cl7pEAkCnMteZj1r2qITerGNs8AWjDi/LGIWeBHwbwwF CmihVOVMwFegj7+Sel5mf3lLWbZWjK6nOFY2lKIJ4cUmmNvPofumnB2RM 220gcfTqutfR6GcxNo47unzHQMBTv2OHpVsY2SNinIKwNA9HPftAJ+Cxp LRqwN4BP4Uw6fjlME+RlHXOy0gO8X5L5PI0TQMRj79trh/D/5DMIy2JYq qC7cJZIs2tG+D7v3cVD1VZPbGr3lVWCvTipuWeFlfV9ONt+VXpsasGfzY Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="286482341" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="286482341" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 09:26:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="581004361" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="581004361" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 20 Oct 2022 09:26:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B1D504FD; Thu, 20 Oct 2022 19:26:32 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown Subject: [PATCH v3 1/5] spi: pxa2xx: Respect Intel SSP type given by a property Date: Thu, 20 Oct 2022 19:26:27 +0300 Message-Id: <20221020162631.68914-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> References: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_092619_412407_4E458D33 X-CRM114-Status: GOOD ( 13.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Allow to set the Intel SSP type by reading the property. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 6 ++++++ include/linux/pxa2xx_ssp.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 03ed6d4a14cd..857732a54ca7 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1460,6 +1460,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) struct resource *res; struct pci_dev *pcidev = dev_is_pci(parent) ? to_pci_dev(parent) : NULL; const struct pci_device_id *pcidev_id = NULL; + u32 value = SSP_UNDEFINED; enum pxa_ssp_type type; const void *match; int status; @@ -1468,9 +1469,14 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) if (pcidev) pcidev_id = pci_match_id(pxa2xx_spi_pci_compound_match, pcidev); + /* Always try to read property */ + device_property_read_u32(&pdev->dev, "intel,spi-pxa2xx-type", &value); + match = device_get_match_data(&pdev->dev); if (match) type = (enum pxa_ssp_type)match; + else if (value > SSP_UNDEFINED && value < SSP_MAX) + type = (enum pxa_ssp_type)value; else if (pcidev_id) type = (enum pxa_ssp_type)pcidev_id->driver_data; else diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index a3fec2de512f..cd1973e6ac4b 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h @@ -229,6 +229,7 @@ enum pxa_ssp_type { LPSS_SPT_SSP, LPSS_BXT_SSP, LPSS_CNL_SSP, + SSP_MAX }; struct ssp_device { From patchwork Thu Oct 20 16:26:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13013758 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21681C4332F for ; Thu, 20 Oct 2022 16:33:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hdrnwXCMFe/jeDmqY03rUTNDMFHUk+5a/+HY6Hu0xmM=; b=R4ft6r2nOZPlFQ CVcm4KFKiGLCqmxUHYT/F85GPtt2ahTHKK5qOPPCAimdR401ScokKrLjmIH0GrsBNAE7wLHc0vEpq 58NZ4vCBoLfioq3hJFqGP3TxcHYdqrdl2MVnCB8c+rEjJxbDxtcM7BYSwU2im4FMM8RRdvtDhGaag A/x1t28MtGAnJ8nNVBzADl8O3Ps9IIqdAVecY0vLabkFzfQJWQmZ+4uDDOw+BbCw9zeXloSC0fmAm WSm9vMlpLX8BmwmhT+tkKhadWvi7yc4IX0MpgcVdHBBrAH1NFkTwG/t/5M4wwzISdjhrKHyTEH1QL d5xK0tIaHf4B/a1oyk/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYSI-000M8W-9y; Thu, 20 Oct 2022 16:31:40 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYNB-000J7y-64 for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 16:26:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666283181; x=1697819181; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tLH6McL/k+1AdtQX5dfk1xHgIg0bo2xOAuTSBmeqVyU=; b=AybxqwCRmFQ3wgUitXciYA8NM7OOQLlMZoAktl1dTvBJJlxPc6e6s6Se clkYK7nOcFkbZBW6wOKJiyc5hc/OaJDjHXtHbnPXNJAbQou2XOtfm0hQp qc9JX5+HErC4DOQiZTxXmSmYKV4tukH3Ubta+OPL8DNfZXSIY8YrL/tHa 173ridLYf7tI3fQaujSKotdMUwe6iFBnf64gYZIw7IbXzvH4LvrEWNrP8 SqSuE2//VGi4ttq8K/ztqTut3DMlhVFXeOm1KuAKhqXuOYBTdfHI85P5F dpOmva3Ls3R33WPCHxhX2EeD6+/dcBaQbPfU7n5XOQ/i7sNVDit5DmkkQ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="294157963" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="294157963" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 09:26:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="663149970" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="663149970" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 20 Oct 2022 09:26:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B78033F9; Thu, 20 Oct 2022 19:26:32 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown Subject: [PATCH v3 2/5] spi: pxa2xx: Remove no more needed PCI ID table Date: Thu, 20 Oct 2022 19:26:28 +0300 Message-Id: <20221020162631.68914-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> References: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_092621_340201_3699F5CC X-CRM114-Status: GOOD ( 19.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the PCI enumerated devices provide a property with SSP type, there is no more necessity to bear the copy of the ID table here. Remove it for good. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 117 +-------------------------------------- 1 file changed, 2 insertions(+), 115 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 857732a54ca7..1d36d055a9d6 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -1335,121 +1334,17 @@ static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match); #endif -/* - * PCI IDs of compound devices that integrate both host controller and private - * integrated DMA engine. Please note these are not used in module - * autoloading and probing in this module but matching the LPSS SSP type. - */ -static const struct pci_device_id pxa2xx_spi_pci_compound_match[] = { - /* SPT-LP */ - { PCI_VDEVICE(INTEL, 0x9d29), LPSS_SPT_SSP }, - { PCI_VDEVICE(INTEL, 0x9d2a), LPSS_SPT_SSP }, - /* SPT-H */ - { PCI_VDEVICE(INTEL, 0xa129), LPSS_SPT_SSP }, - { PCI_VDEVICE(INTEL, 0xa12a), LPSS_SPT_SSP }, - /* KBL-H */ - { PCI_VDEVICE(INTEL, 0xa2a9), LPSS_SPT_SSP }, - { PCI_VDEVICE(INTEL, 0xa2aa), LPSS_SPT_SSP }, - /* CML-V */ - { PCI_VDEVICE(INTEL, 0xa3a9), LPSS_SPT_SSP }, - { PCI_VDEVICE(INTEL, 0xa3aa), LPSS_SPT_SSP }, - /* BXT A-Step */ - { PCI_VDEVICE(INTEL, 0x0ac2), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x0ac4), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x0ac6), LPSS_BXT_SSP }, - /* BXT B-Step */ - { PCI_VDEVICE(INTEL, 0x1ac2), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x1ac4), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x1ac6), LPSS_BXT_SSP }, - /* GLK */ - { PCI_VDEVICE(INTEL, 0x31c2), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x31c4), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x31c6), LPSS_BXT_SSP }, - /* ICL-LP */ - { PCI_VDEVICE(INTEL, 0x34aa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x34ab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x34fb), LPSS_CNL_SSP }, - /* EHL */ - { PCI_VDEVICE(INTEL, 0x4b2a), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x4b2b), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x4b37), LPSS_BXT_SSP }, - /* JSL */ - { PCI_VDEVICE(INTEL, 0x4daa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x4dab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x4dfb), LPSS_CNL_SSP }, - /* TGL-H */ - { PCI_VDEVICE(INTEL, 0x43aa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x43ab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x43fb), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x43fd), LPSS_CNL_SSP }, - /* ADL-P */ - { PCI_VDEVICE(INTEL, 0x51aa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x51ab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x51fb), LPSS_CNL_SSP }, - /* ADL-M */ - { PCI_VDEVICE(INTEL, 0x54aa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x54ab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x54fb), LPSS_CNL_SSP }, - /* APL */ - { PCI_VDEVICE(INTEL, 0x5ac2), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x5ac4), LPSS_BXT_SSP }, - { PCI_VDEVICE(INTEL, 0x5ac6), LPSS_BXT_SSP }, - /* RPL-S */ - { PCI_VDEVICE(INTEL, 0x7a2a), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x7a2b), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x7a79), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x7a7b), LPSS_CNL_SSP }, - /* ADL-S */ - { PCI_VDEVICE(INTEL, 0x7aaa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x7aab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x7af9), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x7afb), LPSS_CNL_SSP }, - /* MTL-P */ - { PCI_VDEVICE(INTEL, 0x7e27), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x7e30), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x7e46), LPSS_CNL_SSP }, - /* CNL-LP */ - { PCI_VDEVICE(INTEL, 0x9daa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x9dab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x9dfb), LPSS_CNL_SSP }, - /* CNL-H */ - { PCI_VDEVICE(INTEL, 0xa32a), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0xa32b), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0xa37b), LPSS_CNL_SSP }, - /* CML-LP */ - { PCI_VDEVICE(INTEL, 0x02aa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x02ab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x02fb), LPSS_CNL_SSP }, - /* CML-H */ - { PCI_VDEVICE(INTEL, 0x06aa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x06ab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0x06fb), LPSS_CNL_SSP }, - /* TGL-LP */ - { PCI_VDEVICE(INTEL, 0xa0aa), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0xa0ab), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0xa0de), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0xa0df), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0xa0fb), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0xa0fd), LPSS_CNL_SSP }, - { PCI_VDEVICE(INTEL, 0xa0fe), LPSS_CNL_SSP }, - { }, -}; - static const struct of_device_id pxa2xx_spi_of_match[] = { { .compatible = "marvell,mmp2-ssp", .data = (void *)MMP2_SSP }, {}, }; MODULE_DEVICE_TABLE(of, pxa2xx_spi_of_match); -#ifdef CONFIG_PCI - static bool pxa2xx_spi_idma_filter(struct dma_chan *chan, void *param) { return param == chan->device->dev; } -#endif /* CONFIG_PCI */ - static struct pxa2xx_spi_controller * pxa2xx_spi_init_pdata(struct platform_device *pdev) { @@ -1458,17 +1353,12 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) struct device *parent = dev->parent; struct ssp_device *ssp; struct resource *res; - struct pci_dev *pcidev = dev_is_pci(parent) ? to_pci_dev(parent) : NULL; - const struct pci_device_id *pcidev_id = NULL; u32 value = SSP_UNDEFINED; enum pxa_ssp_type type; const void *match; int status; u64 uid; - if (pcidev) - pcidev_id = pci_match_id(pxa2xx_spi_pci_compound_match, pcidev); - /* Always try to read property */ device_property_read_u32(&pdev->dev, "intel,spi-pxa2xx-type", &value); @@ -1477,8 +1367,6 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) type = (enum pxa_ssp_type)match; else if (value > SSP_UNDEFINED && value < SSP_MAX) type = (enum pxa_ssp_type)value; - else if (pcidev_id) - type = (enum pxa_ssp_type)pcidev_id->driver_data; else return ERR_PTR(-EINVAL); @@ -1494,13 +1382,12 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) ssp->phys_base = res->start; -#ifdef CONFIG_PCI - if (pcidev_id) { + /* Platforms with iDMA 64-bit */ + if (platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpss_priv")) { pdata->tx_param = parent; pdata->rx_param = parent; pdata->dma_filter = pxa2xx_spi_idma_filter; } -#endif ssp->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(ssp->clk)) From patchwork Thu Oct 20 16:26:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13013754 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A024C4332F for ; Thu, 20 Oct 2022 16:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tNuoN3IymK/YTRGpHfwFictroLbMTkCkb9AjH7sD9lU=; b=qLwErrNPVJjfH1 vPY3w6v9i4Li3BS0NwlfVQS1JD3PFKjv3Vpjs/cDoBkPi/sFwXcMXo+QRZ3SawwqrYBaS32usangD jdGjZW0nqV1rvZqfJ3/aMETGT5AHuBUblYuiy4pgIAo5sNDyge+ISsogFO0Ye6vYUJ4R23xqAf4uc DSg0/W9LcCsMS9F9U50DdtzyIIVGjuZgqnh1OOBvwONBEPoo3+pDR0NPcH523F8VQkjxhy1qXDYGH 9BsNCONK0GvYFsI8Dn0zCSXhCpsiydu0WKs0SH/fogwNaz7cuoKtq6QVhrT14ObWSRDBoEWHl4Y2F KDIRwlEkPeNmyZnWr9Mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYPW-000KOE-RA; Thu, 20 Oct 2022 16:28:46 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYN9-000J7y-8g for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 16:26:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666283179; x=1697819179; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7hGgSA2GsBhzJwzVfaWPKJQVLq/322V9p+NlpEwW/lY=; b=Ri236kVld4uiRzayOTPXhG5goqysULvta9/codl3mRl9KZjQhwn/Etht zAMDySNuH6R1SKyC80FKpVY3AJEpvkMmYmLqQQI2scM0B41pCicewYv3n 5cIcO1Ij0hspwj3T7E+6rfLBkezRoI8n+/7gcfbRKRflqiHJfNJJEtQ3p 9LCEJivrS5fu4KcdxwtCg8pigYtjMdFAEphhhvQbelOCjr+nryJ3Jx/Ng Kt9onOnSCPsUAeyEgdX/bInZik8QXXbd2rBkMtmG2tY1m5N+wQkgK9HfV 5+wpfGdZi3ydMwQBM8w1PzMic/YWsSbeLI51083QAEhRC05Ych/VTbM43 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="294157960" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="294157960" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 09:26:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="663149971" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="663149971" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 20 Oct 2022 09:26:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id BD58E107; Thu, 20 Oct 2022 19:26:32 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown Subject: [PATCH v3 3/5] spi: pxa2xx: Remove no more needed driver data Date: Thu, 20 Oct 2022 19:26:29 +0300 Message-Id: <20221020162631.68914-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> References: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_092619_404769_A179E203 X-CRM114-Status: GOOD ( 14.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the ACPI enumerated devices provide a property with SSP type, there is no more necessity to bear the copy of them in the ID table. Drop the driver data in ACPI ID table. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 1d36d055a9d6..31927493eeb0 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1323,12 +1323,12 @@ static void cleanup(struct spi_device *spi) #ifdef CONFIG_ACPI static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { - { "INT33C0", LPSS_LPT_SSP }, - { "INT33C1", LPSS_LPT_SSP }, - { "INT3430", LPSS_LPT_SSP }, - { "INT3431", LPSS_LPT_SSP }, - { "80860F0E", LPSS_BYT_SSP }, - { "8086228E", LPSS_BSW_SSP }, + { "INT33C0" }, + { "INT33C1" }, + { "INT3430" }, + { "INT3431" }, + { "80860F0E" }, + { "8086228E" }, { }, }; MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match); From patchwork Thu Oct 20 16:26:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13013755 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F3EDC433FE for ; Thu, 20 Oct 2022 16:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2HJdfb65wj+zQlsFIwVfYEzSLqnRAeeJ/b0vQb0XuAM=; b=TxqmGGyhpnlUVD JmtPAHpVEbpfupfE4ufOx2R0/qm7+CaOOBPhpze7lczOcmPoM60L81uiI1HIOGMMA3LpMedYg2Ltm iLczOUUs0e6qyvayoUr6emPXsL8QT8sbHR9qX2njc1wIQ43mlJp1/wPOKzp0G4RgH5pQcnj6dHYvo FugyD5NrLmUtZtsfyXL4PJAhQxW8BpauANAI/DPrWFrX6SdjNnaFtazA3IyG26TgUJOlK7JZBhvN7 v/78RiM04tFcZUvwi4t62bM5fdbkrKgNMe7BthkhU0iglM7V3asZzPPp1eIogfmeN/BquVhpLymAA uhTsb8DCUhZ+XjicKp1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYQH-000Koq-1J; Thu, 20 Oct 2022 16:29:33 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYNB-000J9b-2M for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 16:26:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666283181; x=1697819181; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cfcsEqumavJluV35nSU7Tp0DTMNCGeUslHFIyDpA79w=; b=PWCk8wTv2B6eup5aCw42JArClTpkK75iA5tOwnm/BFo2n/IAkQoXGygg XLjIa3JwLTT0UOinu8bwzl69kezoGrIg7XW49XzcIMPthMyoeikQUSvKN OyUj+C9XLNXCVljcUs2658KcRjJ3R++u5HijO+zkXyRGVreyO56jJ/Sxp ZkTqHuXgIts0ixOmr9OB635fuYssDTDLINVpzp79MUD4m+Fvy8yCFNg/9 d0wpoUZMyxNmts6kYrNs/JKOaZLHtpRypZHM1+Qe9m2FQdvSAO8QC5B+k c5jZtI7Fk8/DhQzJAuqKvdQVvwNEaEdW8wKKnBE1QgeEaLHBTQDAccyUY g==; X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="286482344" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="286482344" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 09:26:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="581004360" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="581004360" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 20 Oct 2022 09:26:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id CD6346DC; Thu, 20 Oct 2022 19:26:32 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown , Jonathan Cameron Subject: [PATCH v3 4/5] spi: pxa2xx: Move OF and ACPI ID tables closer to their user Date: Thu, 20 Oct 2022 19:26:30 +0300 Message-Id: <20221020162631.68914-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> References: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_092621_157721_CD7271DE X-CRM114-Status: GOOD ( 14.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is no code that uses ID tables directly, except the struct device_driver at the end of the file. Hence, move tables closer to its user. It's always possible to access them via pointer to a platform device. Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Cameron --- drivers/spi/spi-pxa2xx.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 31927493eeb0..76046612466d 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1321,25 +1321,6 @@ static void cleanup(struct spi_device *spi) kfree(chip); } -#ifdef CONFIG_ACPI -static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { - { "INT33C0" }, - { "INT33C1" }, - { "INT3430" }, - { "INT3431" }, - { "80860F0E" }, - { "8086228E" }, - { }, -}; -MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match); -#endif - -static const struct of_device_id pxa2xx_spi_of_match[] = { - { .compatible = "marvell,mmp2-ssp", .data = (void *)MMP2_SSP }, - {}, -}; -MODULE_DEVICE_TABLE(of, pxa2xx_spi_of_match); - static bool pxa2xx_spi_idma_filter(struct dma_chan *chan, void *param) { return param == chan->device->dev; @@ -1759,6 +1740,25 @@ static const struct dev_pm_ops pxa2xx_spi_pm_ops = { pxa2xx_spi_runtime_resume, NULL) }; +#ifdef CONFIG_ACPI +static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { + { "80860F0E" }, + { "8086228E" }, + { "INT33C0" }, + { "INT33C1" }, + { "INT3430" }, + { "INT3431" }, + {} +}; +MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match); +#endif + +static const struct of_device_id pxa2xx_spi_of_match[] = { + { .compatible = "marvell,mmp2-ssp", .data = (void *)MMP2_SSP }, + {} +}; +MODULE_DEVICE_TABLE(of, pxa2xx_spi_of_match); + static struct platform_driver driver = { .driver = { .name = "pxa2xx-spi", From patchwork Thu Oct 20 16:26:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13013757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C327DC4332F for ; Thu, 20 Oct 2022 16:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Q/a14bHr4X4FZVCZQmbi12Fcn87/v3WZOK1w7OuOwGs=; b=m9ainScxcTfrs4 unLD3+NndU5ELzKYvqEVDLE/95dQRn/wSxPOTCrKKUFwX8toiIFMb/ZNtd0EuvSSIW0LT/Y8aVcay XBC06ZuoaBfn7EC3c1fEIOFrfA79xmA9fYOUYhDNqJTa7oYAEnADAi0Pnd0KgTlpSNM0h08ERkWWL 2WbJX5Ay1Y4el6THdnxKri2YbWIeNhqn9uLqPrNWAraZZOmCa9sV+E8HFOtEWoU0kmqfL35knyGGa +2KCCO+Z7RKSp69xukfgCCyeq/UDB1IQaDjV8we/AR0sH4kO5S+JeUK6h1Q7lnKadMRcnXgvgI0gc N2xbF5CjJq1faJujmjHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYR8-000LNb-DO; Thu, 20 Oct 2022 16:30:26 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYNB-000J7v-FL for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 16:26:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666283181; x=1697819181; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0AkAdKQ3EDQm469XbLB15BS+d5aKGhLhD/NPpezR/co=; b=JgD/1XJ9qcDuj7U3kWpOQ7I6cCKpwXssVqmYJ50/WeXrSNOALpXzp+b3 ZNhFCz43Ss0EgVe2MlanWI6hsyL0Mya6vu7UkE2CTKY21Tx7kl9Zn7yYS +11Tms/GUkj/sTAoeSB1s3KyZgo2AY1MmdCPTUW0lDoEiatQv2kkeaDFc 06EGE6kxhO+jZfTurrGYYl9kqMRWZ5IOuMqKVP6L03gAEuCoYZ4itq5BJ cRShA8nDQHBB2JCAkn310yK30y8ukPwXSFoClKr0R4LHx27c730IQAbIt MnW9O08zK0Kfsrd1nvAIf2QVjL2coP9t2ZLgf7MvKMKmk6h2keP6cKlvM g==; X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="286482365" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="286482365" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 09:26:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="581004389" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="581004389" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 20 Oct 2022 09:26:14 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D31EF6DA; Thu, 20 Oct 2022 19:26:32 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown , Jonathan Cameron Subject: [PATCH v3 5/5] spi: pxa2xx: Switch from PM ifdeffery to pm_ptr() Date: Thu, 20 Oct 2022 19:26:31 +0300 Message-Id: <20221020162631.68914-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> References: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_092621_597266_41B0212F X-CRM114-Status: GOOD ( 15.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Cleaning up the driver to use pm_ptr() macro instead of ifdeffery that makes it simpler and allows the compiler to remove those functions if built without CONFIG_PM and CONFIG_PM_SLEEP support. Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Cameron --- drivers/spi/spi-pxa2xx.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 76046612466d..60cab241200b 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1680,7 +1680,6 @@ static int pxa2xx_spi_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int pxa2xx_spi_suspend(struct device *dev) { struct driver_data *drv_data = dev_get_drvdata(dev); @@ -1715,9 +1714,7 @@ static int pxa2xx_spi_resume(struct device *dev) /* Start the queue running */ return spi_controller_resume(drv_data->controller); } -#endif -#ifdef CONFIG_PM static int pxa2xx_spi_runtime_suspend(struct device *dev) { struct driver_data *drv_data = dev_get_drvdata(dev); @@ -1732,12 +1729,10 @@ static int pxa2xx_spi_runtime_resume(struct device *dev) return clk_prepare_enable(drv_data->ssp->clk); } -#endif static const struct dev_pm_ops pxa2xx_spi_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(pxa2xx_spi_suspend, pxa2xx_spi_resume) - SET_RUNTIME_PM_OPS(pxa2xx_spi_runtime_suspend, - pxa2xx_spi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pxa2xx_spi_suspend, pxa2xx_spi_resume) + RUNTIME_PM_OPS(pxa2xx_spi_runtime_suspend, pxa2xx_spi_runtime_resume, NULL) }; #ifdef CONFIG_ACPI @@ -1762,7 +1757,7 @@ MODULE_DEVICE_TABLE(of, pxa2xx_spi_of_match); static struct platform_driver driver = { .driver = { .name = "pxa2xx-spi", - .pm = &pxa2xx_spi_pm_ops, + .pm = pm_ptr(&pxa2xx_spi_pm_ops), .acpi_match_table = ACPI_PTR(pxa2xx_spi_acpi_match), .of_match_table = of_match_ptr(pxa2xx_spi_of_match), },