Message ID | 20240212140331.915498-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 1D508C48297 for <linux-arm-kernel@archiver.kernel.org>; Mon, 12 Feb 2024 14:04:27 +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=UQBCfHLUO5qufDqKexfAn1kw2CrBU05rogGLYTcW6bw=; b=hBD5QPCEBuYs8E Slain0kAd14JGEdP7BaEZn3a6a6k/dQhVPz5Ls4fgJWZMzQnGaoV56ogy5dnEzPr6De2U3//W4qv/ iG2pWLKZgyGH6mNeM58a0u+j9rUJrMnIAVWTDO4SpRlqXcw7BvNt6X7XpoR7HCOJsyOSctJV1Rp24 q1IJFHvBPFLL7RZozx75e2gxC0IxdBONkxfn6tXV7flouC9Htx+A445xk8iWlNhRtW+BWekpg71sg A84HMjr5Ae+TTEQ4kIU1sO5YlPYbbYmuQsfiG/LXYC+KX/T2Mlqj9ae+L9Od5+cuBsSCMBaXP87co YgUm0+w/fO2iMDEfsHkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZWup-00000005gzQ-3ID4; Mon, 12 Feb 2024 14:04:11 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZWuZ-00000005gln-38rB for linux-arm-kernel@lists.infradead.org; Mon, 12 Feb 2024 14:03:57 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-410e7b08252so4836085e9.0 for <linux-arm-kernel@lists.infradead.org>; Mon, 12 Feb 2024 06:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707746634; x=1708351434; 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=VwdchoB+O7sv0WsEEn/4CtktSHX1kT968ZrMEmEikx8=; b=pLveA+gDARm4Vnlx8hJnNHjmi70V9BAE/xAwCCS6UzOGnpspKgQ2mrOYJfBDs6La+U 3NAFFriWYvm80/uEqZGkEwbOOwqsy7cvknCCbrjANF7Zt2vg7I5tLAnROX26mDFi2oaI vup/JBRrG02ix0qRSk70LFLWbhX80b1Ocg1ZSE92at+V3XgnT70b1mK9Vn7rQJUcvWtG /dFAQgrmEohQGZwPECWgEfy55AXaa83paVfQpYBMB3YKRc7Q9ejtWwOCqcZLXlu6EevF VAd0u3th/V6KI2yYNYkOc/XbuD/rByu3TpspzmM2JQbHyfmt1gGFxcQSXUA1Y0VyyQje hFIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707746634; x=1708351434; 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=VwdchoB+O7sv0WsEEn/4CtktSHX1kT968ZrMEmEikx8=; b=DC3Mm4DrTKwlezOed/uoWc7YDin/xfIv410v2El+obQtQMpqilWuynY6YkDg/oiVU5 gjgSxwYBm7Wd4lOOGDU0Fx3TS26Itsuwgn/JwVx8nQyISABS2xUFL2Q+EOJlGwydfTpU o4eOCYq//mBh0o8f0FAQQPqrE7BsByaKCgY6SKyor7zwbsYsWjmVL/Qqy3q4kJJKyVin C8sve1c6Rugqy0viQknIWrUsxStoV67JHDx3vXt39I+hW3bYebhPTPEPFoYlm+iEzZoC v/4nCgoY3qM/CDJyMbWMNa+IwyMTlH3HLxzjopGoW96f7/tMkgHqhaDxKSlgqm3O2aYf vLSw== X-Forwarded-Encrypted: i=1; AJvYcCX+GLXP6RkWsh3D+JEPu8njViIjMnsCPXzuWNJDvKe2Mmkf22ageqF8Q+vt2mdUmCJIkndF/n6HvOK0Z6oLyb+SnDrRh1I2zL6Ams6LkmKdo+IKsM4= X-Gm-Message-State: AOJu0Yy0wZG7Lk/x23aP4Sm1KRb5sxCMOOXsL7sVqqfeyimKH1Z8KebV pwaf+u+IL8dYM2Uh13Cj3Z30d5m8WEk4lzyE58GYh8e4vEX8Fw/P0WpJF6Bg900= X-Google-Smtp-Source: AGHT+IHwIfxoiv08pfQ+i4+RbhOsVo0yv8+VlGvPXUawS4yf0N3DLdABRSWs1wE4F5B5L8arnUsAKw== X-Received: by 2002:adf:f6c7:0:b0:33b:81fa:ed8 with SMTP id y7-20020adff6c7000000b0033b81fa0ed8mr1852749wrp.0.1707746634081; Mon, 12 Feb 2024 06:03:54 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWsi5WaSfqWUOKZuQ8/DidxAGev3Z1GrHFRfy160EH3quKTiQOAjdKKIYPfP8D+yKm9Q1pQQ99vu0HH4Ito4Uzixp02M3marATcsrBiDwwN1D1A34dAB0gNM6X/hFbfhxagI5fk5smjLdVPyf496wYAfEN9QJSS1qLSCxa65Xi2pniuOJuVjGYXCEbb1LQH3E4Fl/kQ3yAP75XPXskXR6YWxlmdnmVV/KvB4C9QX25sun5SChLlO+ISybzk3xTURv0G2iJM3jzHhhwk4pCYvmnfpR+Xhj+HEj7kfKFmhvjyeKtVl/0pNtKOhhIDC1hIsOMupRu9FUf9i9MzlBAtMAjpjEz2P7t8Qnnyf8E0wtRqmYD7wbiJZUctZ4Qtd9f3SQFuZ7cz9sjQxCZXSqaNZkCxEQWu32XrtsVanHERDVPQcAuO26kapN8JKfADKCuhsuxrkJUwVS0l9NEF/3DvuVT5l9nH2+EiXx9Wz9jL9Lz812K3RpJRcYXvY5m2hf0wRVXGD6oEWdWOfAIICVIDINy1yHJZrf4nl9E36TmJv+Yfkbif3LmcADLGZw1qOvElbiFV4ouiBFtv2/BQQep878TKXghEkKopd/rVoe4KE00AEJ/90v0= 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 v9-20020a5d4b09000000b0033b843786e1sm2135356wrq.51.2024.02.12.06.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:03:52 -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, arnd@arndb.de, Tudor Ambarus <tudor.ambarus@linaro.org> Subject: [PATCH v2 05/12] spi: s3c64xx: retrieve the FIFO depth from the device tree Date: Mon, 12 Feb 2024 14:03:24 +0000 Message-ID: <20240212140331.915498-6-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog In-Reply-To: <20240212140331.915498-1-tudor.ambarus@linaro.org> References: <20240212140331.915498-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-20240212_060355_807120_162F59EF X-CRM114-Status: GOOD ( 13.39 ) 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(-)