Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp508904rwl; Tue, 11 Apr 2023 23:22:01 -0700 (PDT) X-Google-Smtp-Source: AKy350ZtOnQoBJWTp7C33aRgJsAv3RujWmTgfiNGi5K+A096X3gEbhUL9h5Af1GaRMyWJZWGgeoQ X-Received: by 2002:a17:906:99d0:b0:94e:6eb3:abc4 with SMTP id s16-20020a17090699d000b0094e6eb3abc4mr243871ejn.4.1681280521293; Tue, 11 Apr 2023 23:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681280521; cv=none; d=google.com; s=arc-20160816; b=PyYofCcZv7khYljkkAcGiczmpLncYwz7oErw9OA5WB6Qb5oQqbTz6p5Fkawf0a+l6V OouZEFrAyd76ebS+LqEb44MTUvNNUVza6iHl4ykxk+Q9JPBiaBqJjNl51wo18pd2lwK3 Z4G9+PBcM9/J0CMnND2NbbRpgemjuaIooHCZdIGbUBujmJfJH6kyVzrn7ohm6psC4GOs tbSXNHEwq8Mwl6dJyILY9AURgFQqcjThor1b8HKb8p6zDriv36mzC4vhTyAmVIOob+cU XTp7sJGqBYNppMlhvn2RwQFOFUjKnRNfbfDKVKjCg5j9pzvwKkiuUlVinvrnyw7CpWKJ 3aGA== 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 :dkim-signature; bh=Y/eHmQmhsT9LVvYGckzElMjsdyU8uNoVK685QSt2va4=; b=OsBnnELyTI3NxM83NkgCPZevgK6Lhq8eX6OqWEhlb+fLRx2F+GhXLppqRgZpIaMK1N GrWaPqD/wEZizrGO8wCO8T5cJ+OzWmW2GVSlYf/9hWwXBLBt2DduiaTReICzSTPujAfP qXt0+ldK7W2lHRnGmQnwSqxKBYWzQMpY4bPzIy6mzzolhwQpc5xEQmqkpY+Lsd7q7gZw MX3gUZJItW805nz5UTwfSqEEOTHBZssttFHkUhTRdH1YmCdQi5Vcu9UPM+dkksgaGWQo qFYEpZGPyDpjD9zVoW/vlWhAPZdiyEW5iaLDKIuetBf79g3qqu6QBd4fF3S8Nlce3xTx ET/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=QJZ3f3x5; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw42-20020a1709066a2a00b0094e15190395si798589ejc.996.2023.04.11.23.21.37; Tue, 11 Apr 2023 23:22:01 -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; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=QJZ3f3x5; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229677AbjDLGV3 (ORCPT + 99 others); Wed, 12 Apr 2023 02:21:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjDLGV0 (ORCPT ); Wed, 12 Apr 2023 02:21:26 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FE181A7 for ; Tue, 11 Apr 2023 23:21:20 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id B13835FD61; Wed, 12 Apr 2023 09:21:18 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681280478; bh=Y/eHmQmhsT9LVvYGckzElMjsdyU8uNoVK685QSt2va4=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=QJZ3f3x5ssA86aHvq/VV7bMRBW5rB4ErigDHPJ2d6T+cJ8hv+Z+nkz3Ogu+NXHtS0 rTn0nr2hmkY79UMmCHF5cwaeh5Q2ZErJ/HrPaw40dlDbYqjn+2BiPStVG3Wn0Q+P7W d6LWPZvfUSCSCV9EzSMUbDhTFHxJbDtFlNYlqZK4QhHRzoJrHXLlc9htE0wlVJqByD MsCv3RScLlUh+PMCosHsnL2L06PLiQ+vFbN1KY5xPi4Ys7937k8U030/UsG0M2gEND VZd6kAU0eP81v+Njuoqma19DrpV4UD4gqucJVdlgwb+8Euc+2hP/2LkzWHKsQLwUIE LKrZ9JtHlQ/Lw== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 12 Apr 2023 09:21:18 +0300 (MSK) From: Arseniy Krasnov To: Liang Yang , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Yixun Lan , Jianxin Pan CC: , , Arseniy Krasnov , , , , Subject: [PATCH v1 2/5] mtd: rawnand: meson: replace GENMASK() macro with define Date: Wed, 12 Apr 2023 09:16:56 +0300 Message-ID: <20230412061700.1492474-3-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230412061700.1492474-1-AVKrasnov@sberdevices.ru> References: <20230412061700.1492474-1-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/04/12 04:12:00 #21090163 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 Signed-off-by: Arseniy Krasnov --- drivers/mtd/nand/raw/meson_nand.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c index 256c37c76526..45b53d420aed 100644 --- a/drivers/mtd/nand/raw/meson_nand.c +++ b/drivers/mtd/nand/raw/meson_nand.c @@ -110,6 +110,8 @@ #define PER_INFO_BYTE 8 +#define NFC_CMD_RAW_LEN (GENMASK(13, 0)) + struct meson_nfc_nand_chip { struct list_head node; struct nand_chip nand; @@ -300,7 +302,7 @@ static void meson_nfc_cmd_access(struct nand_chip *nand, int raw, bool dir, if (raw) { len = mtd->writesize + mtd->oobsize; - cmd = (len & GENMASK(13, 0)) | scrambler | DMA_DIR(dir); + cmd = (len & NFC_CMD_RAW_LEN) | scrambler | DMA_DIR(dir); writel(cmd, nfc->reg_base + NFC_REG_CMD); return; } @@ -550,7 +552,7 @@ static int meson_nfc_read_buf(struct nand_chip *nand, u8 *buf, int len) if (ret) goto out; - cmd = NFC_CMD_N2M | (len & GENMASK(13, 0)); + cmd = NFC_CMD_N2M | (len & NFC_CMD_RAW_LEN); writel(cmd, nfc->reg_base + NFC_REG_CMD); meson_nfc_drain_cmd(nfc); @@ -574,7 +576,7 @@ static int meson_nfc_write_buf(struct nand_chip *nand, u8 *buf, int len) if (ret) return ret; - cmd = NFC_CMD_M2N | (len & GENMASK(13, 0)); + cmd = NFC_CMD_M2N | (len & NFC_CMD_RAW_LEN); writel(cmd, nfc->reg_base + NFC_REG_CMD); meson_nfc_drain_cmd(nfc); -- 2.35.0