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: 13586056 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5563129A75; Thu, 7 Mar 2024 17:04:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709831088; cv=none; b=EArJnmkObMlVgXQQDnEL0SlVUpLdw8m9+zUko0l+lkkob9JuOC2x6Q+QncTmsbLxpOf/NT7/n4SZ69QD5a53yTu2ARa3QaRaUOVz3oX9GsOCVtSN8AdMPYKHLxUThA7U0LUPkMYOpG/brS+DqdZTx8u0aigYES2HTacBAr3qxoI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709831088; c=relaxed/simple; bh=vqUkO8TtEYU+TZ1zaI0tn3WCnsWhPGw/MLt7JIPaVqM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ASa6hKRAG/GAGzZHyNQiYg0EiNo1m9BI8R+a+YbzjHQIliRYpVMmuZ67EtQUr+i45fFVrs1ccuQfd73FL8g/uzyHWYi4uLcMxJp2quoCwYFAduxEySEUDn25P9E6JleSZnLL2XwNaM6ZkY3ZBvWRdlyN4sU2bmKAk2B9yDLObos= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=kS6W9KBK; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kS6W9KBK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709831087; x=1741367087; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vqUkO8TtEYU+TZ1zaI0tn3WCnsWhPGw/MLt7JIPaVqM=; b=kS6W9KBKAyWjVbB4xCfLAsv/kozJrzACtgWKkj3t6PT9FJaOkZH8Oe5B +q/hJl7Vv6w9mABfGnVINbRS/uN5bNdDYe+3Yli8sMiiJN1urDiU90LTX k3H0g15dnt3dAjfH5J3cHCObb6cbJTwB6RubKNxcrd3Z+1JNApR7DL9WJ bu2onRgAlQftZBY0+JEWyMfAXIO1eYabkauJHGDHz+WM3SYIKaXP2OCkx dmox60SkSUNImlJSsKUNmeksmnb4bN9VmvMcOjNGFJ6Gw3DB1vEDTVABg W01GCSHztr+9ACLAOWn6HfqC6zfSMYtT77U1PCTD24coMU+FVcmkf5kD8 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4392413" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="4392413" 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 13586059 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00884130AD4; Thu, 7 Mar 2024 17:04:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709831091; cv=none; b=DLsIUClnQgF0UmswkKo2pS1RlLhmbTeOzsty3RADNmptvjqWxM85fBwuSdiM8BD3VnU17Tapfa23lBhCUeEHGqZe4u9WbOEm6G7qnkqEjquaSg79f25PHai40Q2+7DwYnm8120Z/GifT8joDnCTOh4EtO4e1bCxkR/POkeL2Dcg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709831091; c=relaxed/simple; bh=cv+rxy5QtxrIBZi0IThzTINv+rwro5NUmSO5y8zDSgA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l7Q49fAr74+DEvHq5t4CNc53YKfdhznGxTQfM/KZGfWMc/CYcEEEAC6gjZy6byvk5QacVMDcnXvrYp24TF8vqYeA349Ms5ZObzDIL8Yn8Bgn10hUNzlcrx/db9zEKFPO/vLlJWzGmLKvOetwGFQjIPlrj6EK8ZQNKMRJug93YUI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FHzFWdm/; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FHzFWdm/" 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="4392430" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="4392430" 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 13586058 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4ABD12FF96; Thu, 7 Mar 2024 17:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709831090; cv=none; b=BkiiS+aOX4q8AZ4ImfNDYJpbBamd2IYsMcKIc9jNX8dEDHYLtRnUDRKlfD42RNP1vLZQyv1f4GyN0emqHf609FCxPkS9vUYjUVwl0IU+i3ivOrzG5gEChA84bWGAbG1oD26hoAkaZ9emEGdvvHwLteNGgw7X+MTbqwI6bvFUK20= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709831090; c=relaxed/simple; bh=k2iqYWkJ/g6zSAYNGIBSWfD8NyYp6rFQOmMuXPYLaRg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uvflmwsHyNYR1rIcN2VcRuq39S8ttesWQG+1J1s4zqFGPhRdIw5D1KhPxLOhbCfABo/79cffM3h7F+jrnVK1VhXYKV+UvaJQksV8QSHYd8yNTSQUf41Nd5aO5zKtrgWyAMMFYbLpdCBpj6uf3iCZ/B03n/wE8jdbzb88Y8D/Cmw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RT1jHz2C; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RT1jHz2C" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709831089; x=1741367089; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k2iqYWkJ/g6zSAYNGIBSWfD8NyYp6rFQOmMuXPYLaRg=; b=RT1jHz2C/fWgCKjq+LgNurMnRIpG2/G3dWyiOWWCRN/AxJSHHKShK3r+ pzxhc8sQZXJgot3B2+kIfnjRA2xSc6MuYQKsvXhltA1MrmGzg18ysBMnS 9znvl1lBrh2wBe19+ln/BihLUXeXdWopD0kBKNsgtI6dyg4WXHoyAx1G7 mJNqvDME3Y09mx8+VOLw/E6XIJBlj7T5SVhwFK4i5FHScjt8Pl9usVltB caFYONCGTS4GZ6xcAJVts+hhlWfmv1DMiGzAvXeUWxId2/Lxqp7hjtH86 ecKbDkLiX063A4pkM1lJuBuH50zj1NaXaIJ8ZU7mwT+l4l8rcseWrmQoA w==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4392421" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="4392421" 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> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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