Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2606135lqo; Tue, 14 May 2024 04:10:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjnplVwhPw6ow4XI/JgqQKYTFQVvd/9G9p6Q7NVrS5xEIz1fuMIN103GzpicIvxCIbU1pq4Eb4Ax/5Ff6yqC+58uVH5P5yZmoAkb3t1g== X-Google-Smtp-Source: AGHT+IG4ydau/ao7FeqPhBiTZjIs2ETnjopsQDvnL+oRdqz1aXLhr/pHIDlBighd+Sca+Mk4nE+e X-Received: by 2002:a05:6214:4983:b0:696:a982:92a8 with SMTP id 6a1803df08f44-6a16814489cmr144032396d6.3.1715685009315; Tue, 14 May 2024 04:10:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715685009; cv=pass; d=google.com; s=arc-20160816; b=Xmnu3IE3T8SvBgS1RemtJq8+gmWOYcvA5m2nKW/g/UaM9q3WcZ0Hfm4Ajgm4Ijc0Kl Lf24QUYdqPh6v/IFyzWLqwXrNg/LbT+TmdOFExF7Qs8GeKUXAbw78AWwZ8Fjg/CgO2Gu X+9jRoWE6/rsWqAuePXyW7fS2Z7jqEgzrYekjr/Z1wE0RlTo64/8Hy4Qnhwk94ka8iT8 IZ3FBuz14FfoRdL5tyGW+iHMrO1aZ5SUq2um6RhIGBL73BiXDXVVQaABKA3sSfKifMKt pwRi3f1IyLQUX01MLPxJQ2qhUBq0auSu+k7hlDK/KlgyGxfvMPoRlxMHSLl97so2PRkG Fvuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cCFKp3ydH0cHb66bnNRuqaNUf/RYlpFtDd3R5ps9Ddg=; fh=GT/osuVW8xNTdhrA3dhbdtgVGAyEv0TL58bxJ0HD0XQ=; b=brEmWplpm6kjyEwT/eoFpax0H67TM2ccqFk0SjNay4LGL8+HPi9HLovtji8tIJu6rW dM/AgNAjCoaksj9JvwrSWoqad5yyHG9nlyPea0hD7EZzzbJD/MS4Appc70oe1dcs9Myv uuopD7uEN/QPl5ONeW5PGMQ9exvvCcbsy2rhpH7IckrNHl4L7b0O1Zx6PRwxReDDxRXC Hl/t42TDf/9dTkqYk3QO5f/ifiMhsJUOYPHBUc0O++soyrZGm14optlCDuMP0etoyv9u N7vHwUTQzmvJDZccKkcQQyGkVPI7/V8k/YelSj5VxgKdeo/rZNE3ICDuMA1bl5TohiLx 9xmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=Ts2LRsbE; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-178573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2b682bsi113484996d6.330.2024.05.14.04.10.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 04:10:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=Ts2LRsbE; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-178573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0FBC31C212BF for ; Tue, 14 May 2024 11:10:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 566D813E88F; Tue, 14 May 2024 10:46:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="Ts2LRsbE" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 1BD9561674; Tue, 14 May 2024 10:46:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715683584; cv=none; b=ghxz+fHrAU0Xz4+HJHBTE8gvYbt/AyeE/3YhFXJu/HEUr/pVtvTSSp83sHqLwF+Yrt49OApW838urs5TzfcfDLIuFdk7rc538UidMgQbc7LsjoRXjYzyFwwwGN2t4iIQiL6Z86jPv+MJxxLKUwxVjpI4cenLt3jOopYZkQoX3UU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715683584; c=relaxed/simple; bh=4slCxc3P8EDvVix44D3POLsDodsmYi4dyKslEAmSSbc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CU82h/ebEt1Z/pb0JLlvDfRPlANpPk+lW4SuvEZjoZEo4ILk903oX9JGb7Atr88s6GlmyBcyQAL2VfrES/HpxgBsge0YVkaDYfNwmZjbz5IpxWCbbMp89JilY7I999DdQD/jodQ9aTiWVacpFFtE2kJHeS1BZ7DGLIlOOyWiSQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=Ts2LRsbE; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1715683583; x=1747219583; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4slCxc3P8EDvVix44D3POLsDodsmYi4dyKslEAmSSbc=; b=Ts2LRsbEw1ejGLdPpaLjCCehXJ48iOmpG2n7hs7vR3nU+n5NGCC0Lm6P FTey8VRWTDI4Q5t6YY3zmTkrdmMkr8qLRLY695df00S6addtmj1vZDSx7 r6DQYIsvikETbRV0XUh1xRhwze4nog9nPpVLqI1kvBANDh2ByT9L3fvPf UdQZsX7D+nhGLjqi8gieIGU92MyW91L9tBupJ3qzIez5DU1uH/8kivbXf uS3UXRuIuMI0s4i6xgQ+j4joHoCEZNU2lVrNQx+3viIYkjQtxP1ZwpJlN RPFxRcQ/CDZ3qvc3eqF7OsCdDFy3MqPD5fCoJfJN/ovu2xJHLNhdeQW1M w==; X-CSE-ConnectionGUID: pbXPAEwqSv+MVNI86TSxeg== X-CSE-MsgGUID: eHmYSOjGTcGSvJS2RCp+kg== X-IronPort-AV: E=Sophos;i="6.08,159,1712646000"; d="scan'208";a="25223737" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 14 May 2024 03:46:22 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 14 May 2024 03:44:59 -0700 Received: from Lily.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 14 May 2024 03:44:57 -0700 From: Prajna Rajendra Kumar To: Mark Brown CC: Rob Herring , Krzysztof Kozlowski , , , , , Conor Dooley , Daire McNamara , , Subject: [PATCH v2 2/3] spi: spi-microchip-core: Fix the number of chip selects supported Date: Tue, 14 May 2024 11:45:07 +0100 Message-ID: <20240514104508.938448-3-prajna.rajendrakumar@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240514104508.938448-1-prajna.rajendrakumar@microchip.com> References: <20240514104508.938448-1-prajna.rajendrakumar@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain The SPI "hard" controller in PolarFire SoC has eight CS lines, but only one CS line is wired. When the 'num-cs' property is not specified in the device tree, the driver defaults to the MAX_CS value, which has been fixed to 1 to match the hardware configuration; however, when the 'num-cs' property is explicitly defined in the device tree, it overrides the default value. Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Signed-off-by: Prajna Rajendra Kumar --- drivers/spi/spi-microchip-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c index 634364c7cfe6..c10de45aa472 100644 --- a/drivers/spi/spi-microchip-core.c +++ b/drivers/spi/spi-microchip-core.c @@ -21,7 +21,7 @@ #include #define MAX_LEN (0xffff) -#define MAX_CS (8) +#define MAX_CS (1) #define DEFAULT_FRAMESIZE (8) #define FIFO_DEPTH (32) #define CLK_GEN_MODE1_MAX (255) -- 2.25.1