linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] mtd: rawnand: meson: set oob layout ops
@ 2019-03-21 12:14 Liang Yang
  2019-03-21 19:48 ` Martin Blumenstingl
  2019-04-01 15:30 ` Miquel Raynal
  0 siblings, 2 replies; 3+ messages in thread
From: Liang Yang @ 2019-03-21 12:14 UTC (permalink / raw)
  To: Boris Brezillon, linux-mtd
  Cc: Rob Herring, Hanjie Lin, Victor Wan, Jianxin Pan, Neil Armstrong,
	Martin Blumenstingl, Richard Weinberger, linux-kernel,
	Marek Vasut, devicetree, Liang Yang, Jian Hu, Kevin Hilman,
	Miquel Raynal, Carlo Caione, linux-amlogic, Brian Norris,
	David Woodhouse, linux-arm-kernel, Jerome Brunet

Specify the oob layout operation to avoid no oob scheme defined for
some nand flash.

Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
Signed-off-by: Liang Yang <liang.yang@amlogic.com>
---
 drivers/mtd/nand/raw/meson_nand.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
index 3e8aa71..a2154a2 100644
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -1183,6 +1183,8 @@ static int meson_nand_attach_chip(struct nand_chip *nand)
 		return -EINVAL;
 	}
 
+	mtd_set_ooblayout(mtd, &meson_ooblayout_ops);
+
 	ret = meson_nand_bch_mode(nand);
 	if (ret)
 		return -EINVAL;
-- 
1.9.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] mtd: rawnand: meson: set oob layout ops
  2019-03-21 12:14 [PATCH 1/1] mtd: rawnand: meson: set oob layout ops Liang Yang
@ 2019-03-21 19:48 ` Martin Blumenstingl
  2019-04-01 15:30 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Blumenstingl @ 2019-03-21 19:48 UTC (permalink / raw)
  To: Liang Yang
  Cc: Rob Herring, Hanjie Lin, Victor Wan, Jianxin Pan,
	Boris Brezillon, Richard Weinberger, Neil Armstrong,
	linux-kernel, Marek Vasut, devicetree, Jian Hu, linux-mtd,
	Kevin Hilman, Miquel Raynal, Carlo Caione, linux-amlogic,
	Brian Norris, David Woodhouse, linux-arm-kernel, Jerome Brunet

On Thu, Mar 21, 2019 at 1:14 PM Liang Yang <liang.yang@amlogic.com> wrote:
>
> Specify the oob layout operation to avoid no oob scheme defined for
> some nand flash.
>
> Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> Signed-off-by: Liang Yang <liang.yang@amlogic.com>
this patch solves the "No oob scheme defined for oobsize 1280" on my
Meson8m2 M8S board, so:
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

to give a bit of context on my Tested-by:
I tested this with my work-in-progress series and a hack to make the
kzalloc() in meson_nfc_read_buf() return an aligned address (by
allocating PAGE_SIZE instead of PER_INFO_BYTE) on my Meson8m2 M8S
board.
it's now progressing to the state where Linux tries to find the BBT
which it can't (because the vendor kernel which was used to format the
NAND flash is shipping a custom BBT format).
before this patch I couldn't get past the "No oob scheme defined for
oobsize 1280" error.


Regards
Martin

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] mtd: rawnand: meson: set oob layout ops
  2019-03-21 12:14 [PATCH 1/1] mtd: rawnand: meson: set oob layout ops Liang Yang
  2019-03-21 19:48 ` Martin Blumenstingl
@ 2019-04-01 15:30 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2019-04-01 15:30 UTC (permalink / raw)
  To: Liang Yang
  Cc: Rob Herring, Hanjie Lin, Victor Wan, Jianxin Pan, Marek Vasut,
	Martin Blumenstingl, Richard Weinberger, Neil Armstrong,
	linux-kernel, Boris Brezillon, devicetree, Jian Hu, linux-mtd,
	Kevin Hilman, Carlo Caione, linux-amlogic, Brian Norris,
	David Woodhouse, linux-arm-kernel, Jerome Brunet

Hi Liang,

Liang Yang <liang.yang@amlogic.com> wrote on Thu, 21 Mar 2019 20:14:01
+0800:

> Specify the oob layout operation to avoid no oob scheme defined for
> some nand flash.
> 
> Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> Signed-off-by: Liang Yang <liang.yang@amlogic.com>
> ---
>  drivers/mtd/nand/raw/meson_nand.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
> index 3e8aa71..a2154a2 100644
> --- a/drivers/mtd/nand/raw/meson_nand.c
> +++ b/drivers/mtd/nand/raw/meson_nand.c
> @@ -1183,6 +1183,8 @@ static int meson_nand_attach_chip(struct nand_chip *nand)
>  		return -EINVAL;
>  	}
>  
> +	mtd_set_ooblayout(mtd, &meson_ooblayout_ops);
> +
>  	ret = meson_nand_bch_mode(nand);
>  	if (ret)
>  		return -EINVAL;


Applied to git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
on nand/next.


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-01 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 12:14 [PATCH 1/1] mtd: rawnand: meson: set oob layout ops Liang Yang
2019-03-21 19:48 ` Martin Blumenstingl
2019-04-01 15:30 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).