From patchwork Mon May 10 14:13:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12248305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B846C433ED for ; Mon, 10 May 2021 14:15:06 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 09F4A611BF for ; Mon, 10 May 2021 14:15:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 09F4A611BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=zf0stAfppkXAsfiD7FHqEF9yQ1Z84yIuDupjx2nKm/w=; b=kTDVg4ci9ru0CN5LNCZZY+A+Rh s7GzpPt8dbHFOHCTmSyGDK99jvohQqdjpjzIjNRmOyBvYn23yWOC0pGpSYjTYi2TjlxBTo5SMkez7 J3++1ozBD1b4OEbYevQi9xm9hA+qnQDpNCWkrtrGPL79Z06zkoPmx91AOiRNYbNT9tsbaZEFUaNe3 cuYXEjI6yi+noTPmODK+sCAMC/2x11knjKwoLJ8ViHUTMf8HU5KY8jhk5OcualYSXM3utfvpOlV9B Vy9OKCeO1E72Gq/bPuHtm9rRQoqVizqg7pr9c4PlE0ArvdOYlZjD9rC9iGHWQA/HjGxy65++h/y6J bVUqvPXA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg6fH-00EaSC-TQ; Mon, 10 May 2021 14:13:44 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg6fF-00EaRv-MN; Mon, 10 May 2021 14:13:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=zQTB3+bKckpKCMFqLzAkIZq7utL1kNvY+OYl+FsX0Cw=; b=CZDfhzDRiv4ByJn1b4Jx+S7bIQ I9bonXOJGf7ZY6+HDKPzOi6kRJEan2NT/x6DloFhUX9vxz9zabHHZW5VrfdNYC7cWNfDPZWrcv6zK 7yScd1G3xWqBUrP6dmT58Zk+xFnjC9EdFFzyr+B0aoc0X/psOZHFtWwgEPZc/jEjIY3m2r5r3e3Nj 2CObfKqF9aPu/E6iYcJHC6OHNQfA0AgNgVJADOJOdAN+iLopvb6vcrfO6ey1rXqcEtcxBnI2F61KE Mnnl/x8xliZYquAkQsDQeGMo+QN0t6ZVTWQoxY9drnwC9dIvLCiNZcA7QZjuv3ex1tR69faRUvtvB 6mN78WtA==; Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg6fD-008nP7-5f; Mon, 10 May 2021 14:13:40 +0000 IronPort-SDR: 7Z+AykxS8R57SBk7WA7GQzntZozqBEFd2Wz/2518DgHuZ67dTYk12px5eXJ8sGf5P2x4Yriu0F drt7VWTbcfkQ== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="196110243" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="196110243" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 07:13:35 -0700 IronPort-SDR: ltyKADyv74sqKrk8pGvheocmbjUB7aNZEfOIcMJovcY7sl2QrkPQT5cbebQDDxNRdIFUOA6ePH UDkpw80MBNEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="541231325" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 10 May 2021 07:13:33 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 628D0142; Mon, 10 May 2021 17:13:53 +0300 (EEST) From: Andy Shevchenko To: linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Vladimir Zapolskiy , Tudor Ambarus , Michael Walle , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Andy Shevchenko Subject: [PATCH v1 1/1] mtd: spi-nor: Use SPI_MODE_X_MASK Date: Mon, 10 May 2021 17:13:43 +0300 Message-Id: <20210510141343.56805-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_071339_242675_401C2EC8 X-CRM114-Status: GOOD ( 10.66 ) 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 Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko Reviewed-by: Michael Walle --- drivers/mtd/spi-nor/controllers/nxp-spifi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/controllers/nxp-spifi.c b/drivers/mtd/spi-nor/controllers/nxp-spifi.c index 5703e8313980..2635c80231bb 100644 --- a/drivers/mtd/spi-nor/controllers/nxp-spifi.c +++ b/drivers/mtd/spi-nor/controllers/nxp-spifi.c @@ -326,7 +326,7 @@ static int nxp_spifi_setup_flash(struct nxp_spifi *spifi, ctrl |= SPIFI_CTRL_DUAL; } - switch (mode & (SPI_CPHA | SPI_CPOL)) { + switch (mode & SPI_MODE_X_MASK) { case SPI_MODE_0: ctrl &= ~SPIFI_CTRL_MODE3; break;