From patchwork Fri Feb 16 07:05:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13559623 Return-Path: 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 4E41EC48BEC for ; Fri, 16 Feb 2024 07:06:55 +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=VDTnbGNljPFtYsOlKAvX4pcih9LaDJL5rCQLUhS3+aY=; b=hwR3fPDMDJpgjB f66uX4+V85CM8LiD0ZNwzgOmg2AEgZ2lJpV8i3GNXjhF3QsBsEj7Z24zMVoXMP5QECM1NF0v6FBsd hGt2PabQphd2ZjPXFAV+XRJXLThkBS7PW3WYXQIGyMNLgb623UZHe0f9xoyhgSbI2T376gxGa9Rzq p+AsBYcSLfRh4mcSZcf0H/c27pidFQwdHNMtaQYMqoLr8h0e/paG7By0Udcnh+O/EasoFhiaXp74E AHONtf481B2Puqg4rGAo8YhNCMNCOpOoiQ90Wn2md3rbP1PnfCMlYofs+sjovhltz+4tt2PcJs9P0 QxvfdJ4rR2+oBXTe/twA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rasJ0-00000001JaU-19u6; Fri, 16 Feb 2024 07:06:42 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rasIY-00000001JE1-2pjc for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 07:06:15 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-33d07ee22eeso270094f8f.0 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=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=UQRRPX+blWzvEopmbMKDola2GW+hMdPUAJuHhbzX5L4=; b=H1z0k+SXqRzj8VZ5Nt+mLCxJJA/sg9D74WCYIdlcNXQQRzbaq4CZh2FOql1hAC+xdY n2iuRuji3Bib/layQx3iCurZ7DZhoJfrAq5viHUjnAaPofDgNBLdxHLKi752FnIwm1Sa Dwzjgls6WUd01gIylkVRtnDBma7cv3kKYJ6MJUbYbB2Hfoqq9oSRE+u4aHfkyXZAa9kZ vdla5HQXINckB983WdmfFTUqkat55tDBFBPnGOM6RQW+G9l8GpP9XVfnpxE4jj7ObpE+ Ro6R/v2Ra+JD0tbGXZOr87X+MaCHGIVt+OVO/bNb+5OIWm4ZSnkbWyqqRwsMnWrIku7u pAhg== 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=tDCEo6NNCkRPhP6zisB8gEv9o+mIuvRUIQUC4wc9jm/vPWzg0RFNf/LUMxR8VPotNA iDBBPaGkoGvjXO/Z45QvUYK+CSS4LLT3vOM/rz/ozhwTeM809M8q+mXswvJNwDl3KMU/ Lv8gt07Uqpyom24YyzRXgw3PKNnsfOG3lF3q9EtgnkEp85WPNAYNVTJUjRonndguGZyT AEeA1q21bmlQko8VjxAuajBqGr4BNbUuv2z4QJO8J2v2ZEkB2iWDNExNr12JHeBQEWpD SsF4yoBbWHVezeVUsbUCNFL0SXYiTkrP0xDtL4MVWzFI3IfbDZxj0i93A05O3YsTaYiW FxfA== X-Forwarded-Encrypted: i=1; AJvYcCUwPEO+XpZSsPBjxAo/WXU1GeBiCH2IDCE8tHfXNacVmv/jb9F/rAjdHicINchVVZhHmplgHWfyl1k6sg2L0KLBL7B+dcwn23mhdlU3LcEoqv3gFGk= X-Gm-Message-State: AOJu0YyHrACfD1jbYSTnuVU+zNwhPZU4D5O6kOaIWTz3F2hVohwYX9d7 3yXVR2o/fLukV/y2e5c1FIDnOrrkAZ2Mjl1xD/YzexKGOUwU0wNz4LopfZLrxBg= X-Google-Smtp-Source: AGHT+IErqstmVJ3gg7nFuUbDeEkjVZQK9cB6BlztDErH2tYUhPqM2cCZ8/9WxbIirM2WMTjujF6W/w== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_230614_752076_807183AB X-CRM114-Status: GOOD ( 13.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Tested-by: Sam Protsenko --- 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,