Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp2168597rdb; Sun, 21 Jan 2024 10:16:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsnvwdS3zD7cnF9QCwG/r5RF6+7ubDz7c8KODKRrFN0lOU38FsdtNnMCjFVYJTVJnECYte X-Received: by 2002:a17:902:b58c:b0:1d7:a2:3332 with SMTP id a12-20020a170902b58c00b001d700a23332mr1081490pls.114.1705860995438; Sun, 21 Jan 2024 10:16:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705860995; cv=pass; d=google.com; s=arc-20160816; b=brqSb7TXx4t6Dy7RjnTb98gUW31SYS07qQzMYeMcF9bU8v7Vtfke1S5z6ivLIOvl03 DGwpQ5NCZo1oltkDG77En98Zk96yIFdDs/u7Tq+AOKClYcTR5qM5UfFjNIFwdmLX//k8 BxxwRNPToDfxoK3Dzj38RAbIdeJZZBdiMJ2SJTbv2u9TfU7O5TwDO6OhQlmP+vg2TQCv 2g+/tUzfBZ7B6mlNSGgwj6Ipm1mNlNowobcrKR2ZlhDGLw8PKMKnyOIsHloRFgaPxHUx JBhc4R966OMrPSRQKtOwzDiFipWq7NqeuJ9skvtyt5fxAm+9cv4AAQiQ0rBH6W7qvbkB ZUjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:message-id:references:in-reply-to:subject :cc:to:from:date:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=6LUlRcO6qAUslB/aQvN4+sncIp9HuXImWqN6ii290a0=; fh=TPEKl5pAGqgADwvfaoedivOFHZ97ltFmVwIusUBEzDw=; b=DBSKvYTYqdqXr9FGBBmast9JBQNznxo29CJM2aCRQWmAika7CO3xqqjS264EzwrHar J/rKDP/26PYJ+P+zmMj6KeDSmTHucpTPwCq6V43BEf26RexM1bdYNhSITaSYpNUcHJhv UnmG5IfLJX8zbwLTMe7LIrf0n49oBFmExwGj0LLwEEJxApodZvBhNgO+GPJoL2skHLLQ HeDUDx3gs5s4ZGZIVspqCw+9g1cIDuf9vIiKhJUjqngL/4KIqKIDg3xjVbii0ya41S8D ynLp5DQzTutIirugvg216Uqsc6CjDfEuwfkjQjsR9VsHOFgUhBX227tggwviNjSexDI0 2n9Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b="dbZCBvB/"; arc=pass (i=1 spf=pass spfdomain=walle.cc dkim=pass dkdomain=walle.cc dmarc=pass fromdomain=walle.cc); spf=pass (google.com: domain of linux-kernel+bounces-32146-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32146-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q6-20020a17090311c600b001d5f009098bsi6992583plh.408.2024.01.21.10.16.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 10:16:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32146-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b="dbZCBvB/"; arc=pass (i=1 spf=pass spfdomain=walle.cc dkim=pass dkdomain=walle.cc dmarc=pass fromdomain=walle.cc); spf=pass (google.com: domain of linux-kernel+bounces-32146-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32146-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B9D22B20C1F for ; Sun, 21 Jan 2024 18:14:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2AD0338381; Sun, 21 Jan 2024 18:14:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=walle.cc header.i=@walle.cc header.b="dbZCBvB/" Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) (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 8AE8BFBFA; Sun, 21 Jan 2024 18:14:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.201.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705860869; cv=none; b=mkUqxYBi8XmwQgaZmt70mHZlK24CwLahC3CHJFhTAHMP7hww7IMl8l2/Mi7BVaStY3zURyFhag43xoeLjiGECMF4QwiCgLOze1HPlwvlcNQgh8Lx5XUgSwcplECeZX5AAkDgPkbeQewNGnr0EhccLOruGhXXSNEeTg/dTiABT/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705860869; c=relaxed/simple; bh=N7OUZjKg0Z42XndQfe4qS1WdjqzPD6BmjTD9CLpxQpk=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=JpFpe+d4ywJ4z6/vff8yIoJ/STT+NwHHR6Zl5ze7IoMQrRSaw5Ta8JUB/Cy7SCG9oqUe8CFqbYoHbFZy0wCjhazCqOm//3YirMR8pkkDm23N7pfVb8Vi7QGto5D3GBSSfO52LtmrwTU5TkpWrFwaz/uuLYfhesjVZUF1Doy6aaY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=walle.cc; spf=pass smtp.mailfrom=walle.cc; dkim=pass (2048-bit key) header.d=walle.cc header.i=@walle.cc header.b=dbZCBvB/; arc=none smtp.client-ip=159.69.201.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=walle.cc Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=walle.cc Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id AB16D71; Sun, 21 Jan 2024 19:06:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1705860391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6LUlRcO6qAUslB/aQvN4+sncIp9HuXImWqN6ii290a0=; b=dbZCBvB/tmsgJl20VVAvUddw5aNNE6egHwf0Na19PhkIglL6ehnwTzxLpop0zmv0cXC0Nu iO3dPOywTLOn7ibsBQXExorSg8oN3hv5wjRi7GmBCXPro+RqCco4nQjju49zx5nGo4cD6w eFqoqxSyvJUXQeBccdkxnnQ0dO1cTRqtP2y/kPUG75RkBRUTUlUYyxY/+esELRuA+jBmkF uqgBW8ppJHC23L2OaH6lz1e2uPczEyMt5varDkqct2DYwS6c0U6yLN3n5AjgLX+3pfgJok puFUea6zpmr+OtBh44bT/X02Hm2P0zrdX3HieqGZRQQAoJwAnv//pn8cf/lX6A== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Sun, 21 Jan 2024 19:06:31 +0100 From: Michael Walle To: Guenter Roeck Cc: Mark Brown , Amit Kumar Mahapatra , tudor.ambarus@linaro.org, pratyush@kernel.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, sbinding@opensource.cirrus.com, lee@kernel.org, james.schulman@cirrus.com, david.rhodes@cirrus.com, rf@opensource.cirrus.com, perex@perex.cz, tiwai@suse.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, michal.simek@amd.com, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, git@amd.com, amitrkcian2002@gmail.com Subject: Re: [PATCH v11 03/10] spi: Add multi-cs memories support in SPI core In-Reply-To: References: <20231125092137.2948-1-amit.kumar-mahapatra@amd.com> <20231125092137.2948-4-amit.kumar-mahapatra@amd.com> <3d3a11b1-8396-4d8e-9bb3-61ecb67e7efa@roeck-us.net> Message-ID: <9806d99fab46c928f337b30b21057b3e@walle.cc> X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit >>> FWIW, the problem is due to >> >>> +#define SPI_CS_CNT_MAX 4 >> >>> in the offending patch, but apeed2400 FMC supports up to 5 SPI chip >>> selects. >>> >>> static const struct aspeed_spi_data ast2400_fmc_data = { >>> .max_cs = 5, >>> ^^^^^^^^^^^^^^^^^^^ >>> .hastype = true, >> >>> Limiting .max_cs to 4 or increasing SPI_CS_CNT_MAX to 5 fixes the >>> problem, >>> though of course I don't know if increasing SPI_CS_CNT_MAX has other >>> side >>> effects. >> >> Yeah, I was coming to a similar conclusion myself - the limit is just >> too low. I can't see any problem with increasing it. > > It would cost a bit of memory and somewhat affect performance sine many > of the newly introduced loops are bound by SPI_CS_CNT_MAX and not by > num_chipselect. > > It also might make sense to document the new limit somewhere. Prior > to this commit it was not limited at all. > Documentation/devicetree/bindings/spi/spi-davinci.txt lists 5 chip > selects in its example for the use of cs-gpios. > Documentation/devicetree/bindings/spi/spi-controller.yaml also does not > list a limit. Given that, that the rest of this series is under discussion (and esp. whether it is the correct way to do it) it might make sense to just revert the picked patches. -michael