From patchwork Sat Jul 15 01:03:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 120716 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2815212vqm; Fri, 14 Jul 2023 18:05:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlFAoaaRiNkulL9SZFOUhmGZ1GuZJs1y1rzBAja7arCXysNXlV6CAjNJIgOBiUmxaAwNhmlk X-Received: by 2002:a05:6a00:16c1:b0:668:9dca:13ac with SMTP id l1-20020a056a0016c100b006689dca13acmr7062258pfc.7.1689383145541; Fri, 14 Jul 2023 18:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689383145; cv=none; d=google.com; s=arc-20160816; b=InImUHJgA1B1ZI6T/p42MGTsuWI/xL6FpDx3ijjU+qfp8KyXJ6SrXsXg9nUAsxh+AI bGp0+JaEF+pF8wQPUxo2zAQTfrUMLSciRIqoQ/JvSR4POWJCcZhjsERg/OTrA5Uv538Y jMBYometeHKEB9QSBeQnquphVIcHDXikOkTKyrxjWqZwgnqcQOabY69qBYGXFZRsgyRL AOt/+ycKTMfKZ+M+fyvxcmlE/fa53GkwC/M/ke+WuvL4QIFTw6d7jN5PIvJeDM00sRRX VC1AjW+kfSEqcAcSKQGccAeqyxvP0r8dxbQ0y8JXHfBfR1yKfLGGHY6yZVCHDtc4S3/5 ugbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=eI2bs8i6gBtkET+lLuxLm34o/EqIyASryS2F9XqcunY=; fh=8SPOXdXcsbbrdLjCtKFrhdDDaSSTCLFzjvpt84tri9w=; b=TXRRt6ztd1fL/nKLmoiPRZI5rlqDX75liBtAc0S7XGrEWlkQGdxsLivTNh6wm8kKMY XJufZhRbq+pK3fAHTIy/E8MPoxHJ7t3sCb+2Tq+dZeAXTjZtWnIuTeAZ0BCCrsSs/ayN Rtlk0ksUT34pSAd9ncFb5GSmM8ZWJlf19ZcpGpNcMawcZUkWAhWIaCesv/qEUSiuqEaA ULSjPu2zgzfQHTUDPNoLCvJSP40Ft5gUuD0CF4myeafdwOZ/TaAuSip2WbRAaiS5WsaS 805LZko/feHxDiMq+6mOjan518DkinDz0WfbIOL+U+8HeOejUcAIflyuPxbI3WI3P5o6 MCxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m19-20020a056a00081300b00668873710d9si2721047pfk.162.2023.07.14.18.05.32; Fri, 14 Jul 2023 18:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbjGOBE2 (ORCPT + 99 others); Fri, 14 Jul 2023 21:04:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbjGOBE0 (ORCPT ); Fri, 14 Jul 2023 21:04:26 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0866A3AA3; Fri, 14 Jul 2023 18:04:22 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.01,206,1684767600"; d="scan'208";a="172657788" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 15 Jul 2023 10:04:22 +0900 Received: from mulinux.home (unknown [10.226.92.194]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 2AAA140A10D5; Sat, 15 Jul 2023 10:04:18 +0900 (JST) From: Fabrizio Castro To: Mark Brown , Geert Uytterhoeven Cc: Fabrizio Castro , Andy Shevchenko , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Paterson , Biju Das , Lad Prabhakar , linux-renesas-soc@vger.kernel.org Subject: [PATCH 02/10] spi: rzv2m-csi: Adopt HZ_PER_MHZ for max spi clock Date: Sat, 15 Jul 2023 02:03:59 +0100 Message-Id: <20230715010407.1751715-3-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230715010407.1751715-1-fabrizio.castro.jz@renesas.com> References: <20230715010407.1751715-1-fabrizio.castro.jz@renesas.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771446621344091551 X-GMAIL-MSGID: 1771446621344091551 Make use of HZ_PER_MHZ for CSI_MAX_SPI_SCKO to make it clear what its value means. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven --- drivers/spi/spi-rzv2m-csi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-rzv2m-csi.c b/drivers/spi/spi-rzv2m-csi.c index b595f3b7294d..3931045a85eb 100644 --- a/drivers/spi/spi-rzv2m-csi.c +++ b/drivers/spi/spi-rzv2m-csi.c @@ -13,6 +13,7 @@ #include #include #include +#include /* Registers */ #define CSI_MODE 0x00 /* CSI mode control */ @@ -71,7 +72,7 @@ #define TX_TIMEOUT_ERROR BIT(2) #define RX_TIMEOUT_ERROR BIT(3) -#define CSI_MAX_SPI_SCKO 8000000 +#define CSI_MAX_SPI_SCKO (8 * HZ_PER_MHZ) struct rzv2m_csi_priv { void __iomem *base;