mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
sf: probe: Fix quad bit set path
Currently, flash quad bit is set in "spi_flash_validate_params" and later at the end in the same api, we write 0 to status register for few flashes, thereby overriding the quad bit set. This fix moves the quad bit setting outside this api in "spi_flash_probe_slave" Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
This commit is contained in:
parent
c1c0dd2644
commit
1f436a6ddf
1 changed files with 10 additions and 10 deletions
|
@ -197,16 +197,6 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi,
|
||||||
/* Go for default supported write cmd */
|
/* Go for default supported write cmd */
|
||||||
flash->write_cmd = CMD_PAGE_PROGRAM;
|
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)) {
|
|
||||||
if (spi_flash_set_qeb(flash, idcode[0])) {
|
|
||||||
debug("SF: Fail to set QEB for %02x\n", idcode[0]);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Read dummy_byte: dummy byte is determined based on the
|
/* Read dummy_byte: dummy byte is determined based on the
|
||||||
* dummy cycles of a particular command.
|
* dummy cycles of a particular command.
|
||||||
* Fast commands - dummy_byte = dummy_cycles/8
|
* Fast commands - dummy_byte = dummy_cycles/8
|
||||||
|
@ -327,6 +317,16 @@ static struct spi_flash *spi_flash_probe_slave(struct spi_slave *spi)
|
||||||
if (!flash)
|
if (!flash)
|
||||||
goto err_read_id;
|
goto err_read_id;
|
||||||
|
|
||||||
|
/* 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)) {
|
||||||
|
if (spi_flash_set_qeb(flash, idcode[0])) {
|
||||||
|
debug("SF: Fail to set QEB for %02x\n", idcode[0]);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_OF_CONTROL
|
#ifdef CONFIG_OF_CONTROL
|
||||||
if (spi_flash_decode_fdt(gd->fdt_blob, flash)) {
|
if (spi_flash_decode_fdt(gd->fdt_blob, flash)) {
|
||||||
debug("SF: FDT decode error\n");
|
debug("SF: FDT decode error\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue