* [U-Boot] [PATCH] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT
@ 2018-12-30 16:11 Adam Ford
2019-01-03 15:52 ` Stefan Agner
2019-01-30 8:57 ` [U-Boot] " sbabic at denx.de
0 siblings, 2 replies; 4+ messages in thread
From: Adam Ford @ 2018-12-30 16:11 UTC (permalink / raw)
To: u-boot
The initialization function calls a nand_chip.scan_bbt(mtd) but
scan_bbt is never initialized resulting in an undefined function
pointer. This will direct the function pointer to nand_default_bbt
defined in the same file.
Signed-off-by: Adam Ford <aford173@gmail.com>
diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index 2d7bbe83cc..c628f3adec 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -185,6 +185,7 @@ static int mxs_nand_init(void)
mtd = nand_to_mtd(&nand_chip);
/* set mtd functions */
nand_chip.cmdfunc = mxs_nand_command;
+ nand_chip.scan_bbt = nand_default_bbt;
nand_chip.numchips = 1;
/* identify flash device */
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT
2018-12-30 16:11 [U-Boot] [PATCH] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT Adam Ford
@ 2019-01-03 15:52 ` Stefan Agner
2019-02-02 15:11 ` Jörg Krause
2019-01-30 8:57 ` [U-Boot] " sbabic at denx.de
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Agner @ 2019-01-03 15:52 UTC (permalink / raw)
To: u-boot
On 30.12.18 17:11, Adam Ford wrote:
> The initialization function calls a nand_chip.scan_bbt(mtd) but
> scan_bbt is never initialized resulting in an undefined function
> pointer. This will direct the function pointer to nand_default_bbt
> defined in the same file.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
Seems sensible
Acked-by: Stefan Agner <stefan.agner@toradex.com>
>
> diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
> index 2d7bbe83cc..c628f3adec 100644
> --- a/drivers/mtd/nand/raw/mxs_nand_spl.c
> +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
> @@ -185,6 +185,7 @@ static int mxs_nand_init(void)
> mtd = nand_to_mtd(&nand_chip);
> /* set mtd functions */
> nand_chip.cmdfunc = mxs_nand_command;
> + nand_chip.scan_bbt = nand_default_bbt;
> nand_chip.numchips = 1;
>
> /* identify flash device */
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT
2018-12-30 16:11 [U-Boot] [PATCH] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT Adam Ford
2019-01-03 15:52 ` Stefan Agner
@ 2019-01-30 8:57 ` sbabic at denx.de
1 sibling, 0 replies; 4+ messages in thread
From: sbabic at denx.de @ 2019-01-30 8:57 UTC (permalink / raw)
To: u-boot
> The initialization function calls a nand_chip.scan_bbt(mtd) but
> scan_bbt is never initialized resulting in an undefined function
> pointer. This will direct the function pointer to nand_default_bbt
> defined in the same file.
> Signed-off-by: Adam Ford <aford173@gmail.com>
> Acked-by: Stefan Agner <stefan.agner@toradex.com>
> diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
> index 2d7bbe83cc..c628f3adec 100644
> --- a/drivers/mtd/nand/raw/mxs_nand_spl.c
> +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
> @@ -185,6 +185,7 @@ static int mxs_nand_init(void)
> mtd = nand_to_mtd(&nand_chip);
> /* set mtd functions */
> nand_chip.cmdfunc = mxs_nand_command;
> + nand_chip.scan_bbt = nand_default_bbt;
> nand_chip.numchips = 1;
>
> /* identify flash device */
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT
2019-01-03 15:52 ` Stefan Agner
@ 2019-02-02 15:11 ` Jörg Krause
0 siblings, 0 replies; 4+ messages in thread
From: Jörg Krause @ 2019-02-02 15:11 UTC (permalink / raw)
To: u-boot
On Thu, 2019-01-03 at 15:52 +0000, Stefan Agner wrote:
> On 30.12.18 17:11, Adam Ford wrote:
> > The initialization function calls a nand_chip.scan_bbt(mtd) but
> > scan_bbt is never initialized resulting in an undefined function
> > pointer. This will direct the function pointer to nand_default_bbt
> > defined in the same file.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> Seems sensible
>
> Acked-by: Stefan Agner <stefan.agner@toradex.com>
Fixes crashing NAND SPL loader on my i.MX6ULL board, which was
introduced in commit 5346c31e305a37d39f535cc0d5ae87d8b7e81230 and is
present in U-Boot since version 2018.07.
Tested on a custom i.MX6ULL board with a Micron NAND flash.
Tested-by: Jörg Krause <joerg.krause@embedded.rocks>
>
> > diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
> > index 2d7bbe83cc..c628f3adec 100644
> > --- a/drivers/mtd/nand/raw/mxs_nand_spl.c
> > +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
> > @@ -185,6 +185,7 @@ static int mxs_nand_init(void)
> > mtd = nand_to_mtd(&nand_chip);
> > /* set mtd functions */
> > nand_chip.cmdfunc = mxs_nand_command;
> > + nand_chip.scan_bbt = nand_default_bbt;
> > nand_chip.numchips = 1;
> >
> > /* identify flash device */
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-02 15:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-30 16:11 [U-Boot] [PATCH] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT Adam Ford
2019-01-03 15:52 ` Stefan Agner
2019-02-02 15:11 ` Jörg Krause
2019-01-30 8:57 ` [U-Boot] " sbabic at denx.de
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.