From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no 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 0AAAFC433E0 for ; Tue, 16 Jun 2020 13:03:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B118620A8B for ; Tue, 16 Jun 2020 13:03:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="h+0SKwD2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B118620A8B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=hisilicon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject: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=xX79OuDyXH1gTRpQVL+efTlCf3wsNRjcFO6vIIYdyG8=; b=h+0SKwD23+mQ4E YioPtZ/Mze2wY/KgxlN41N6SbwSGUuWdDfM6PyTqHSBzubFsrWPJLB/SuC56UJ9QlRVQEa6SDzEhI E14Rv7w8DdNbGbO1Ba5KrXFmfY8004twcgEccXpDrYzSKYYhG1tamc9OnyIu/vECY9CaHueoHAm4s wDl+dWurcHF5SZYXcOGyIFXRUuTqthuLAQjFRtGFNtAWVFRNKQNe4fw6SyD0c2+pXpLN3/guByUJb N1YBLt7Kjf1CuCaubb+i5xSCJP8LDJVJX1uiWX3IcIabc1PbmYmvGjx14lwb/uQfOj6uqGPVKLAMu tdJl18YN1VKbUMwh7IJQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jlBFB-0000l1-2Q; Tue, 16 Jun 2020 13:03:13 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jlBF7-0000k3-SS for linux-mtd@lists.infradead.org; Tue, 16 Jun 2020 13:03:11 +0000 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3EEB882A275378A4B14B; Tue, 16 Jun 2020 21:03:01 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Tue, 16 Jun 2020 21:02:52 +0800 From: Yicong Yang To: , Subject: [PATCH 0/2] Add support to Disable the flash quad mode Date: Tue, 16 Jun 2020 21:02:25 +0800 Message-ID: <1592312547-19239-1-git-send-email-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200616_060310_081671_D1FB18C1 X-CRM114-Status: UNSURE ( 7.13 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vigneshr@ti.com, sergei.shtylyov@cogentembedded.com, richard@nod.at, me@yadavpratyush.com, john.garry@huawei.com, linuxarm@huawei.com, yangyicong@hisilicon.com, alexander.sverdlin@nokia.com, miquel.raynal@bootlin.com, p.yadav@ti.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org Previously we didn't disable the flash's quad mode when it's removed Then comes the problem that if we next time load the flash in SPI/Dual mode, it will not be correctly enabled as the quad enable bits has not been cleared. I validated the condition on Cypress s25fs128s1. This series adds the capability to disable the flash's quad mode. And restore the flash when it's removed in spi_nor_restore(). Yicong Yang (2): mtd: spi-nor: Add capability to disable flash quad mode mtd: spi-nor: Disable the flash quad mode in spi_nor_restore() drivers/mtd/spi-nor/core.c | 57 +++++++++++++++++++++++++++++++--------------- drivers/mtd/spi-nor/core.h | 10 ++++---- 2 files changed, 44 insertions(+), 23 deletions(-) -- 2.8.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/