Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86B91C433EF for ; Wed, 20 Apr 2022 06:27:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347970AbiDTGaN (ORCPT ); Wed, 20 Apr 2022 02:30:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346486AbiDTGaM (ORCPT ); Wed, 20 Apr 2022 02:30:12 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C590393F4 for ; Tue, 19 Apr 2022 23:27:27 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 23K6RH2I087766; Wed, 20 Apr 2022 01:27:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1650436037; bh=kcICsLaU+27agvzkGVtj5FT1OOdR/R0i+L5NDYQzseQ=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=JRHJ2H64Cz2nMTXtzuo1+EophJa+7WY3QNeL21RFjCECmoQ7PnQAjxTaAa3Y7nn6v 7H94EDNPZr9vvaQcbYOssiGUjWeRilKzHs3W1rCR+nEe6VXGiqwOG585E+enGxjKR6 dEY2ZeqHPHVK8tuxXLLtUcRWKHp/bKQKj91ca44w= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 23K6RHrQ044932 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 20 Apr 2022 01:27:17 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 20 Apr 2022 01:27:17 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Wed, 20 Apr 2022 01:27:17 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 23K6RGaK073295; Wed, 20 Apr 2022 01:27:16 -0500 Date: Wed, 20 Apr 2022 11:57:16 +0530 From: Pratyush Yadav To: Michael Walle CC: Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , , Subject: Re: [PATCH] mtd: spi-nor: move SECT_4K_PMC special handling Message-ID: <20220420062716.zhs3y4koirjpshqw@ti.com> References: <20220418112650.2791459-1-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220418112650.2791459-1-michael@walle.cc> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/04/22 01:26PM, Michael Walle wrote: > The SECT_4K_PMC flag will set a device specific opcode for the 4k sector > erase. Instead of handling it in the core, we can move it to a > late_init(). In that late init, loop over all erase types, look for the > 4k size and replace the opcode. > > Signed-off-by: Michael Walle > --- > Please have a closer look here. This is only compile time tested. Also > I didn't see much reason to reorder the flags. Patch looks okay to me but I would like someone to test it on the flash before I apply it. -- Regards, Pratyush Yadav Texas Instruments Inc.