From patchwork Thu Feb 8 13:50:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13549840 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 A13F2C48260 for ; Thu, 8 Feb 2024 13:51:09 +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=f1Mw5/OS7hUZIKHu22Frzv8pb1bE9jgTG4IUZ1YiYhw=; b=fUDg+dxOI7+JUA u2vPqj2AUfCWp6us9+1bWjL7a3IuJUhOsf3OxtWiy5MmJ2bjv8z+RyJG5ENphVcEi1jCoRntit3za lNxUub+3GJHkRvTsaELB/ttgBk73pupRhL0HZq4frv8FSqJ3/LkSTymFlvNRZaJZngeM3udebenqD 4eO1CA/9s067MCuQTa9yBRuYAN7Wlcjm50RMYxkLQe/8HchuQeMcbLE2tbI2hayEv5JJeOKx2Tg0A Hw+55vgLCYoMaOjbq11YDi3CJ7UplOGFw5ImH7oFWif8a4Uqtukpp57x3NJfHE+NSxTpHLL+93uXg 08DRxIFgJgV369gklLLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY4nq-0000000DwW8-1vo9; Thu, 08 Feb 2024 13:50:58 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY4no-0000000DwUo-0BRo for linux-arm-kernel@lists.infradead.org; Thu, 08 Feb 2024 13:50:57 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-33929364bdaso1195426f8f.2 for ; Thu, 08 Feb 2024 05:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707400254; x=1708005054; 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=/YEBZ5QgPmZi1uvEzjonJi8xfKR7wdfW/zkTSEaERIc=; b=ZaqMYrDXou7/sY6AYzlulziW6wMyHTaZob025teXsZCjJO3ANnjSDedsf2duf5kV7V U2yzcSZqptSgq3RytY6UYM9br9YFfOouywoJ0Bz31DU1pGJMwWPDUlJ5tQiaMSnCWAZB HFNAAL40tMmH31DVQ9ZoZPWrM1iX9NnVRITGqTm8yWx2APYhZy3jMvkO6i7AsuEJl/Cw hWirYv9WW36iouMMFtKCTAcnLvslZMypivTIdIj5M0M7nsVMJ9FNVJTjE8D6LcES+Rpv 7Kk+RsgCt2wCZWg/hTgBoNsGWEbeZXSbyXJwcVmtD2gMO1iRJReov8dSi/RoIgQ4EgSg bpxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707400254; x=1708005054; 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=/YEBZ5QgPmZi1uvEzjonJi8xfKR7wdfW/zkTSEaERIc=; b=ciiD/vw94p4rS/NdMNzxDurNihMuyhWQPrJgap3Wbumy+vuRHDHkf90quJq1je51M2 pdqICG9v0cCj/NdAck0kVCGE4TIs5jjKDWXznpSOxVF2Wmg+Bf34ASIfEOYW7be4Kwd0 5jVwHdt6U7y3Ha9WzPECBk3tVfbLrPYcmDJumq+NiA3p70l/gY9il9dO+FksocgIoECv DYgkiO9Mln4wJmDVN6lOKDt6vymVdBimQLjhACMxQnnu/hNxsB44IAHWKBzWIGksc9Ss 7obsdbbPujGGu91mzvL2bSUrXb4t5QNreSUejdX68qiPIImY8f9vS7CE4zniIqH4q0Tx q2FA== X-Forwarded-Encrypted: i=1; AJvYcCVPDUD+r0N0azOby3BgWLzF/8d96T6gJaqH8Tao82Hpj/mrfwrVpjoiRwoVImZl59R5EAF8rxnV0DfbNpH4snhE3unHK6g/ppO1nlOGQDOCJGG/P/I= X-Gm-Message-State: AOJu0YzkitjeJ/4Q08ZCqhgScEfqqAahQXz56heDTdbW+2fDqDARDp7E Yk5XjAUCaWgfcv0xW/QV8AVhCU9hyPmMtUAPCk60Q0igmma+sMuF+cYsuhkW0Dk= X-Google-Smtp-Source: AGHT+IHMgA2PTpx02GbHwGXGddiAvWoJzshxLH+HMllwzXkC4uJls4f1ViCTp3LyfivnFk4bDUdHLg== X-Received: by 2002:a5d:5f83:0:b0:33b:4b0f:b98c with SMTP id dr3-20020a5d5f83000000b0033b4b0fb98cmr5840144wrb.32.1707400254314; Thu, 08 Feb 2024 05:50:54 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXy77dutz1VU6xXuTIxj2tJMswynamJg1ebyd6+aEfyN3Htz/4BEuJbOklPxKtkH+TL1v4D9CFF1xqdvHVvJ7s1WjkIKm7LEx42cs5D4R+4yFcx9Z6qY4EhxtRGzTXWlTD9XsTq0TiJz+zHPVjb+GCA3kv0CIVcWeJMmifrH5AYh5OiL76n4y+8Knh7jp6oDnocil9wU9AkH+2ljgNeKLv4IX2mWCuF7z8jIP0cnrzHBlVNjTjkhoEDfYh1e5We+KeVPg6SGJRxKPIsS+QhQIeu/oCEakE+3g+6dkUGg0bz+Y7ekszXCqbxodOjEq2T7mgxpRbOMTpkfji6LSAWIRWIP1CcHWiDsfNWshKCEcV0ihmjwqMmPDqtEitAr55TD2+05dXzC2JqL4oFIpQX4k7Tw/Q93qKJF6JWncHiX9eaPnbj3qTlzHIKUUK9hhHaYiwSQMu1GJTfGxFTWiGFCgTMQLdbkROf+LUt891vGtqAL0VrhqghQZQPeCdbk2GBh8bxvNOQ+FwhEeBW+rkTxLtovQSKf7fkgDtpg+S4xNd9FO1BPYoM7vrumm3fhtjg88d7KcSep3aPL238vlRalFk0OPm828tgj+QC0a6DTQ== 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 m20-20020a056000181400b0033b43a5f53csm3618820wrh.103.2024.02.08.05.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 05:50:53 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, robh@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, 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, conor+dt@kernel.org, devicetree@vger.kernel.org, arnd@arndb.de, Tudor Ambarus Subject: [PATCH 02/12] spi: s3c64xx: define a magic value Date: Thu, 8 Feb 2024 13:50:35 +0000 Message-ID: <20240208135045.3728927-3-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog In-Reply-To: <20240208135045.3728927-1-tudor.ambarus@linaro.org> References: <20240208135045.3728927-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-20240208_055056_117137_BD0543D4 X-CRM114-Status: GOOD ( 11.03 ) 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 Define a magic value, it will be used in the next patch as well. Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 6f29dca68491..6ff3b25b6feb 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -78,6 +78,7 @@ #define S3C64XX_SPI_INT_RX_FIFORDY_EN (1<<1) #define S3C64XX_SPI_INT_TX_FIFORDY_EN (1<<0) +#define S3C64XX_SPI_ST_TX_FIFO_LVL_SHIFT 6 #define S3C64XX_SPI_ST_RX_OVERRUN_ERR (1<<5) #define S3C64XX_SPI_ST_RX_UNDERRUN_ERR (1<<4) #define S3C64XX_SPI_ST_TX_OVERRUN_ERR (1<<3) @@ -108,7 +109,8 @@ #define FIFO_LVL_MASK(i) ((i)->port_conf->fifo_lvl_mask[i->port_id]) #define S3C64XX_SPI_ST_TX_DONE(v, i) (((v) & \ (1 << (i)->port_conf->tx_st_done)) ? 1 : 0) -#define TX_FIFO_LVL(v, i) (((v) >> 6) & FIFO_LVL_MASK(i)) +#define TX_FIFO_LVL(v, i) (((v) >> S3C64XX_SPI_ST_TX_FIFO_LVL_SHIFT) & \ + FIFO_LVL_MASK(i)) #define RX_FIFO_LVL(v, i) (((v) >> (i)->port_conf->rx_lvl_offset) & \ FIFO_LVL_MASK(i)) #define FIFO_DEPTH(i) ((FIFO_LVL_MASK(i) >> 1) + 1)