Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp1163685rwo; Sat, 22 Jul 2023 07:43:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBZrw9ksgSMN9359sRsGG4w7uk9oQyXep8aLD9LMjRtbdUZVn/cB0Z7LJOZiG4QJy6OQmp X-Received: by 2002:a17:906:105d:b0:991:eb77:74e with SMTP id j29-20020a170906105d00b00991eb77074emr4354024ejj.76.1690037024471; Sat, 22 Jul 2023 07:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690037024; cv=none; d=google.com; s=arc-20160816; b=EdNlVZn+rtD1iX0fiXxBFFhZaIMpN7Q9GvOm3bJq4JAS0q4SGCucrMPhya/SpylcJ1 cQ9HVNKh9Ai/ZwKqEXYSDDQpTYCrVf1mfzkEr27ZxzH0vz5hGPI8Hq/XDvP4Jr/LBfNI YOL8wrGGJmojaBjrY53J02UcGeLUIfK7PKHYrj8mxzgvr+05Iutwao8Jf9mxB37/T61L lp9aJE0KkLywnvbExyNc/bvUYWzbRTvGnCuBQ8Q0n1tMy0m2+fY6JkS3/f451V55covL pkw2kHomSXVQsqNXjM7vYLZ5FXX/wpThcoGVEXSkK+xZnh+YSaLW8p5tk9swqDqPp/Dj pweQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:dkim-signature; bh=cY+GrMkoeu4t+Kjc7C8tGN4af1/bHwoNAXDrlL7QiTU=; fh=xl7e7rQaOK+UDc331ITHqiZIEzOWp3pk4XsngApm6lg=; b=jzNXa5WOdvkBE4aYueL7B5eRlH1PuRjw3SUUrS+xzqR/yl/2Cr0le0uwGv9nTNnb7q Ly7P6LUTQ9hbGgeSsHHWYHUbLOB1cxluQOs9ecaQ+m2uCz+n58BEWZE3lYSf5dvNLaO8 FAibwA+48rUUxXKdPP0aHh5IsDXLXMXXF2Zw2WOeD5eEwlCoVKiLo8ciTFbRLR9/3t2p rMq1CNYkRmh9GHwtfXRcImbeePiyf7nOJm5jM2RqGbAP19WEgaRJt9h1pHcQZdKPdgI2 X2fuZXO3pMP8QNKdtEkd/mTumigvGdw3Oezu3iDaWvdy6xwm/iu7OYzZXZAFo24wD5Yu kanw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=dqozFwTz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t23-20020a17090605d700b0099381745ba7si4027283ejt.878.2023.07.22.07.43.19; Sat, 22 Jul 2023 07:43:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=dqozFwTz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbjGVM41 (ORCPT + 99 others); Sat, 22 Jul 2023 08:56:27 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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