Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp474210rdb; Fri, 26 Jan 2024 00:58:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmVrqmxa2y7KQqfld1JMd0FpRmtczDwPoaP5Qq6qbkaqb4i2tuHqJsGCor5fnh3vzMP1+W X-Received: by 2002:a05:600c:420a:b0:40e:7907:9c26 with SMTP id x10-20020a05600c420a00b0040e79079c26mr590236wmh.94.1706259507592; Fri, 26 Jan 2024 00:58:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706259507; cv=pass; d=google.com; s=arc-20160816; b=cbwTzWbl13onbRemGNlecJPUN0FDZhyuNihCN3trY6/trMvyLqUAaOUIW69v7FVD2r GNl+C7oucEo8500X9it20xLeFwTxzTA3lJWCnv1mXKCxDCL1q/hb8zL+lFWkZVoG08Yt +OovcqyRs4aAjq4y6ERh8Gn1kYGjlzd8Rh5tuymENmzB5FdCf9mTfVOq0TajFoywsYEJ O8XI1zg7EAQjTLINnAB3uY8j8GnxCZvNsvv7eicxGJMKtJ3vgf7iOkekDDnPTGTxnqEB OuMRlHbQnZZdoOUnTw/3YVGclUk3rXlJvBRxGX2m3gAT3sf56F2NQ9HsR0lIzzrhHIvA vI8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=731Y0O4P28eUOEwYYfDx4qMG9ZVWKGkvhdRiYGuXrbY=; fh=vtZDkA5fMeyCqvqTCvwSwrx5GuW0ZT717AFl2MlaMV8=; b=RdtnLzrJEiMInr26XeMxQn3Z4PsojoUn7ZYG7SJECdVazJDO4yN2WB0ahnLrKqNl3P m2bz9vqMS6z99Q5gozhNsAPLkV3snONWKeSUMQJxPVJXiXt+dnY1Ej+X9NanmUpNlmCR ajrLVTkADk1Cl9zkSAJDnMHNiO2R+A96sJ9e6Uw5eNSf+AirNH2ZVTCaL3nVPnS+enjR RH6yOdwlT/XkXlgVQDQy/l9bjvWp1/t1giabr9ElLZX7QX1ED0jg4vYvCswRlBQtXJOP Vegrw/OeqnSJDg/0sW4Yk0aVpK08Szj0FFZU9qxMVkmROAPJoTFnGkaJ3eV2n69TDmx6 pgtw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/LOaOpm"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-39699-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39699-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ch25-20020a170906c2d900b00a297d2fae1csi367287ejb.594.2024.01.26.00.58.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 00:58:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39699-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/LOaOpm"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-39699-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39699-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 58A331F218A0 for ; Fri, 26 Jan 2024 08:58:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87DE544C9D; Fri, 26 Jan 2024 07:27:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="K/LOaOpm" Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61C2644C8D for ; Fri, 26 Jan 2024 07:27:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706254026; cv=none; b=iN7sYMG/EX06OGc0qdF099XxNumhDbMJ07kjyFxMNFK8Uv4ciIYNy9SdgiMjA3J1q4HEdMzEYgenrikxLWXvW07+iz4360cOOzzL3QziVg3Y7F6QGRVLonaZurHb/SUpDl0e5oVPSlDO3D8MOeY3IvVkW9tMbqZFYPwSanZ7xQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706254026; c=relaxed/simple; bh=PeMyJfDpnk2i+5sA83xjMKB+MOlBBxSjJp10y9Cb9lM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Toyy/aNRvvysNpKLGoqGo3b+c836UfFdwu1GiJcMxanUwd3Uj08x8ZPe9Mm4fWQkEBA64wmquZgq3Ofo0ASrkp8GhAbGcUrAjegOli7qGm7Y0gW61uqFVzK/4MfJ/SAon8l1oGB79Z7IOTdxAlq0rRAR3pIC4TK+4v1N8vX0PR0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=K/LOaOpm; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-40ea5653f6bso876155e9.3 for ; Thu, 25 Jan 2024 23:27:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706254022; x=1706858822; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=731Y0O4P28eUOEwYYfDx4qMG9ZVWKGkvhdRiYGuXrbY=; b=K/LOaOpmWCcWG9F98BD9+usBXU+a2inQh96ZbpA4ulQrIPs785dT78dyfD6tzFn1zt kdU4GsJPKTy9gHNAK8eQ9hdniJOq9xlfiUwxiRrZWBIE9hP/3Dq+9JV5hhhTXE7hoO1G IMvAo0b8NSDuo2ffJnCwB0UzY6AOjlgm7pdtB+6Im8KzaZbb7eqlu1E6t+o/ppPflMk7 ZfCEuJVgnrEdoM4WKnXYS5DF4PB222BTM5w7yQu/JO+k+45q1hsMlXWmZdqIDih+nbdv 9QQ/uSB2o2Zio6FuY3LlnxpBf0+rO8Bz0qVh0B1VP9W/GJTbMAjZOyxUHUPa2f4DPgBN eJIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706254022; x=1706858822; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=731Y0O4P28eUOEwYYfDx4qMG9ZVWKGkvhdRiYGuXrbY=; b=eXuZ0xfGiDX2GFJCd9bOoEA4tPyGVFlf0d08m1T9LwUFjgRJks+G6FbM2Sm3NzaFEm ems2et9s++KxLAjrNbVnl8v8p4eIgTmuaBZBVWHfmwyd8n+bK2ZPSy2YUNCUjp8K6ghW s4ie/g6EJHg5FdsDx4amyX2pPvCClVTgPiPzskUJ1qy6DoTlEA1WodA59S2O8dt3OzXM yxZDdpEtSViA78ITvtwkE2DhSnDPg3VV+wAFYhWUb9acnUaj3yBW6Md6fG3ccSeeDial QnveBcQjSJyYZ24AGXUuyhrwvlp/kObVRtgkshhj4rUtUUS1+zUnmI2Sh7sIkFy/ZybT J9nQ== X-Gm-Message-State: AOJu0YyAt12DXSRWRxzz5Rcn6G2KNJkItxdytuS8KDbi6jbQwWEXTPYe GgNGBDHOjuhJoJMDeERHJbsatSLS6oDR0dKL5Gl/s9BL2/6lQCmX74g+GaGCLlU= X-Received: by 2002:a05:600c:1f91:b0:40e:5ad1:5820 with SMTP id je17-20020a05600c1f9100b0040e5ad15820mr494864wmb.161.1706254022568; Thu, 25 Jan 2024 23:27:02 -0800 (PST) Received: from [192.168.2.107] ([79.115.63.202]) by smtp.gmail.com with ESMTPSA id p33-20020a05600c1da100b0040ed4deaf2bsm1861243wms.43.2024.01.25.23.27.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 23:27:02 -0800 (PST) Message-ID: <6a157604-16dd-43b2-90aa-466e8185ff53@linaro.org> Date: Fri, 26 Jan 2024 07:27:00 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 21/28] spi: s3c64xx: infer fifosize from the compatible Content-Language: en-US To: Sam Protsenko Cc: broonie@kernel.org, andi.shyti@kernel.org, arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com References: <20240125145007.748295-1-tudor.ambarus@linaro.org> <20240125145007.748295-22-tudor.ambarus@linaro.org> From: Tudor Ambarus In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 1/25/24 22:28, Sam Protsenko wrote: > On Thu, Jan 25, 2024 at 8:50 AM Tudor Ambarus wrote: >> Infer the FIFO size from the compatible, where all the instances of the >> SPI IP have the same FIFO size. This way we no longer depend on the SPI >> alias from the device tree to select the FIFO size, thus we remove the >> dependency of the driver on the SPI alias. >> >> Signed-off-by: Tudor Ambarus >> --- >> drivers/spi/spi-s3c64xx.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c >> index 5a93ed4125b0..b86eb0a77b60 100644 >> --- a/drivers/spi/spi-s3c64xx.c >> +++ b/drivers/spi/spi-s3c64xx.c >> @@ -1381,7 +1381,7 @@ static const struct dev_pm_ops s3c64xx_spi_pm = { >> }; >> >> static const struct s3c64xx_spi_port_config s3c2443_spi_port_config = { >> - .fifo_lvl_mask = { 0x7f }, > How will it work with already existing out-of-tree dts's, if only > kernel image gets updated? I wonder if it's considered ok to break > that compatibility like this. > ah, good catch, Sam! I prepared everything to not break older device trees and then I removed this :). >> + .fifosize = 64, Adding .fifosize and keeping fifo_lvl_mask will not break backward compatibility. In s3c64xx_spi_get_fifosize() I first check if .fifosize is set and use that, and if not set, use the .fifo_lvl_mask.