From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A139C4332F for ; Wed, 19 Oct 2022 15:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232243AbiJSPL2 (ORCPT ); Wed, 19 Oct 2022 11:11:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232195AbiJSPK7 (ORCPT ); Wed, 19 Oct 2022 11:10:59 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66A5892F6F; Wed, 19 Oct 2022 08:04:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666191854; x=1697727854; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jBd+m75aH3eu6jFU/XbmoI0uYN2YkZ1EVWvqGphS/uY=; b=HSrEybaJ7ZqxbuRbKCc9hcgpIHyQrHoLNBhHKxP9xcfxn8lR4PDA7iOo 20eySBXuhezJrMywdGVVmd1Gm0I/bQszYXBmXesBge792pyVLf57IXfwS Qk/nFD4UubUY76g1tr+j5xnICaC0tCoSnP40n9lGT/JFgIUpZG5APLxqt t4CVkf4I60ezpKpxqNHPncOe/toh/2quHaOFggJ7kwMAlOjNC8hyX1PFw U7j4mFN4T1I6FtvZUJlpY0e1MrO5IM5or7YmIpXpcQNdI9hsKZODh6hZS LifUSK4h23XI7YKUoEkVL6nf6UoHLdJrfFkRs2bW+vP+V6B7MkYlGlCRq A==; X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="306425600" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="306425600" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 08:04:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="771826788" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="771826788" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 19 Oct 2022 08:04:12 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 78BA113F; Wed, 19 Oct 2022 18:04:33 +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 v2 0/5] spi: pxa2xx: Pass the SSP type via device property Date: Wed, 19 Oct 2022 18:04:25 +0300 Message-Id: <20221019150430.27142-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Currently the SPI PXA2xx devices on Intel platforms can be instantiated via the following paths: 1) as ACPI LPSS device on Haswell, Bay Trail and Cherry Trail 2) as ACPI LPSS device on the Sky Lake and newer 3) as PCI LPSS device on Haswell, Bay Trail and Cherry Trail 4) as PCI LPSS device on the Sky Lake and newer 5) as PCI device via ID table Each of this case provides some platform related data differently, i.e.: 1) via drivers/acpi/acpi_lpss.c and drivers/spi/spi-pxa2xx.c; 2) via drivers/mfd/intel-lpss-acpi.c; 3) via drivers/spi/spi-pxa2xx-pci.c; 4) via drivers/mfd/intel-lpss-pci.c and drivers/spi/spi-pxa2xx.c; 5) via drivers/spi/spi-pxa2xx-pci.c; This approach has two downsides: a) there is no data propagated in the case #2 because we can't have two or more drivers to match the same ACPI ID and hence some cases are still not supported (Sky Lake and Cannon Lake ACPI enabled LPSS); a) the data is duplicated over two drivers in case #4 and, besides to be a bloatware, it is error prone (e.g. Lakefield has a wrong data right now due to missed PCI entry in the spi-pxa2xx.c); This series fixes the downsides, and enables previously unsupported cases. On top of that it has a coupole of cleanups (patches 4 and 5). Changelog v2: - added cover letter (Mark) - dropped applied patch Andy Shevchenko (5): spi: pxa2xx: Respect Intel SSP type given by a property spi: pxa2xx: Remove no more needed PCI ID table spi: pxa2xx: Remove no more needed driver data spi: pxa2xx: Move OF and ACPI ID tables closer to their user spi: pxa2xx: Switch from PM ifdeffery to pm_ptr() drivers/spi/spi-pxa2xx.c | 170 +++++++------------------------------ include/linux/pxa2xx_ssp.h | 1 + 2 files changed, 30 insertions(+), 141 deletions(-) -- 2.35.1 From mboxrd@z Thu Jan 1 00:00:00 1970 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 7F6B4C4332F for ; Wed, 19 Oct 2022 15:17:04 +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: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:In-Reply-To:References: List-Owner; bh=Iewm6mX8Wp73c1q+LjBidxjgQh5g1tiTup4LXamniEU=; b=tN+y2/qoDsMhfy 6ntsYWpMgfpmBgIK9l5kqgt37doxCURc5N+97nsrSPqFNBn/U2FxM/SKDtjTL6/nZ8J1TucF2c9Kv nIg2brvsLYFHu5YrG2orxWxphvjclWP6gnGsX+d9/UlNb1PYmiPjr+VkHi8/I1aMwIKejfZoU73V9 fNF00xZRmFQlWtlgTCLlQc7bVDVvmkdOqnlNCq+cD+bpamTOOZa4hciOQqGn3Bm9i+Lq6gWwcRnG3 OqLtHdLD40k8ohItxPdDDxejxV4QFrTlwaEkxH4nlDGDqPdnnfe+rC32LpXW81kKvB9W9CIg2Lq/t XkxbdElIjx9KrbNyJL3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olAnW-0038Yf-Uk; Wed, 19 Oct 2022 15:16:00 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olAcE-0030yD-Lu for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 15:04:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666191858; x=1697727858; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jBd+m75aH3eu6jFU/XbmoI0uYN2YkZ1EVWvqGphS/uY=; b=nzaBelxDkr0+cWX+OXVt88q8BGP/e6JL6IuQe+W9sv22199/RYHNL6FH ZvD411VFYUbOAc0ugFk2/CcQHCroxQomgs+qcbyTBzdLeB4qqVSHEZkdd C1o0abCVO1dGIPO/2NdOHeevUh/6olSDpyzuoNIePU6rBq9DAbbP8NllT GrJFND4XFb02KFn1bE+9AUnYpecEOi0ZvWfAhXwjbIWMuUywPuIc8oOlV rNDpYzZoIKgDJSa9QAvmjJhHbWJ/Zq10uYMVQymotYCFC6tdWxKobY/I5 SLI2of01Ieo4Osxi/167zVkkL5s/v+KUCnAXn/TIxKzL4JI8cHJ55Ymbv A==; X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="306425599" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="306425599" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 08:04:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="771826788" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="771826788" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 19 Oct 2022 08:04:12 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 78BA113F; Wed, 19 Oct 2022 18:04:33 +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 v2 0/5] spi: pxa2xx: Pass the SSP type via device property Date: Wed, 19 Oct 2022 18:04:25 +0300 Message-Id: <20221019150430.27142-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_080418_770600_4B50012C X-CRM114-Status: GOOD ( 13.89 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently the SPI PXA2xx devices on Intel platforms can be instantiated via the following paths: 1) as ACPI LPSS device on Haswell, Bay Trail and Cherry Trail 2) as ACPI LPSS device on the Sky Lake and newer 3) as PCI LPSS device on Haswell, Bay Trail and Cherry Trail 4) as PCI LPSS device on the Sky Lake and newer 5) as PCI device via ID table Each of this case provides some platform related data differently, i.e.: 1) via drivers/acpi/acpi_lpss.c and drivers/spi/spi-pxa2xx.c; 2) via drivers/mfd/intel-lpss-acpi.c; 3) via drivers/spi/spi-pxa2xx-pci.c; 4) via drivers/mfd/intel-lpss-pci.c and drivers/spi/spi-pxa2xx.c; 5) via drivers/spi/spi-pxa2xx-pci.c; This approach has two downsides: a) there is no data propagated in the case #2 because we can't have two or more drivers to match the same ACPI ID and hence some cases are still not supported (Sky Lake and Cannon Lake ACPI enabled LPSS); a) the data is duplicated over two drivers in case #4 and, besides to be a bloatware, it is error prone (e.g. Lakefield has a wrong data right now due to missed PCI entry in the spi-pxa2xx.c); This series fixes the downsides, and enables previously unsupported cases. On top of that it has a coupole of cleanups (patches 4 and 5). Changelog v2: - added cover letter (Mark) - dropped applied patch Andy Shevchenko (5): spi: pxa2xx: Respect Intel SSP type given by a property spi: pxa2xx: Remove no more needed PCI ID table spi: pxa2xx: Remove no more needed driver data spi: pxa2xx: Move OF and ACPI ID tables closer to their user spi: pxa2xx: Switch from PM ifdeffery to pm_ptr() drivers/spi/spi-pxa2xx.c | 170 +++++++------------------------------ include/linux/pxa2xx_ssp.h | 1 + 2 files changed, 30 insertions(+), 141 deletions(-) -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel