Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp933583rdb; Thu, 15 Feb 2024 23:09:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVF7FYvAV/JVsESmkC9jAROe1YwEzHiXVPMMUR5O6Hqq50Ws92RBAT/ZrnHEHkaf8fKjcWW/fgTxo++daSSsEW9rAqFI5MfwZNghK6Mzg== X-Google-Smtp-Source: AGHT+IFvhxzbQyI7QyUrBPdhQdGzKD73gsmrPK6pqpe0+r7oBEm+yf2N9QQRKVRgQ3TQOxX3yKUU X-Received: by 2002:a37:c20b:0:b0:785:c397:4d69 with SMTP id i11-20020a37c20b000000b00785c3974d69mr3841459qkm.60.1708067341136; Thu, 15 Feb 2024 23:09:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708067341; cv=pass; d=google.com; s=arc-20160816; b=TVkM2K60jrSb8NXaczBenqtxN5TuxnS51MCGHMmwlHa5cHtbe1pF++EbK5jOv+0pC0 bF90adWO/HdLY75/Khai0N5ann2spY4LkNMwzXoik2JP9U5ZUR9GxQBLG1IpSMryR+Ky JdMadqykuYXtGkp2gEbnIuALkXdd8P5l2CQoza7raYgrbvBHp9p7nE8IxbjxhWIy885a aCgbDO4RzsGG1nHLgBNG8bm2yKJFjNhtNu2snEXFCZpwRf+60cJKADKU00CtCFmz/MyL WqItA61nns/WRK1HrkYruREUe1dJ7bQISE8Sd++BjIaotOfELynF+jZU/C6Oh7Xf9yPH WqCg== 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=UQRRPX+blWzvEopmbMKDola2GW+hMdPUAJuHhbzX5L4=; fh=pv9w96VTwEz/lL0JTh1OV6tX0YgdZAjBfuReHnzVQB8=; b=seGWkKawqUtIy/sePUgvqWJyXTWQzPEcxy2axDHzx7GAqw+Uu3k5YumCc7bJGeLa9w elFSJNaAphk10ICeUPhnScbtECua68agqbkqHQCcsuvMfMiz1tfrhYus2Jt+v+Ow1eXE 0fsKTezsNWUYz1cTQmEat+dqrYx+bmnhtzznUMfh3rGzBUQWPuZGnRJZh6+/NWk9DTsa W0w9fp0G5L0359LZd36By8dMCPqYwSd1pr6zrL7WsW6en27QACMuJPNlNrViXMOL3qn9 tIrnii/DakGeUTQaFMC/vWKEaD9zlggIUYtP+FmaRHiB9Dg/JzIf8jMB+iA/3+viDvMR HKeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pc07qB4x; 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-68153-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68153-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s19-20020a05620a16b300b00783fbb2113esi3300056qkj.452.2024.02.15.23.09.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 23:09:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68153-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=@linaro.org header.s=google header.b=Pc07qB4x; 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-68153-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68153-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DC75F1C22777 for ; Fri, 16 Feb 2024 07:09:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BBF4F1CAAE; Fri, 16 Feb 2024 07:06:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Pc07qB4x" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 209891C2B2 for ; Fri, 16 Feb 2024 07:06:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708067176; cv=none; b=itCXOZ+qzwJOkjWgiyVlcc++qwlwyAULgnyuQXGQ37VK+RYIPok0ELmdPBiteD+wz2mHuB1yTENMOh0Doorfyx8W47prwH+7qWJWsZoIcBMVrwxvwApOB0O681ioOnJd1DnM2mTxdbX2CE+mmLKO0oQFMJlGNiFzMumZPlWtHBM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708067176; c=relaxed/simple; bh=3EdBwoR+7Nrfa5x/e89kDaaHLZR+YpN08+2w1Oy4K+0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SlWWAdL2K4JOUYZwlAx2V+vjhryiFREp5FRyL0XaVvsJOncUjGZktUb3Kf4jwgPQZbD2DQireTuMlf5yHCXrkeo1YYmTD05xWUh8X7/xt7is1+8OwEVRd0Edo5amMvicrFf/DRlegSMSlYNzKcI683J27aB8HvOp4axPnxcUZ7s= 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=Pc07qB4x; arc=none smtp.client-ip=209.85.221.42 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-wr1-f42.google.com with SMTP id ffacd0b85a97d-33d01faf711so390945f8f.1 for ; Thu, 15 Feb 2024 23:06:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708067173; x=1708671973; darn=vger.kernel.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=UQRRPX+blWzvEopmbMKDola2GW+hMdPUAJuHhbzX5L4=; b=Pc07qB4xLVBKV7eAuOLhy5kL5+1CG9FFs9ZO0ie9BRw7LiFVFq64nc1MEjW0QE9bZA TY4cEfAexk1ZaONfNY8HJpOZb4cRiIjQRZHowYkxYvPJUsiQ+wjmNgOEm5q77fkNAnkA Bn6r+UtyN5BwHrDN5mGKG0D7XERbG01FcxyMC2H7AoDGGXPn7D17c+8xQyx9jvSFNNkm wCWrYMt5+E5JzNIziZEopBAUNJd+4OgWWLdXcEpUytwQf3rg13dEnCUesvx27pMsiYDU jUc2kHEAUUO1bCHKGvupk14F/UnVL0vB6hcsJNbMnM9kiX+WjZUEZZ5HmyES4M208aR5 /4lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708067173; x=1708671973; 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=UQRRPX+blWzvEopmbMKDola2GW+hMdPUAJuHhbzX5L4=; b=iWwxV711MzBrWwUd4DW6izk4v3u3mdRX2KzZJtimEhI1kxFz66E3DA53XFUxpSU1Pa ixsT9yurcJP77YwYccjdesuJnGtVnkE8e98ir9O61lXSO1YGnurNRPSsXiTYXicexIak OstIA7rP5zoRPAI572/wHqA+Ht8uo2AgqflAX5I4RGxD7Xnr3j2y4w5jV8EJ2KFW3zQB dKapt4sdLrlxO9M/siL+uRMi86novFRsumJj0dbwH1p++XQ7R+ATuISxJPfDVCj90/Lz Bzh17u48p3vQmrFF/n9eDEzvLNT0nFNB4YclIoXzdLXt2MSiohNq1bc8uD/1R21Cnjja YP9A== X-Forwarded-Encrypted: i=1; AJvYcCV4wmjHPuC1TaTyHDMUNOG3uYDUsEOPsO2SbNb5h7n+zDKFWhbYYQlSmcNIJ54tCE7W4f/kp/phaB6esL0TreswWVPj/GKzXU0aGGGT X-Gm-Message-State: AOJu0YxJbAIgnzHXBnLPFuTjKlYf/dq1d65m/iPBHOjz9A5gfd7eez7s bh9XsWfdZTCeGfAU3K8SDjM43uw2iVJ7aJ5j4019mvNHXK2LHFgiV2mnzjlKaPg= X-Received: by 2002:a5d:508c:0:b0:33d:1f42:ea37 with SMTP id a12-20020a5d508c000000b0033d1f42ea37mr361534wrt.15.1708067173486; Thu, 15 Feb 2024 23:06:13 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 23:06:12 -0800 (PST) From: Tudor Ambarus 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 Subject: [PATCH v3 12/12] spi: s3c64xx: switch exynos850 to new port config data Date: Fri, 16 Feb 2024 07:05:55 +0000 Message-ID: <20240216070555.2483977-13-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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Exynos850 has the same version of USI SPI (v2.1) as GS101. Drop the fifo_lvl_mask and rx_lvl_offset and switch to the new port config data. Backward compatibility with DT is not broken because when alises are set: - the SPI core will set the bus number according to the alias ID - the FIFO depth is always the same size for exynos850 (64 bytes) no matter the alias ID number. Advantages of the change: - drop dependency on the OF alias ID. - FIFO depth is inferred from the compatible. Exynos850 integrates 3 SPI IPs, all with 64 bytes FIFO depths. - use full mask for SPI_STATUS.{RX, TX}_FIFO_LVL fields. Using partial masks is misleading and can hide problems of the driver logic. Just compiled tested. Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 784786407d2e..9fcbe040cb2f 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1576,10 +1576,9 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = { }; static const struct s3c64xx_spi_port_config exynos850_spi_port_config = { - /* fifo_lvl_mask is deprecated. Use {rx, tx}_fifomask instead. */ - .fifo_lvl_mask = { 0x7f, 0x7f, 0x7f }, - /* rx_lvl_offset is deprecated. Use {rx, tx}_fifomask instead. */ - .rx_lvl_offset = 15, + .fifo_depth = 64, + .rx_fifomask = S3C64XX_SPI_ST_RX_FIFO_RDY_V2, + .tx_fifomask = S3C64XX_SPI_ST_TX_FIFO_RDY_V2, .tx_st_done = 25, .clk_div = 4, .high_speed = true, -- 2.44.0.rc0.258.g7320e95886-goog