Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2103388iof; Tue, 7 Jun 2022 19:51:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTzpND0xmAfi+6xpoPbHzlp0eHm+SmoQq9yD1iRwStvvqxdQUxyVLeYuaB7NtDXlUw+8/y X-Received: by 2002:a17:90b:3ece:b0:1e8:90be:4cda with SMTP id rm14-20020a17090b3ece00b001e890be4cdamr11662230pjb.67.1654656716614; Tue, 07 Jun 2022 19:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654656716; cv=none; d=google.com; s=arc-20160816; b=y03+2iSJQEWgu89RYtAmI15J43ZveY7Oai5oY6NB2J3KqE7aLADgzfi2pQ2TPQeAME 7C5Fo2/Pl4vRZ/cmC9uv3onSdA2GydBhBmlj9hyyCDOiwH8a8f5pLwBycOg8heAf021E wfWrAwY6xjdaK9hcf0K4UdP507ccaa401iJ5K7k+4tnNqJr6jHwZVRfAJRvADR3VPr8o 4YM+pt9g19uO2QIqn/sQkRK7s8TwxS09ANkMOQhBVs47diVJLc8mBqeF0+ocIhhVkSGW Me/3PqHa48rbJ1sikVh8ro9JA2bLy8VFCNQA2VAg5j7NmnJSqBhBvPKApj3ivFq4edhR c7iQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xVi4HLtnplA3u4Na09iN2ddrxXMqB/SFsquHBk3cKUw=; b=fW5GcMec4/g7+7y6oxscLxMrpA+UVrF5IMfnxRTWZQxzAOKl8KHtjqTtadlQNpqbil 7rq2uIZUQRLjwocuJQ3H87XsHWbq4/3Y+tnTV5lTaEYCNp/+jx5kDLlwxwBwQ00ymtt6 TCt/n+A/2RNKOe3rsxqamQckh5qvN3+Ah1EzGuz0i8xPbbd85MjghlIdzeqwS71CERka wsrK95TGybV4yTirKvwcaOndZBhOr1dTiukXk1fYeKmfPlO6mwGWHUHC4oBqcPwytL6D B7KmzNmLqHwUeJg32rHvIFg5U7QRwXQpJYbYH27c2V+c3aItlnqvIyeqTHZTcWH9q1iH yhZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rppU1N1v; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o21-20020a170903301500b0016356bd88e5si23120526pla.419.2022.06.07.19.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:51:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rppU1N1v; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 413272AA987; Tue, 7 Jun 2022 18:26:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381004AbiFGW2f (ORCPT + 99 others); Tue, 7 Jun 2022 18:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381077AbiFGVRS (ORCPT ); Tue, 7 Jun 2022 17:17:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4263BC1EC8; Tue, 7 Jun 2022 11:58:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0A1D261768; Tue, 7 Jun 2022 18:58:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17749C34115; Tue, 7 Jun 2022 18:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628297; bh=Chb73ZYLXdHRVkDpmNtakm3BbqknUBSfsjD/jO4aXgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rppU1N1vDvpJw41lWxSmD+jRDZw8Gy8Neuz1+0qdEsbfORJanTcG1JKKtKPtqDQEa gt4pjyaY7R0tCdIt6PMi5AVMnvZjiuy+TQ7NoUbHpZhrJfABsF2Ed9iJGUIGfKnNfM YM+FzVBVJ4WZ6WlndDUbH/e1J3CY2u7B+RfUydCA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuanhong Guo , Miquel Raynal , Sasha Levin Subject: [PATCH 5.18 277/879] mtd: spinand: gigadevice: fix Quad IO for GD5F1GQ5UExxG Date: Tue, 7 Jun 2022 18:56:35 +0200 Message-Id: <20220607165010.889114213@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Chuanhong Guo [ Upstream commit a4f9dd55c5e1bb951db6f1dee20e62e0103f3438 ] Read From Cache Quad IO (EBH) uses 2 dummy bytes on this chip according to page 23 of the datasheet[0]. [0]: https://www.gigadevice.com/datasheet/gd5f1gq5xexxg/ Fixes: 469b99248985 ("mtd: spinand: gigadevice: Support GD5F1GQ5UExxG") Signed-off-by: Chuanhong Guo Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220320100001.247905-2-gch981213@gmail.com Signed-off-by: Sasha Levin --- drivers/mtd/nand/spi/gigadevice.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c index 1dd1c5898093..da77ab20296e 100644 --- a/drivers/mtd/nand/spi/gigadevice.c +++ b/drivers/mtd/nand/spi/gigadevice.c @@ -39,6 +39,14 @@ static SPINAND_OP_VARIANTS(read_cache_variants_f, SPINAND_PAGE_READ_FROM_CACHE_OP_3A(true, 0, 1, NULL, 0), SPINAND_PAGE_READ_FROM_CACHE_OP_3A(false, 0, 0, NULL, 0)); +static SPINAND_OP_VARIANTS(read_cache_variants_1gq5, + SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), + SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0), + SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0), + SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0), + SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0), + SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0)); + static SPINAND_OP_VARIANTS(write_cache_variants, SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), SPINAND_PROG_LOAD(true, 0, NULL, 0)); @@ -339,7 +347,7 @@ static const struct spinand_info gigadevice_spinand_table[] = { SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x51), NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1), NAND_ECCREQ(4, 512), - SPINAND_INFO_OP_VARIANTS(&read_cache_variants, + SPINAND_INFO_OP_VARIANTS(&read_cache_variants_1gq5, &write_cache_variants, &update_cache_variants), SPINAND_HAS_QE_BIT, -- 2.35.1