Message ID | 20210820065839.10525-4-jaimeliao.tw@gmail.com |
---|---|
State | Superseded |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=tgd4ahRY; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GrhMy4wDRz9sSs for <incoming@patchwork.ozlabs.org>; Fri, 20 Aug 2021 22:51:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D437482E05; Fri, 20 Aug 2021 14:50:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tgd4ahRY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 11C4682C65; Fri, 20 Aug 2021 08:59:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9425F82C1A for <u-boot@lists.denx.de>; Fri, 20 Aug 2021 08:59:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jaimeliao.tw@gmail.com Received: by mail-pj1-x1029.google.com with SMTP id h1so873725pjs.2 for <u-boot@lists.denx.de>; Thu, 19 Aug 2021 23:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dBuRr9zqnheDhxIpY5o5g7kuQJm8gaYBCFhIASEiykA=; b=tgd4ahRYfsiGDzgtQPAl68ctccO+QBaDXjaXN1aVTNlrn+OZMTWZpHljnQ9sSH1E8j ZW69+sbbiBKa/sNCAka1SMGct2HBtyiwpFktzSYEv6oM8URtOj5+OaJRUZV/Jzs/QR7u MAWMyMyyrnpNsIE1zUiOkBdK3/k0MiTieuorppyKT6YlFd7LzXh1Lz9lxtvx720G7QI3 Su0vP1+N4MQQRZaT2cCl7kesGx1XlogGkX17PTm+3iDV93IKLFpzQu4lA4IUaMOTKCeb 03qOdUadJBB7AxEVV1BQrAsPDNu/QV9mjIGTXdKPY4xWdtQLzaMElB8aw2129sjAda22 Q3xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dBuRr9zqnheDhxIpY5o5g7kuQJm8gaYBCFhIASEiykA=; b=CK95yWGDqXhPntrJBFHQsuK1P1CQ0s59m03gkerG9o3aN6ANS9coqr7TCSk74g30HX rnIJ5YrYaPGgXj2MhXFMmbDPR8FGFTcKGuOTYIZOWNbBycSZSeOClOZCqqHNmGfikw77 jdBxxU/+cPIaLCH2ER1BzvUuUuxgp0wMEVSeu52PLS8U5v1xyrAqRIOk3q6Nlv8c/cj5 3bKljWVzLZ9Lzf2EXaJR6Iy63ATkfZR7F+Wi3FdGxxZvNMxLXLJqm0VtAzDWSFSwbMo8 Pu5RUo+Tn6Lx+l9mRvhmWWqx1HJWc2MPOL7MMc0VfHwwV5cPkEWtlTJzRyH3g8ZhEdTX 4Fkw== X-Gm-Message-State: AOAM532tHmcnJ/rwAZSyIlNYsZfg9vxXEZ2NXamdKzzZ3IpvoeJ1yr7R N0O3F+tC7e54NfgJXbCQlgmU/Z+ONwo= X-Google-Smtp-Source: ABdhPJzgdcbbNviHSCp0GiWS4JqT7Te/9qJ4XuUVv4Va3G8gUmc+KTXnfHJYvDa/bscJvUoYjzFfcQ== X-Received: by 2002:a17:90a:da02:: with SMTP id e2mr3235068pjv.89.1629442742854; Thu, 19 Aug 2021 23:59:02 -0700 (PDT) Received: from localhost.localdomain ([123.51.145.88]) by smtp.gmail.com with ESMTPSA id b12sm5803984pff.63.2021.08.19.23.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Aug 2021 23:59:02 -0700 (PDT) From: JaimeLiao <jaimeliao.tw@gmail.com> To: u-boot@lists.denx.de, jagan@amarulasolutions.com, vigneshr@ti.com, p.yadav@ti.com Cc: zhengxunli@mxic.com.tw, ycllin@mxic.com.tw, jaimeliao@mxic.com.tw, JaimeLiao <jaimeliao.tw@gmail.com> Subject: [PATCH v2 3/4] mtd: spi-nor-core: set 4byte opcode when possible Date: Fri, 20 Aug 2021 14:58:38 +0800 Message-Id: <20210820065839.10525-4-jaimeliao.tw@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210820065839.10525-1-jaimeliao.tw@gmail.com> References: <20210820065839.10525-1-jaimeliao.tw@gmail.com> X-Mailman-Approved-At: Fri, 20 Aug 2021 14:50:39 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
Add octal DTR support for Macronix flash
|
expand
|
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 707eb9c1d2..069c6f4630 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -3927,6 +3927,10 @@ int spi_nor_scan(struct spi_nor *nor) return -EINVAL; } + /* Set 4byte opcodes when possible. */ + if (nor->addr_width == 4 && info->flags & SPI_NOR_4B_OPCODES) + spi_nor_set_4byte_opcodes(nor, info); + /* Send all the required SPI flash commands to initialize device */ ret = spi_nor_init(nor); if (ret)
Following linux kernel to check address width and 4byte flag to enable 4byte opcode setting. Signed-off-by: JaimeLiao <jaimeliao.tw@gmail.com> --- drivers/mtd/spi/spi-nor-core.c | 4 ++++ 1 file changed, 4 insertions(+)