On Fri, Apr 5, 2019 at 2:24 PM Rajat Srivastava <rajat.srivast...@nxp.com> wrote: > > Incorporate write enable and status check in the write data > function itself. > > Formerly, Write data function used to break the data to be > written into smaller chunks and used to send the smaller > chunks without write enable or status check for every iteration. > > Signed-off-by: Rajat Srivastava <rajat.srivast...@nxp.com> > --- > While writing any data to a SPI flash every write transaction > shall be preceded by a WRITE_ENABLE command and shall be > followed by a READ_STATUS process (to check if the flash is > not busy). > This sequence can be roughly represented as: > 1. write_enable //issue write enable command > 2. execute_write_operation //write data to flash or register > 3. spi_nor_wait_till_ready //read status of flash > > The current framework has two types of write operation: > 1. write to register (nor->write_reg) > 2. write data to flash memory (nor->write) > > There seems to be an issue in writing data to flash memory for which > the framework uses spi_nor_write_data() function. > Before every call to spi_nor_write_data() function the framework > sends a WRITE_ENABLE command and later checks if the flash is busy. > However, the spi_nor_write_data() function which executes the data > write to flash, breaks the data into smaller chunks. For all of > these small transactions there is only a single WRITE_ENABLE > command issued and a single check made for status, which breaks > the write operation. Only the first chunk of the whole data is > successfully written on to the flash.
Can you point me exactly as far as I know the framework is following as expected, the spi-nor calls (from Linux sync) are preparing the write by claiming the bus and indeed it will call the MTD operations. The mtd ops where you can see write_enable, transfer and wait_till_ready (mtd->_write). _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot