From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Retanubun Date: Tue, 8 Feb 2011 09:13:02 -0500 Subject: [U-Boot] [U-boot] sf: API for spi_flash_get_sector_size Message-ID: <4D514F6E.6040101@RuggedCom.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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