From: "Xiangsheng Hou (侯祥胜)" <Xiangsheng.Hou@mediatek.com>
To: "miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"broonie@kernel.org" <broonie@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"gch981213@gmail.com" <gch981213@gmail.com>,
"vigneshr@ti.com" <vigneshr@ti.com>,
"richard@nod.at" <richard@nod.at>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Benliang Zhao (赵本亮)" <Benliang.Zhao@mediatek.com>,
"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Bin Zhang (章斌)" <bin.zhang@mediatek.com>
Subject: Re: [PATCH v5 01/10] spi: mtk-snfi: Change default page format to setup default setting
Date: Tue, 20 Dec 2022 02:15:05 +0000 [thread overview]
Message-ID: <b9295291171dad0a455928cdb44a8ca91782532d.camel@mediatek.com> (raw)
In-Reply-To: <5ebaf98b-a77e-3c5a-3e08-bbb0119558a2@gmail.com>
Hi Matthias,
On Mon, 2022-12-19 at 16:30 +0100, Matthias Brugger wrote:
> Thanks for your patch! There is something to improve please see
> below.
>
> On 19/12/2022 03:40, Xiangsheng Hou wrote:
> > Change default page format to setup default setting since the
> > sector
> > size 1024 on MT7986 will lead to probe fail.
> >
> > Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
> > ---
> > drivers/spi/spi-mtk-snfi.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/spi/spi-mtk-snfi.c b/drivers/spi/spi-mtk-
> > snfi.c
> > index fa8412ba20e2..719fc6f53ab1 100644
> > --- a/drivers/spi/spi-mtk-snfi.c
> > +++ b/drivers/spi/spi-mtk-snfi.c
> > @@ -1430,8 +1430,7 @@ static int mtk_snand_probe(struct
> > platform_device *pdev)
> >
> > // setup an initial page format for ops matching page_cache_op
> > template
> > // before ECC is called.
> > - ret = mtk_snand_setup_pagefmt(ms, ms->caps->sector_size,
> > - ms->caps->spare_sizes[0]);
> > + ret = mtk_snand_setup_pagefmt(ms, SZ_2K, SZ_64);
>
> Couldn't you just set sector_size in mt7986_snand_caps?
The function mtk_snand_setup_pagefmt need use page and OOB size of NAND
device to setup pagefmt.
The controller page size can support 512/1k/2k/4k..., the sector size
1k have been set in mt7986_snand_caps. However this will also lead to
fail in this function since the 1k page size will not be supported.
Just use page size 2k and OOB size 64 as default parameter since this
can be supported by all ICs with this controller.
Thanks
Xiangsheng Hou
next prev parent reply other threads:[~2022-12-20 2:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 2:40 [PATCH v5 00/10] Add MediaTek MT7986 SPI NAND and ECC support Xiangsheng Hou
2022-12-19 2:40 ` [PATCH v5 01/10] spi: mtk-snfi: Change default page format to setup default setting Xiangsheng Hou
2022-12-19 15:30 ` Matthias Brugger
2022-12-20 2:15 ` Xiangsheng Hou (侯祥胜) [this message]
2023-01-05 11:42 ` Xiangsheng Hou (侯祥胜)
2022-12-19 2:40 ` [PATCH v5 02/10] spi: mtk-snfi: Add optional nfi_hclk which is needed for MT7986 Xiangsheng Hou
2022-12-19 2:40 ` [PATCH v5 03/10] mtd: nand: ecc-mtk: Add ECC support fot MT7986 IC Xiangsheng Hou
2022-12-19 2:40 ` [PATCH v5 04/10] dt-bindings: spi: mtk-snfi: Add compatible for MT7986 Xiangsheng Hou
2022-12-19 2:40 ` [PATCH v5 05/10] spi: mtk-snfi: Add snfi sample delay and read latency adjustment Xiangsheng Hou
2022-12-19 2:40 ` [PATCH v5 06/10] dt-bindings: spi: mtk-snfi: Add read latch latency property Xiangsheng Hou
2022-12-19 15:38 ` Rob Herring
2022-12-20 1:59 ` Xiangsheng Hou (侯祥胜)
2022-12-19 2:40 ` [PATCH v5 07/10] dt-bindings: mtd: Split ECC engine with rawnand controller Xiangsheng Hou
2022-12-19 2:40 ` [PATCH v5 08/10] arm64: dts: mediatek: Fix existing NAND controller node name Xiangsheng Hou
2022-12-19 2:40 ` [PATCH v5 09/10] arm: " Xiangsheng Hou
2022-12-19 2:40 ` [PATCH v5 10/10] dt-bindings: mtd: mediatek,nand-ecc-engine: Add compatible for MT7986 Xiangsheng Hou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9295291171dad0a455928cdb44a8ca91782532d.camel@mediatek.com \
--to=xiangsheng.hou@mediatek.com \
--cc=Benliang.Zhao@mediatek.com \
--cc=bin.zhang@mediatek.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gch981213@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®