Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752025AbdLAKGg (ORCPT ); Fri, 1 Dec 2017 05:06:36 -0500 Received: from mail-eopbgr00049.outbound.protection.outlook.com ([40.107.0.49]:14611 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751340AbdLAKGc (ORCPT ); Fri, 1 Dec 2017 05:06:32 -0500 From: "Z.q. Hou" To: Cyrille Pitchen , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "computersforpeace@gmail.com" , "dwmw2@infradead.org" , "boris.brezillon@free-electrons.com" , "marek.vasut@gmail.com" , "richard@nod.at" Subject: RE: [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash Thread-Topic: [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash Thread-Index: AQHTZQ7YcsqLTW747k+L9XiNGCA726MuOskAgAASntA= Date: Fri, 1 Dec 2017 10:06:29 +0000 Message-ID: References: <20171124100848.1828-1-Zhiqiang.Hou@nxp.com> <20171124100848.1828-3-Zhiqiang.Hou@nxp.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-originating-ip: [199.59.225.131] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM5PR0402MB2771;6:7av7206B3yDkbN7DEoYnSt0baby0K0NLw/E4ibZLvuOcUVBvyon72luqRQOVBO+o+bN6/5OfehErf20TcOLlGGlcv5zK8U/2ieAlSKPUfOJVe0RrZM3fLsSf3ApghA2NGMjURYFnNGxvWCDBf8QOIExf3rGiQXL/S4TWLaj71qwNi3KY9chnpUpzb2o24TLesyhdp7zTYfM6pzL5eUltCAf7OE0QnbXkKJs4oqtkI5Xay7oPlwcDYeMdRxZ/T7UWhUzwjmDLqmMMFQU+I94rdQr0HMa5WTLy4A0id38CbS1E5SF18IXnRbIZcbLdJYrJGSZUzsPtx/EcxS2ugdtgJBKl1OJYS/senPeIpA1sXHM=;5:cGnP3nCbK8liKSKMkD3EjZ2jY2dCCF5Q6cWVMAZnS0MXMDjUUU22hKV6gXPfvQrWe0sHuRF8gZ9fRXIDSQN8wNNoVfmGCvawdWiiBTLSIxg7dA5mT3iGxtbMjFwtOnA4BQd0dsQXgKCk89BwLVzf3dtsv5KAALFGzD4yMcqWaSo=;24:XJh09xQybOUyreRuLCk+VofhbRrRZygjlAeFWnFXCrVZAFgB2tmSLUhmoTm9xOPG+u/3iKbeedKBbIeU7gDhOZmFyrJrfQImWrLzV9tBHyM=;7:qIfY7otlfBD0xpHGWZnNicXU3QlDju9rF/4jGPRJxfYR+FAqB78aWakctvDxkBFL65xKqkQ8Zjib5dJcv1g894eQSSq3meJ5jjW3M4f/m2/sfzkYGb1UrS46v0lloCmwqoL73AMhBU+vSS+RldmIlFz/lDjivG6zsSa+Nf9g+pHQ2RDljkznMI9sPzJmMNzfhjmsZBAVipTsQvd4kECu6cfz8KT7w71ySfVM57+7RQYFOy/j88aibE9Y9UmNrrwf x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 5f1b50bc-e46a-45a6-0019-08d538a33128 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603286);SRVR:AM5PR0402MB2771; x-ms-traffictypediagnostic: AM5PR0402MB2771: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197)(258649278758335)(58145275503218); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231022)(6055026)(6041248)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123562025)(6072148)(201708071742011);SRVR:AM5PR0402MB2771;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:AM5PR0402MB2771; x-forefront-prvs: 05087F0C24 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39860400002)(346002)(366004)(376002)(199003)(13464003)(189002)(66066001)(6246003)(229853002)(106356001)(105586002)(2950100002)(14454004)(2201001)(97736004)(316002)(5660300001)(6116002)(102836003)(3846002)(55016002)(53546010)(86362001)(5250100002)(68736007)(101416001)(39060400002)(110136005)(2501003)(6436002)(2906002)(7736002)(6506006)(189998001)(305945005)(3280700002)(8936002)(99286004)(54356011)(25786009)(9686003)(33656002)(3660700001)(74316002)(2900100001)(7696005)(8676002)(81166006)(81156014)(478600001)(53936002)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0402MB2771;H:AM5PR0402MB2771.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f1b50bc-e46a-45a6-0019-08d538a33128 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2017 10:06:29.7697 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0402MB2771 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id vB1A6feR004714 Content-Length: 1426 Lines: 48 Hi Cyrille, Thanks for your comments! > -----Original Message----- > From: Cyrille Pitchen [mailto:cyrille.pitchen@wedev4u.fr] > Sent: 2017年12月1日 16:58 > To: Z.q. Hou ; linux-mtd@lists.infradead.org; > linux-kernel@vger.kernel.org; computersforpeace@gmail.com; > dwmw2@infradead.org; boris.brezillon@free-electrons.com; > marek.vasut@gmail.com; richard@nod.at > Subject: Re: [PATCH 2/2] mtd: m25p80: restore the addressing mode when > stop using the flash > > Hi Hou, > > Le 24/11/2017 à 11:08, Zhiqiang Hou a écrit : > > From: Hou Zhiqiang > > > > Add .shutdown function to restore the addressing mode in reboot > > process, and add the same operation to the .remove function. > > > > Signed-off-by: Hou Zhiqiang > > --- > > drivers/mtd/devices/m25p80.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/drivers/mtd/devices/m25p80.c > > b/drivers/mtd/devices/m25p80.c index dbe6a1de2bb8..867bd2d5a267 > 100644 > > --- a/drivers/mtd/devices/m25p80.c > > +++ b/drivers/mtd/devices/m25p80.c > > @@ -307,10 +307,17 @@ static int m25p_remove(struct spi_device *spi) > > { > > struct m25p *flash = spi_get_drvdata(spi); > > > > + spi_nor_restore_addr_mode(&flash->spi_nor); > > maybe add a new line here. > > Otherwise, this looks good :) Yes, will add in next version, thanks a lot for the suggestion! Thanks, Zhiqiang