Dear Richard Retanubun, In message <4d514f6e.6040...@ruggedcom.com> you wrote: > > When calling spi_flash_erase, which eventually calls stmicro_erase, one must > do so while knowing > what the sector_size is of the flash. Is there a recommened API to getting > this from struct stmicro_spi_flash_params?
Why would you need to know the sector size? To align your erase command accordingly? I think you are taking the wrong approach here. Look at how NOR flash is handled: we don't need to know the sector sizes there either. Instead we support the format "+N" (often used as "+${fileszize}") which will _internally_ round up N to match the next erase block boundary. Do the same for SPI flash. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The first thing we do is kill all the lawyers. (Shakespeare. II Henry VI, Act IV, scene ii) _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot