Message ID | 20240216070555.2483977-6-tudor.ambarus@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 35467C48260 for <linux-arm-kernel@archiver.kernel.org>; Fri, 16 Feb 2024 07:06:36 +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=3Xc+C/HvCXPcSHTzG6962roBMEpzZ4ZGivFZ85dR8lk=; b=QMGciFZ4NrTDXX Rm/wMuGxjJdQqiGLq6Ct0/vN0StwZzjgvlYFIzhQCAhR0tIcWTk7Ya/MKiluJqPDR0VbXNznR4Go4 DNvmK6qVZao6AaORb5aYBcrpA9mwz+zIRsXgJOg1ilSEqZC1u/OXCuspUrwVS8pnXdz+syH5pcAEU 1X6DJCAI4eBlUQCY24VE9RyH4ztJL3KhaHDW8cOhMNFG7XAJtj7RQ3XZtb+5lwkv4goN12ehHefO7 Nl4bJL+wAL+xKmj9qzYFXzqe1M5QLDM3Hyli3DRgvKFJGd5IEZN3nQ5ICUyYYz1+L+CM+Jlo92jKV aUV+OFduFU/3knzCR/9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rasIg-00000001JIa-2Qz0; Fri, 16 Feb 2024 07:06:22 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rasIQ-00000001J99-3zrL for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 07:06:08 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-412255afa19so8164045e9.3 for <linux-arm-kernel@lists.infradead.org>; Thu, 15 Feb 2024 23:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708067165; x=1708671965; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hs676vE1oPrjFgO93552CvPBZ3kPEUhKELlxqPQ87Xc=; b=EwdfXa54Wj+4PMaIvDIVNznpeZW64FCoEXb0ggZ+M3iS2Ua5lBeaLpBsxLYbsDGNT+ cJ0lheVQOAxopEX2P0Wt3u4DxDD9P5oMS0GBa+957OBsOKBtKRqqao6XmyTzyEnqcUlB L4Jet5TdGvAUN3k814QWIvRb18389QRtXgFNVOWsDBwLiLOI/c+TY4+ezE2dZR3KFn// E1AVHsce2yqlaB94kx/haIY9jcNkiUQWRpOlSWyueXaRm/8LR1vk+DkwnKOaqiszAFF6 8OkTlhzaNSlkw4FWme2y4UGnCbUhhxQSGf4OYnhmL3ZvJc5UgnmfVP2ZlTb6kn6vpRSC CAQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708067165; x=1708671965; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hs676vE1oPrjFgO93552CvPBZ3kPEUhKELlxqPQ87Xc=; b=iG/YKMMHzHNim/fTSy29AOyA8+P2ThPSBxGrVL0fpd1qAuyzDOnarAaga/MrtEsDlF ElpdoANjcqidJuUaXy/hpuFx0i1PWgbMCpROz3ILXZmpJZylnjwjyLTwnUAjtGHe7ei5 HhFspURVajyKaB3hA+wC79POqC/MsOV3GR465aFGgC/KcFo0Iruscahgxp6E/Sdb+goR QPNR02kOGrslk20dGXMaFFCxS1G/0knjTRC1iWCg6Xy29zrlyW/DXxrys5X/1YaQMUqw g3DtxwlrUEkQ+snWpPFoxKZboaFDPYq1ePKbccrFUg4QCelhgNskXb9KW3fBZKNJGak4 iD+Q== X-Forwarded-Encrypted: i=1; AJvYcCUV2z5k1mpG2elFvEkcsomfsa+NkG5YErU4TvlnoozFvnfrwTeD1aWw6Jn80qv6+ZF5BFMXc798qSDRPfrLuxBCyG72McwXSQ3fd5twzgpVuvCK2wE= X-Gm-Message-State: AOJu0YxfDqW5ptJKqIrQgCKBXu5i5vlXCSboj/4KlrVt8+vKll9PMUpI qIaDFCFwYSqYZmJ4TsC6nx3mM6jpwRQO8qydRqg4RM3/aF4+d7z+Y2vIdMdfqnQ= X-Google-Smtp-Source: AGHT+IEX/hwRNYuZKtcSXuowtu9eyX6oqcbcAj35MgfKoCBlzipRM+KMcdgRqx7r5x1whfKYCDnT4g== X-Received: by 2002:adf:a446:0:b0:33d:4fa:5e0 with SMTP id e6-20020adfa446000000b0033d04fa05e0mr2453175wra.66.1708067165166; Thu, 15 Feb 2024 23:06:05 -0800 (PST) Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id k18-20020a5d66d2000000b0033940016d6esm1298839wrw.93.2024.02.15.23.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 23:06:04 -0800 (PST) From: Tudor Ambarus <tudor.ambarus@linaro.org> To: broonie@kernel.org, robh@kernel.org, andi.shyti@kernel.org, krzysztof.kozlowski@linaro.org, semen.protsenko@linaro.org, conor+dt@kernel.org Cc: alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, devicetree@vger.kernel.org, Tudor Ambarus <tudor.ambarus@linaro.org> Subject: [PATCH v3 05/12] spi: s3c64xx: retrieve the FIFO depth from the device tree Date: Fri, 16 Feb 2024 07:05:48 +0000 Message-ID: <20240216070555.2483977-6-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog In-Reply-To: <20240216070555.2483977-1-tudor.ambarus@linaro.org> References: <20240216070555.2483977-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_230607_037565_5BFEF456 X-CRM114-Status: GOOD ( 13.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
spi: s3c64xx: remove OF alias ID dependency
|
expand
|
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 72572e23cde5..b1c63f75021d 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1263,7 +1263,9 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) sdd->port_id = pdev->id; } - sdd->fifo_depth = FIFO_DEPTH(sdd); + if (of_property_read_u32(pdev->dev.of_node, "fifo-depth", + &sdd->fifo_depth)) + sdd->fifo_depth = FIFO_DEPTH(sdd); s3c64xx_spi_set_fifomask(sdd);
There are SoCs that configure different FIFO depths for their instances of the SPI IP. See the fifo_lvl_mask defined for exynos4_spi_port_config for example: .fifo_lvl_mask = { 0x1ff, 0x7F, 0x7F }, The first instance of the IP is configured with 256 bytes FIFOs, whereas the last two are configured with 64 bytes FIFOs. Instead of mangling with the .fifo_lvl_mask and its dependency of the DT alias ID, allow such SoCs to determine the FIFO depth via the ``fifo-depth`` DT property. Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> --- drivers/spi/spi-s3c64xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)