public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [U-boot] sf: API for spi_flash_get_sector_size
@ 2011-02-08 14:13 Richard Retanubun
  2011-02-08 14:40 ` Wolfgang Denk
  0 siblings, 1 reply; 17+ messages in thread
From: Richard Retanubun @ 2011-02-08 14:13 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-04-12  6:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08 14:13 [U-Boot] [U-boot] sf: API for spi_flash_get_sector_size Richard Retanubun
2011-02-08 14:40 ` Wolfgang Denk
2011-02-08 15:11   ` Richard Retanubun
2011-02-08 15:19     ` Wolfgang Denk
2011-02-08 15:33       ` Richard Retanubun
2011-02-09 21:16       ` [U-Boot] [PATCH] [RFC] SF: Add "sf erase offset +len" command handler Richard Retanubun
2011-02-15  9:34         ` Mike Frysinger
2011-02-16 20:27           ` [U-Boot] (no subject) Richard Retanubun
2011-02-17  5:46             ` Mike Frysinger
2011-02-16 20:27           ` [U-Boot] [PATCH 1/2] SPI: Add struct spi_flash.sector_size parameter Richard Retanubun
2011-02-16 21:00             ` Wolfgang Denk
2011-02-16 20:27           ` [U-Boot] [PATCH 2/2] cmd_sf: Add handler for +len arg for erase command Richard Retanubun
2011-02-16 21:06             ` Wolfgang Denk
2011-02-16 21:37               ` [U-Boot] [PATCH 1/2] SPI: Add struct spi_flash.sector_size parameter Richard Retanubun
2011-04-12  6:34                 ` Mike Frysinger
2011-02-16 21:39               ` [U-Boot] [PATCH 2/2] cmd_sf: Add handler for +len arg for erase command Richard Retanubun
2011-02-16 21:47             ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox