Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630AbdLFDMb (ORCPT ); Tue, 5 Dec 2017 22:12:31 -0500 Received: from mail-sn1nam01on0059.outbound.protection.outlook.com ([104.47.32.59]:62240 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754448AbdLFDMa (ORCPT ); Tue, 5 Dec 2017 22:12:30 -0500 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Zhiqiang Hou To: , , , , , , , CC: Hou Zhiqiang Subject: [PATCHv3 0/2] mtd: m25p80: restore the addressing mode when exiting Date: Wed, 6 Dec 2017 10:53:40 +0800 Message-ID: <20171206025342.7266-1-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.14.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131570035487288855;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(336005)(346002)(376002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(72206003)(86362001)(51416003)(97736004)(316002)(2906002)(47776003)(85426001)(1076002)(16586007)(104016004)(110136005)(106466001)(105606002)(2201001)(77096006)(50226002)(53936002)(48376002)(50466002)(68736007)(5660300001)(8936002)(8656006)(8676002)(81156014)(356003)(6666003)(81166006)(36756003)(4326008)(498600001)(39060400002)(305945005)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR03MB2701;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD010;1:JVZ+5N0tBdxwo0cnrVG0Icn5xOkqR6nzsE4kN7+gVN3rOO+y4kbMqWQH3ysexTqqKWjEpUkqtTcawczKIQQ0cjARwN2bHkgT6750da+Oo4vQ6apsM5b7qaHTsJiW/n8O MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c15683b4-be61-4b36-231f-08d53c572eb2 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603286);SRVR:MWHPR03MB2701; X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB2701;3:Wue9Gaou+nAVNumOfYqwzN2KyvgAtZd6oInsfM0VmwZQ6ykDcqYInx9cqIp7vdDvADVtVKx7tS5JjHZCoZdgmF+Bymdr+xng6YPotMfe55FiZqkXhBL8iLeiXFqNUV/xXE23PxSloNtRbQgJQJUCKs/K3UYdY67AEzsFby0cki2Nr98I7aljLeT88pHHkYkB8IGK7uHTgAzBMQOeACIQSi82CPU0ffmJUtEFbF9N845oOW99wg8lg2XQh14UT+U7N9eNol4Qzmwb2bJROYEIFWrksAH5Qdx9wlbAZV5Kj6iELx9NnKxeO9lTesEhSdg5NiXhc+D1SF1mZi5v/XH+wYL1+lshiusdhg60cC+hz6A=;25:iD228zKYC3GD1m+FzY5Pc8eSO5jjv1rxaR48HZkYGpG4hASEX6KxNYU2FPbdxmCwTUB+wdVxybh4cDxemOSFN2Wpv3NOq+hPbq9JTiSPOACVe2CAtTm9+s/UXHpHcwe13p0MT7Js2xL9h+97PrzcL7Io3vDTI5V9tRDKIOWJDAOdqtzCe122OPe5FsZiUBM4ucwaygknpqTU25lFLkLs7WZDHcFJjmpKo/h1zNNSZUffRpDWkDYo7dnysf7ZE4ugHWfDGBYIurb0JmgV09LyhlBTCrzapJOfcIjVOjgZoyAKDKpzWTTRmGK2dWh9goK0SYXSxsiOk+vq5Gt5rYmWtA== X-MS-TrafficTypeDiagnostic: MWHPR03MB2701: X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB2701;31:gLIUYBzOx1P8MZFi8tulAIqqTL1paRZtvGGwTx6CyXW47ysDqvsGstchM96zW1Kg3QLxJ+KC7gyx/2HyP4wfQsD4sfKDzvAvU6h1yhEImRjgpO/CFfpZBtOLJZ3WxIUwlHPQ4LDDvUYjBkafzVUcFRh1Yc0BNB+ogWkweE8Dw0clPBpyd1ZUauSJgJfM1GijslFbLOGKOkrcwVAYUWoXTn3m6uq8DTbvkZHj0qNBqz0=;4:uZkASlxq8V8CrF53t2I3BaKKN2FCVwgbOm1rIwLVKU65hk1yreSNE09EYjvmw+6DoqdBqEN5Wh0n9sqQ9GituzorguRZ4LC0Mf1lykEyBNsvUTHlm3J6gSFdllWgSDtHIYnB8jMBi3HGh1xZWMNTss3dJBIhnX/7Cdp8jbI09IKHZaT/7P5nCTxlhvGS342bHLp8/QhqPmasBcX6rDiXAEPcw+vQoiMgpKx1o1FWHR2JtHGrC35Ots3OigeUxKKzQNAxbhYbgPp2KXHLiCuYBSBWg6V31yaEmeifU7odLuZY3kfxAdUksfpeLG7zJZfn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(3231022)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123565025)(20161123563025)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(20161123559100)(201708071742011);SRVR:MWHPR03MB2701;BCL:0;PCL:0;RULEID:(100000803101)(100110400095)(400006);SRVR:MWHPR03MB2701; X-Forefront-PRVS: 05134F8B4F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;MWHPR03MB2701;23:MXjONTpb9nZJJHkGUhTyotRAjJYQVfDFqYH8l6W8J?= =?us-ascii?Q?3eg7ATe/XuqOYsDictzaeB12Fox8hgpmpdnBKG6W9l7PQArZyJXvLYzVLij/?= =?us-ascii?Q?NMkiePf58sHDxNuI7sB/yz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amDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2017 03:12:28.4168 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c15683b4-be61-4b36-231f-08d53c572eb2 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2701 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 716 Lines: 20 From: Hou Zhiqiang Restore the status to be compatible with legacy devices. Take Freescale eSPI boot for example, it copies (in 3 Byte addressing mode) the RCW and bootloader images from SPI flash without firing a reset signal previously, so the reboot command will fail without reseting the addressing mode of SPI flash. Hou Zhiqiang (2): mtd: spi-nor: add an API to restore the status of SPI flash chip mtd: m25p80: restore the status of SPI flash when exiting Documentation/mtd/spi-nor.txt | 3 +++ drivers/mtd/devices/m25p80.c | 9 +++++++++ drivers/mtd/spi-nor/spi-nor.c | 10 ++++++++++ include/linux/mtd/spi-nor.h | 6 ++++++ 4 files changed, 28 insertions(+) -- 2.14.1