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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66963EB64DA for ; Sat, 22 Jul 2023 12:58:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230011AbjGVM42 (ORCPT ); Sat, 22 Jul 2023 08:56:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjGVM4Z (ORCPT ); Sat, 22 Jul 2023 08:56:25 -0400 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 978E326AD for ; Sat, 22 Jul 2023 05:56:23 -0700 (PDT) Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 25D8ED5D; Sat, 22 Jul 2023 14:56:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1690030581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cY+GrMkoeu4t+Kjc7C8tGN4af1/bHwoNAXDrlL7QiTU=; b=dqozFwTzC3vGF8iiG+UQvWXSZGvdG1SK+BuYvJuHHFmGFXqp6+iEjkd9H0rSKfOTPF+DTC R6tK7HAGRu0XUOnGk9/aCkcaG/b9E5+jC703XG8TNtpr0+ie2D8ADJ2yFFfrCqSdzVs3xV bkOeQnqd5XN1/EMG/TLjdjhGd0yEtnUS1SGsHT2cYBgIppqW8aetwPMiuQXhSsQj2qD0pB wOiHgPRCRaULrYVQbrOyC3bH+/cw/8leNzCMViX6q+GjLMrXzZng3JZpzKYJxSgG26tSab fLzoJ6XZ2+EvyTd0QfxS4rxCbQ/fo8GYkF54TmlGGk8t8iqqLUw4t02a3KGgUA== MIME-Version: 1.0 Date: Sat, 22 Jul 2023 14:56:20 +0200 From: Michael Walle To: Tudor Ambarus Cc: tkuw584924@gmail.com, takahiro.kuwano@infineon.com, pratyush@kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, bacem.daassi@infineon.com, miquel.raynal@bootlin.com, richard@nod.at, Tudor Ambarus Subject: Re: [PATCH] mtd: spi-nor: let SFDP determine the flash and sector size In-Reply-To: <20230722045901.9872-1-tudor.ambarus@linaro.org> References: <20230722045901.9872-1-tudor.ambarus@linaro.org> Message-ID: <56b679ea1b2424a55a8dc390ba23e7af@walle.cc> X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2023-07-22 06:59, schrieb Tudor Ambarus: > sector_size is used to determine the flash size and the erase size in > case of uniform erase. n_sectors is used to determine the flash_size. > But the flash size and the erase sizes are determined when parsing > SFDP, > let SFDP determine them. Great! I have a similar patch in my preparation for the flash info cleanup, but for all the flashes. The flash size is overwritten if PARSE_SFDP is set anyway. So that's fine. The sector_size is used for the erase ops and the BP locking. The erase ops should be initialized with the BFPT, too. So whats left is the BP locking, which is just used for gd25q256. For now we'd need to leave the sector_size there. Would you also drop the size and sector size for all other PARSE_SFDP flashes? In any case: Reviewed-by: Michael Walle -michael