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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF188C6FD1D for ; Fri, 17 Mar 2023 03:37:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8veI3fm+7yf4PHpXylDJXwBdUL4q56tFG1kv346tFlU=; b=KkL1YU82u+E3Hl tq8H6OF9n3+pJvfYdXqqAyJU6xciyUHB1Ct0hifLWakGSeZ/hRJ3ujYIAPFe8SAuVBa2Ug1DIswpR USVtMglhzZJpvm+U6kRNdOW3NdsF8jZoTdpy2XAGy4iAIew40+08oUhNFqlOSpm+Jcgqtpb1J7SIp 0RywsNqc1HWJ4EUaMQW4+bS8L956HNBCricNwAKF5Gxg0ZNFL2KlebsNStO1yrE1Upkf0L2GkjuZx Dhm9KBL1T1uIqIehXYWX4NAp7mIV+0xtDty89gObgosFyZeZkdIzs3PA7/Z7I8vhw26yBY+99gClT Qd5KsI0B0tT7ovpWF72g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pd0tt-000och-0y; Fri, 17 Mar 2023 03:37:05 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pd0tp-000oba-16 for linux-arm-kernel@lists.infradead.org; Fri, 17 Mar 2023 03:37:02 +0000 Received: by mail-ed1-x536.google.com with SMTP id fd5so15437594edb.7 for ; Thu, 16 Mar 2023 20:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679024216; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YGVFBnLGW48ofq0f9WXStcjPontbYbsyDgiftQkwDrY=; b=p+agg5DIDwgcsDyAJ+8gsuQlSFP+Nru68efe0Dj5FU6+BVScznwGIHnFo3dYL6ynX6 OMK8JXRf+J8eehL4rh9i2aL7sW9euHElTfp99mzToPhrSRHQG7LczRGcauXRk0s2W20I GrGHFR39bJXty9QwipMcYq4ZME9fcrQ3wmw/Z6Pyn+Ner4ucCe2dfIhhCqqmZ0uW0tWB M667lLlb4nDiVV5x4GtlBnO9uL2Xc0LIfepU9JScvHJvoDjZo5xgrT3DHlaFxkoBs4N8 LoC//Po/5qOAqfExajJiPBdIkpKKFTgqyh40vWFvKub/gMM/F8L1L6ij2TlChO7Qvjkz UAPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679024216; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YGVFBnLGW48ofq0f9WXStcjPontbYbsyDgiftQkwDrY=; b=BHz/itbgsubqtwboSVP0WEM14nBRxouoVsn3oxvPd/T1a3aDDgFfNkU2T8slLB4nZM czoAF8X4ffPFdLFlJvu2+UYgOzIHsON76Wjg8nzZ7WilJ56SmXfPm/0WSQS668ynMqUZ rNAEjnmlo5c6BCrYLjgVgIXJ2zmKqRj2Qs8UzhHiLFOjB7md1/1U/GSKN+vJxQ7x2qTn NqHepofKNb0f6WQW+3Hywu/N0lUvPuJrORHXYa2IC2/+8GMlykUa37JXs/z40ieH+uh3 CgDDYCNKISpDKCzQvCsVQrSQtJIDbb6JcTZO3NDIpbeL81Hm3ObMz/WHnUfAVw3+hUdO s6Sw== X-Gm-Message-State: AO0yUKU1wB3ssp3yUXfCdrnZr3Or7Md6/SSZrQvUCtnemoS+k4aY4Z1N 69V13Lk8WOYmRJE47cVbomPZSQ== X-Google-Smtp-Source: AK7set/7DjQlJcUNOu8b96zVvsyzrTKMd38N74U0g4BAzL1RU7FhaceIaBuABEme3QBLfUqAjoe+OQ== X-Received: by 2002:a17:906:dfe6:b0:930:831f:6744 with SMTP id lc6-20020a170906dfe600b00930831f6744mr4763705ejc.45.1679024216391; Thu, 16 Mar 2023 20:36:56 -0700 (PDT) Received: from [192.168.2.107] ([79.115.63.78]) by smtp.gmail.com with ESMTPSA id cd11-20020a170906b34b00b0093009bc5825sm408050ejb.2.2023.03.16.20.36.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Mar 2023 20:36:55 -0700 (PDT) Message-ID: <431af678-9b5c-1cf5-7745-fb000366e039@linaro.org> Date: Fri, 17 Mar 2023 03:36:54 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v4 1/8] mtd: spi-nor: Introduce the concept of bank Content-Language: en-US To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Pratyush Yadav , Michael Walle , linux-mtd@lists.infradead.org Cc: Julien Su , Jaime Liao , Jaime Liao , Alvin Zhou , Thomas Petazzoni , Michal Simek , linux-arm-kernel@lists.infradead.org References: <20230201113603.293758-1-miquel.raynal@bootlin.com> <20230201113603.293758-2-miquel.raynal@bootlin.com> From: Tudor Ambarus In-Reply-To: <20230201113603.293758-2-miquel.raynal@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230316_203701_401927_F6A3AA39 X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/1/23 11:35, Miquel Raynal wrote: > diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c > index b500655f7937..3845de9c874c 100644 > --- a/drivers/mtd/spi-nor/core.c > +++ b/drivers/mtd/spi-nor/core.c > @@ -2574,7 +2574,8 @@ static void spi_nor_init_default_params(struct spi_nor *nor) > > /* Set SPI NOR sizes. */ > params->writesize = 1; > - params->size = (u64)info->sector_size * info->n_sectors; > + params->bank_size = (u64)info->sector_size * info->n_sectors; > + params->size = params->bank_size * info->n_banks; Please keep the n_sectors per flash, not per bank, you'll break the block protection support for these flashes. See the email thread on your v3 2/9. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel