[U-Boot] [PATCH v6 08/21] sf: Add INFO6 flash_info macro
Jagan Teki
jagan at openedev.com
Wed Nov 16 13:24:31 CET 2016
On Wed, Nov 16, 2016 at 11:39 AM, Siva Durga Prasad Paladugu
<siva.durga.paladugu at xilinx.com> wrote:
> Hi,
>
>> -----Original Message-----
>> From: Jagan Teki [mailto:jagan at openedev.com]
>> Sent: Wednesday, November 16, 2016 9:33 AM
>> To: u-boot at lists.denx.de
>> Cc: Jagan Teki <jagan at openedev.com>; Bin Meng <bmeng.cn at gmail.com>;
>> York Sun <york.sun at nxp.com>; Vignesh R <vigneshr at ti.com>; Mugunthan V
>> N <mugunthanvnm at ti.com>; Michal Simek <michal.simek at xilinx.com>; Siva
>> Durga Prasad Paladugu <sivadur at xilinx.com>
>> Subject: [PATCH v6 08/21] sf: Add INFO6 flash_info macro
>>
>> INFO6 is for tabulating 6 byte flash parts, Ex: S25FS256S_64K
>>
>> Cc: Bin Meng <bmeng.cn at gmail.com>
>> Cc: York Sun <york.sun at nxp.com>
>> Cc: Vignesh R <vigneshr at ti.com>
>> Cc: Mugunthan V N <mugunthanvnm at ti.com>
>> Cc: Michal Simek <michal.simek at xilinx.com>
>> Cc: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
>> Signed-off-by: Jagan Teki <jagan at openedev.com>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
>> Reviewed-by: Jagan Teki <jagan at openedev.com>
>> Tested-by: Jagan Teki <jagan at openedev.com>
>> ---
>> drivers/mtd/spi/sf_params.c | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>> diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c index
>> d46a276..d0c978e 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,
> Why cant you use macro which you defined in 07/21.
Mayn't be, SPI_FLASH_ID_MAX_LEN is 6 byte length but it may increase
in future technically INFO6 id_len shouldn't be same as MAX_LEN.
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
More information about the U-Boot
mailing list