From patchwork Thu Mar 7 17:03:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13586054 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 83EA0C54E49 for ; Thu, 7 Mar 2024 17:05:12 +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=xymcifMXudIEm+Wk8E53zZkTolBjUPVCqETYmzz9WMY=; b=pQ+2x9OSYlQCjT 3zpFaswqVdT6nZsSTyimMxRvCh+6kN4nufJVh8HtQxNZimKE4t3Ng2xGbpK/hR/FgvuubuHuxkO0K PHHM2VlB58K30yvS8AGRhJGtIN3PDeKI/HoWejHJV7lbBcbq7Nf6+TWTcjIDN8imSnZW2kf5PG5X6 UPpmbpXY3hESgNDlqMABpBKnCOiiMKygW3kIJHEVKOAATIFtOfTpzVtox0VdMKn6WNuCEX1/Nooiq cLCjsf2frWCsIV/LgqrBXazmftkRAyDgC2aXmsWowUyh0Zg4/Chr1cAMPJgxu/ULX/Oi6aN1K84sM PiyZyo9pD/uOgq332xYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riHAu-00000005bsJ-2cPC; Thu, 07 Mar 2024 17:04:56 +0000 Received: from mgamail.intel.com ([198.175.65.20]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riHAo-00000005bpY-0Jed for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 17:04:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709831090; x=1741367090; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vqUkO8TtEYU+TZ1zaI0tn3WCnsWhPGw/MLt7JIPaVqM=; b=gnI7dnRPwAoRYJpH4rmK4PlEoEYlPVRZ4h9AW32oN2vs8pewY56V5kVA 6VPJrq/iOfoQ0JDnYIEBDoZf54ZXBNQqkfsMdHYvIA7ddESqvBm6SWLSs 2NK7bxm9mAzbg/rHg5OAxmpFcPnkXQUvfeh+KnIb4c22hrOcKvxhlJpb1 5Wtu97+JDOnm0nPtK3+FtbP2O1UoeLy63B8JMuoXmG97hQNVwPhgF9hIr Rrr7Y40DpbaXjzz0EM3Pml3AgGhuNmP4O7B0njig/bvzyS5OeQWjvtPHX 4cxx15HnsORzN6q27JyFcd4/zQiCKcESqMGF6mQn0B2fF+9l9L98+HtBZ A==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4392408" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="4392408" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 09:04:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="937046411" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="937046411" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 09:04:43 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 670D093; Thu, 7 Mar 2024 19:04:42 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Mark Brown Subject: [PATCH v2 1/3] spi: pxa2xx: Kill pxa2xx_set_spi_info() Date: Thu, 7 Mar 2024 19:03:15 +0200 Message-ID: <20240307170441.3884452-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240307170441.3884452-1-andriy.shevchenko@linux.intel.com> References: <20240307170441.3884452-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-20240307_090450_279212_D26BA1B8 X-CRM114-Status: GOOD ( 19.04 ) 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 the only one user of the pxa2xx_set_spi_info(). Unexport it and inline to the actual user. Signed-off-by: Andy Shevchenko --- arch/arm/mach-pxa/devices.c | 18 ------------------ arch/arm/mach-pxa/spitz.c | 14 +++++++++++++- include/linux/spi/pxa2xx_spi.h | 8 -------- 3 files changed, 13 insertions(+), 27 deletions(-) diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 661b3fc43275..1e4cd502340e 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -665,23 +664,6 @@ struct platform_device pxa27x_device_gpio = { .resource = pxa_resource_gpio, }; -/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1. - * See comment in arch/arm/mach-pxa/ssp.c::ssp_probe() */ -void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_controller *info) -{ - struct platform_device *pd; - - pd = platform_device_alloc("pxa2xx-spi", id); - if (pd == NULL) { - printk(KERN_ERR "pxa2xx-spi: failed to allocate device id %d\n", - id); - return; - } - - pd->dev.platform_data = info; - platform_device_add(pd); -} - static struct resource pxa_dma_resource[] = { [0] = { .start = 0x40000000, diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index cc691b199429..be7a3574e951 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -585,6 +585,9 @@ static struct gpiod_lookup_table spitz_spi_gpio_table = { static void __init spitz_spi_init(void) { + struct platform_device *pd; + int id = 2; + if (machine_is_akita()) gpiod_add_lookup_table(&akita_lcdcon_gpio_table); else @@ -592,7 +595,16 @@ static void __init spitz_spi_init(void) gpiod_add_lookup_table(&spitz_ads7846_gpio_table); gpiod_add_lookup_table(&spitz_spi_gpio_table); - pxa2xx_set_spi_info(2, &spitz_spi_info); + + /* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1 */ + pd = platform_device_alloc("pxa2xx-spi", id); + if (pd == NULL) { + pr_err("pxa2xx-spi: failed to allocate device id %d\n", id); + } else { + pd->dev.platform_data = info; + platform_device_add(pd); + } + spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); } #else diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h index ca2cd4e30ead..56aba2f737b1 100644 --- a/include/linux/spi/pxa2xx_spi.h +++ b/include/linux/spi/pxa2xx_spi.h @@ -45,12 +45,4 @@ struct pxa2xx_spi_chip { u32 timeout; }; -#if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP) - -#include - -extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_controller *info); - -#endif - #endif /* __LINUX_SPI_PXA2XX_SPI_H */ From patchwork Thu Mar 7 17:03:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13586052 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 AD431C54798 for ; Thu, 7 Mar 2024 17:05:07 +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=p505XcUljcTQ4jAfu7+ssjxQ2XR/VsXdawM7ohD3gpg=; b=tU2ZSt83yF/87C 1ajjqLl4d5w9wTT2UCOIjNBaHEwrLJx/ddP5bhcmNCOWoU2jTSVvwe2qzSDOUPZwHQ8kvdnsuuzxp eWS/0UhN7gBvsX90IhIKzSvGD6Bqa6cFmtOl+YuCZyIsMEjtzC76tieHb/DBAx4GYdvnQo0uUEBol k+V4016M/wPU82dlhg7nJriIFq4+iX2cvSkO+ckiwG/iL9X+aDZx6YuyGwiahloU+FXS62gJ5uvi/ T580KEiFV7MgErijhNlrUTxAWo8GYL4RsHKc71BFRr+H9XGeTrpL4Xfinnh8a7iH9AIqhgF/jr7sm zn8Qg0NA5CmZCRc/HFpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riHAv-00000005bse-1Lh5; Thu, 07 Mar 2024 17:04:57 +0000 Received: from mgamail.intel.com ([198.175.65.20]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riHAo-00000005bqH-0zYv for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 17:04:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709831090; x=1741367090; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cv+rxy5QtxrIBZi0IThzTINv+rwro5NUmSO5y8zDSgA=; b=FHzFWdm/vNREdZgG0ygjjiftLmRcxyV7tdvbFacKlJNXozwNIa7UwBLQ VwY66bpc7/PYciKLJvo4z8hUqMy5aNRUncRLuPFQVKjZ7HYh1Sx1/104q 0Yqfn1hbUvEU8E6+mCEhBCoCyHgRxvCjk7y+wpmAZpk6FxVACRW54rRjI tum32LESuc8gJZyZJ2PEu7qT9B2spgTeuUylQS2IvB0MKl/2bZv9AVS0C HxrbxLOeLcwp3a5Zrlcglyl5yugxA3VVu4wdL004P3kOetmRVMsD9h7Ww 3UUs3bBHBL1rVpp99kz1IkNUsJsDG8JTt63AtKFXJcLFp1BQwFBh1shMV A==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4392424" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="4392424" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 09:04:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="937046413" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="937046413" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 09:04:43 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 76576152; Thu, 7 Mar 2024 19:04:42 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Mark Brown Subject: [PATCH v2 2/3] spi: pxa2xx: Make num_chipselect 8-bit in the struct pxa2xx_spi_controller Date: Thu, 7 Mar 2024 19:03:16 +0200 Message-ID: <20240307170441.3884452-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240307170441.3884452-1-andriy.shevchenko@linux.intel.com> References: <20240307170441.3884452-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-20240307_090450_465843_1FF7AE71 X-CRM114-Status: GOOD ( 14.12 ) 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 use for whole 16-bit for the number of chip select pins. Drop it to 8 bits. Acked-by: Arnd Bergmann Signed-off-by: Andy Shevchenko --- include/linux/spi/pxa2xx_spi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h index 56aba2f737b1..e5a4a045fb67 100644 --- a/include/linux/spi/pxa2xx_spi.h +++ b/include/linux/spi/pxa2xx_spi.h @@ -17,7 +17,7 @@ struct dma_chan; * (resides in device.platform_data). */ struct pxa2xx_spi_controller { - u16 num_chipselect; + u8 num_chipselect; u8 enable_dma; u8 dma_burst_size; bool is_target; From patchwork Thu Mar 7 17:03:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13586055 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 C2144C54798 for ; Thu, 7 Mar 2024 17:05:13 +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=18cVTTK770N3H+mgFeYBm1NamBOwZkXsjRfkYBoJ0ak=; b=wEEBsnQegxXBNX xA9q7Nb2qha1Jv7+Nx1rQjKyU9XJc5a0RJoIOqNXUxRq/gPAQsE2/tPU0/Tm4qzq5meKg/qaiTkyl 9Y1AYRFpKwqTnuEISsgHyQf18As0X4j/f/okmb++y/2NKPJDkktJx8673r3dj7oG0Rxzp3C6tdvgL RNt2XkSemuCnSe+0OIJM2O7LTMJP2kW+aQ6Ij9UEsXJTU8pxVJ0SGyP3ycsMwrSknkGlPtIUdie09 udIHC/sof68dYrUaCXLLeYmZDaqR0X4ncFzudbpFcNlg+RHI9xT2K7m+FaR8ljyQnQBZwDUV6eVlo wbAZ4VvuH3A/Soq+zsWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riHAw-00000005btA-0KTQ; Thu, 07 Mar 2024 17:04:58 +0000 Received: from mgamail.intel.com ([198.175.65.20]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riHAp-00000005bpY-2zpm for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 17:04:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709831091; x=1741367091; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k2iqYWkJ/g6zSAYNGIBSWfD8NyYp6rFQOmMuXPYLaRg=; b=ABqzvm8Plam2c14Nm4Nwer0IgiwFFDMMz/deCS5tbfwl4FzlYxzb38XL 42Qp7sGOS7J3fhGH6ZDNchrF69JJD6xPsMD4nl2yoAxY6qN7mscHbaJwM r9QNFqS4AxQ152kRLOaeZv880lBGez2EiDWgrTF22rf9O5B8ZgVesxSWA /GR+K9a+m09fVfRH9IuoNd+FyHYGHdipLqr9EZgOVEjUDYnFJC0aUAkKp t0DT4xgBVTI7bkrpb7Sp0V64vWo6Xn2aC8D9ibw7UvpSkW5+PvMrpvIVQ Sp/D+ttCYMtdGzE0yNNCydn6FMLpFWEBf9MtY/Ip6SdcF2YWWqagsghG3 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4392416" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="4392416" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 09:04:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="937046412" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="937046412" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 09:04:43 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7BCFE13F; Thu, 7 Mar 2024 19:04:42 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Mark Brown Subject: [PATCH v2 3/3] spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.c Date: Thu, 7 Mar 2024 19:03:17 +0200 Message-ID: <20240307170441.3884452-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240307170441.3884452-1-andriy.shevchenko@linux.intel.com> References: <20240307170441.3884452-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-20240307_090451_863717_EA49DD05 X-CRM114-Status: GOOD ( 13.39 ) 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 nothing from pxa2xx_spi.h used by soc/pxa/ssp.c. Replace it with pxa2xx_ssp.h. Signed-off-by: Andy Shevchenko Acked-by: Arnd Bergmann --- drivers/soc/pxa/ssp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c index 7af04e8b8163..854d32e04558 100644 --- a/drivers/soc/pxa/ssp.c +++ b/drivers/soc/pxa/ssp.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include