Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752212AbdLEFwN (ORCPT ); Tue, 5 Dec 2017 00:52:13 -0500 Received: from mail-sn1nam02on0080.outbound.protection.outlook.com ([104.47.36.80]:23488 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751230AbdLEFwL (ORCPT ); Tue, 5 Dec 2017 00:52:11 -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: [PATCHv2 0/2] mtd: m25p80: restore the addressing mode when stop using the flash Date: Tue, 5 Dec 2017 13:33:20 +0800 Message-ID: <20171205053322.35823-1-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.14.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131569267287221027;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(7966004)(39380400002)(376002)(346002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(97736004)(356003)(189998001)(8936002)(8676002)(81166006)(81156014)(68736007)(305945005)(5660300001)(104016004)(48376002)(51416003)(50226002)(498600001)(72206003)(36756003)(50466002)(1076002)(4326008)(39060400002)(2906002)(8656006)(6666003)(85426001)(110136005)(86362001)(16586007)(316002)(2201001)(47776003)(105606002)(77096006)(53936002)(106466001)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR03MB2358;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD029;1:FW8MLe4Y3Y/nYvSX2umMY+R1vme/DSP4bmrGL1YCxU5ovjbB5J9m4XXabHZS5lSGGue9fOKIpCCgDAJE1sYUvF21r+Iq754STvjr0cI5+ahux3gkTPlK1qzKA0gBDKsz MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e3fc0b4-1ece-4553-6323-08d53ba4527a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603286);SRVR:CO2PR03MB2358; X-Microsoft-Exchange-Diagnostics: 1;CO2PR03MB2358;3:Rcz72IWpmwfAlSwaYM6v+TdCLsY2whuNv/EdAPnfuUSrDdAeBQ7iyAzzSF/5lD3v/cAYZAQOxtIndaG3vr1VM2CsPgKhkcYKrWe2Qonb+c9bWXMj0Pe7/qKssIRItVuSjXHvnt8TmkdpHkC60n06dOYNrGcfChIFWhajKaEx6MjZtpAQoCXrsl/ikZcMEcubJOSU1yCy4JVDy7uc5OKjwL+9uzJ9tOWRYnEg9WGKB/knmHg97B88nj+xpZqeMa+51TuBnUHtUpafDbvsL9R485yuZAqY0MQiKU3ZtIX5GoZIt2tVNvdK9W1m2hHy679dF1JGefpo7f3qdiS02TUXcblH+3C4yIy0Mb1RnaDcA2g=;25:HhLldP5TkLhvBlKFVD8aBP1HrG7HAq+4HNptJh9BTrxWerK65yWEefiWm3ce5J9WqczQ+S1rI8wKWSagAoQRz2a/EbzF4Lu3zGcisGthJAWZkAUK/nhUFZIYbU3z3x+TLwg4jmQfWqKC7NTLmiDmvDEb1BBo5Z8MCoYvE2UNg7xN7hGGG/4MowfrlCIYQLSij24STTyOX4DpjnUAcXj6XYaCzii8ivGoQC2/mIYqfU3eWpJIP1XXtMTfn73nGWrl6USEanalAPRI2RHma5xNOJJRgVRVi0DbJ25FpBs5L46Ao4WhxyZL3txwDaQImcq20p9W9B2/v3skz5jwMJ0bFw== X-MS-TrafficTypeDiagnostic: CO2PR03MB2358: X-Microsoft-Exchange-Diagnostics: 1;CO2PR03MB2358;31:sbBW8Z/BjE28HAw86FKlIEeYYQfuUftsLvO+lB/q+K4F2O2/6/JPVNkOG3sbICGQVqaLN9rMFTeSPbHq/T4n9m9s9ne0EOtH4gl8QBbaoi1rO6haS8ekyDCdrAqBF1SNsf5m8mkO1prgtqrb5drPpI5ohkSnAJ7VshUt7gHJe+SSHU0/+N0L5NCoIWRwF49Wp0DbOKzSHPeOIsyTsqlVRJRPwC+dVYK9CC4fqoDdHE4=;4:ikUAAzSJw1U+ZlavxTf4EctV+5W5cUPSSPq9ojjBCWlJm3HlXSN+QitV4gtg4AFlyL+VZF34Sb1Bvz1Yq12CXkdOM9UFxDDbbGIt6lWZ7F+fLUQ7xRSHeY6uFbd55zeke0XKH0bo28kVRIAhlb8U+GfBKkphej7Brq3MGAhP7G5KWBVVrCkxg6PMyxCXlpfaUtsryBy5G4QazsZzWWI5w1MjRYXLOD/OeB61vwiaRlRMjUWdYdQwpl+Kl6MCB2n0hT/Uh47EW6zEHTabiG5Mn1IzgwjDvv7Vy26rSVj7WYPemy+/Tqf31fSQ+iJPtDzu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(5005006)(8121501046)(3231022)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123565025)(20161123559100)(20161123561025)(20161123556025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(201708071742011);SRVR:CO2PR03MB2358;BCL:0;PCL:0;RULEID:(100000803101)(100110400095)(400006);SRVR:CO2PR03MB2358; X-Forefront-PRVS: 0512CC5201 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO2PR03MB2358;23:l3VZq9Hf6t6P8F2huSkeQ6O6uiSAidENF8xs61LcZ?= =?us-ascii?Q?0I1n6WcCsGo8tt1Ag692zf07Nl14yV6vWw/6HZmJxUh2AqOpW95AZ4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86nHBMqXsYEY0NwfI4JG1CPggQ7nbjpRzgRZe6fwZhP3kZvgNA7sV/X1ZKhF3UH8SHD0/+X4/7iGrKHfpyebC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2017 05:52:08.5661 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e3fc0b4-1ece-4553-6323-08d53ba4527a 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: CO2PR03MB2358 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 693 Lines: 20 From: Hou Zhiqiang To be compatible with legacy device, reset the addressing mode to the default mode. Such as Freescale eSPI boot, it copies the 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 stop using it 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