From: Jagan Teki Date: Tue, 15 Nov 2016 07:27:52 +0000 (+0530) Subject: sf: Add INFO6 flash_info macro X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=8e492951a8b0e6fdfbf066c1d12e071a003879b7;p=u-boot.git sf: Add INFO6 flash_info macro INFO6 is for tabulating 6 byte flash parts, Ex: S25FS256S_64K Cc: Bin Meng Cc: York Sun Cc: Vignesh R Cc: Mugunthan V N Cc: Michal Simek Cc: Siva Durga Prasad Paladugu Signed-off-by: Jagan Teki Reviewed-by: Simon Glass Reviewed-by: Jagan Teki Tested-by: Jagan Teki --- diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c index d46a27654c..d0c978e926 100644 --- a/drivers/mtd/spi/sf_params.c +++ b/drivers/mtd/spi/sf_params.c @@ -27,6 +27,21 @@ .page_size = 256, \ .flags = (_flags), +#define INFO6(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \ + .id = { \ + ((_jedec_id) >> 16) & 0xff, \ + ((_jedec_id) >> 8) & 0xff, \ + (_jedec_id) & 0xff, \ + ((_ext_id) >> 16) & 0xff, \ + ((_ext_id) >> 8) & 0xff, \ + (_ext_id) & 0xff, \ + }, \ + .id_len = 6, \ + .sector_size = (_sector_size), \ + .n_sectors = (_n_sectors), \ + .page_size = 256, \ + .flags = (_flags), + /* SPI/QSPI flash device params structure */ const struct spi_flash_info spi_flash_ids[] = { #ifdef CONFIG_SPI_FLASH_ATMEL /* ATMEL */