Skip to content

Commit d713794

Browse files
committed
HSD #15014302485-2: drivers: nand: Initialize struct nand timings
This patch is to initialize struct nand timings by binding it to correct chip variable defined earlier. Previously, calling memset without initialization causes memory corruption responsible for warm reset. Signed-off-by: Dinesh Maniyam <[email protected]>
1 parent c14a0f0 commit d713794

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/mtd/nand/raw/cadence_nand.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,8 +1514,9 @@ static int cadence_setup_data_interface(struct mtd_info *mtd, int chipnr,
15141514
const struct nand_data_interface *conf)
15151515
{
15161516
struct cadence_nand_info *cadence = mtd_to_cadence(mtd);
1517+
struct cdns_nand_chip *cdns_chip = to_cdns_nand_chip(mtd_to_nand(mtd));
15171518
const struct nand_sdr_timings *sdr;
1518-
struct cadence_nand_timings *t = NULL;
1519+
struct cadence_nand_timings *t = &cdns_chip->timings;
15191520
u32 reg;
15201521
u32 board_delay = cadence->board_delay;
15211522
u32 clk_period = DIV_ROUND_DOWN_ULL(1000000000000ULL,

0 commit comments

Comments
 (0)