[U-Boot] socfpga 2016.05, CV socdk Rev E1, SPL and u-boot fail when booting from QSPI

Pavel Machek pavel at denx.de
Wed Jun 29 09:03:23 CEST 2016


Hi!

> > We don't support quad mode in U-Boot . You mean not entering Quad mode
> > in Linux ?
> > 
> 
> Nope, there seems to be quad support in u-boot, from spi_flash.c (my patched version):
> 
> #ifndef CONFIG_SPL_BUILD
> 	/* Look for the fastest read cmd */
> 	cmd = fls(params->e_rd_cmd & spi->mode_rx);
> 	if (cmd) {
> 		cmd = spi_read_cmds_array[cmd - 1];
> 		flash->read_cmd = cmd;
> 	} else {
> #endif	
> 		/* Go for default supported read cmd */
> 		flash->read_cmd = CMD_READ_ARRAY_FAST;
> #ifndef CONFIG_SPL_BUILD		
> 	}
> 
> 	/* Not require to look for fastest only two write cmds yet */
> 	if (params->flags & WR_QPP && spi->mode & SPI_TX_QUAD)
> 		flash->write_cmd = CMD_QUAD_PAGE_PROGRAM;
> 	else
> #endif	
> 		/* Go for default supported write cmd */
> 		flash->write_cmd = CMD_PAGE_PROGRAM;
> 
> 	/* Set the quad enable bit - only for quad commands */
> 	if ((flash->read_cmd == CMD_READ_QUAD_OUTPUT_FAST) ||
> 	    (flash->read_cmd == CMD_READ_QUAD_IO_FAST) ||
> 	    (flash->write_cmd == CMD_QUAD_PAGE_PROGRAM)) {
> 		ret = set_quad_mode(flash, idcode[0]);
> 		if (ret) {
> 			debug("SF: Fail to set QEB for %02x\n", idcode[0]);
> 			return -EINVAL;
> 		}
> 	}
> 
> So there is a call to set_quad_mode that prevented the SPL to work
> in vanilla 2016.05.

Just for the record, I seen similar problems on is1 board, and they
also somehow magically went away.

One possibility was that SPL was too big, and the quad spi probing
pushed it over the limits.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


More information about the U-Boot mailing list