FAQ_MA35D1_ U-Boot_Fails_To_Recognize_NAND(not Winbond)

Post Reply
yhcheng3
Posts: 55
Joined: 02 Dec 2022, 10:46

26 May 2023, 17:35

Question :

U-Boot Fails to recognize NAND(not Winbond NAND)


Answer.

When using NAND S34ML08G3 on the development board, U-Boot fails to recognize it during the first boot. However, upon pressing the reset button and performing a U-Boot reset, it is able to recognize the NAND flash during the second boot. (For production purposes, the image is loaded into the NAND flash using SD boot.)

Modify the ma35d1_nand_command() function in
MA35D1_Buildroot\output\build\uboot-custom\drivers\mtd\nand\raw\ma35d1_nand.c to add ma35d1_waitfunc(mtd, chip) as follows:

Code: Select all


static void ma35d1_nand_command(struct mtd_info *mtd, unsigned int command,  int column, int page_addr)
{
	struct nand_chip *chip = mtd_to_nand(mtd);
	struct ma35d1_nand_info *nand_info = nand_get_controller_data(chip);

	writel(0x400, nand_info->reg+REG_NFI_NANDINTSTS);

	if (command == NAND_CMD_READOOB) {
		column += mtd->writesize;
		command = NAND_CMD_READ0;
	}

	switch (command) {

	case NAND_CMD_RESET:
		writel(command, nand_info->reg+REG_NFI_NANDCMD);
		ma35d1_waitfunc(mtd, chip); //add this line
		break;
...
}






#MA35D1, #NAND
.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests