[U-Boot] [U-boot] sf: API for spi_flash_get_sector_size

Richard Retanubun RichardRetanubun at ruggedcom.com
Tue Feb 8 15:13:02 CET 2011


Hello,

I am working on hooks to build into my board to allow for SPI flash (STMicro M25P40 and M25P16) reflash.
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?

There are things like the "to_stmicro_spi_flash" #define in stmicro.c, but that is private.

Will adding this API be okay?

int spi_flash_get_sector_size(struct spi_flash *sf) that will simply return the sector_size number or an errno.

thanks for everyone's time

- Richard Retanubun


More information about the U-Boot mailing list