[U-Boot] [PATCH v5 01/21] sf: Adopt flash table INFO macro from Linux
Jagan Teki
jagan at openedev.com
Wed Nov 16 04:16:10 CET 2016
York,
Please test again?
On Tue, Nov 8, 2016 at 10:59 PM, york sun <york.sun at nxp.com> wrote:
> On 11/07/2016 08:52 PM, york.sun at nxp.com wrote:
>> On 10/30/2016 10:47 AM, Jagan Teki wrote:
>>> INFO macro make flash table entries more adjustable like
>>> adding new flash_info attributes, update ID length bytes
>>> and so on and more over it will sync to Linux way of defining
>>> flash_info attributes.
>>>
>>> - Add JEDEC_ID
>>> - Add JEDEC_EXT macro
>>> - Add JEDEC_MFR
>>> - spi_flash_params => spi_flash_info
>>> - params => info
>>>
>>> Cc: Simon Glass <sjg at chromium.org>
>>> 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>
>>> ---
>>> drivers/mtd/spi/sandbox.c | 10 +-
>>> drivers/mtd/spi/sf_internal.h | 26 +++--
>>> drivers/mtd/spi/sf_params.c | 217
>>> ++++++++++++++++++++++--------------------
>>> drivers/mtd/spi/spi_flash.c | 119 ++++++++++++-----------
>>> include/linux/err.h | 5 +
>>> 5 files changed, 205 insertions(+), 172 deletions(-)
>>>
>>
>> I got compiling warning on the first patch (tested on top of master branch)
>>
>> 02: sf: Adopt flash table INFO macro from Linux
>> powerpc: + T1024RDB_SPIFLASH T2080QDS_SPIFLASH T1040RDB_NAND
>> B4860QDS_SRIO_PCIE_BOOT T1042RDB_PI_SPIFLASH B4860QDS
>> T1040RDB_SECURE_BOOT T1024QDS_SPIFLASH B4420QDS
>> controlcenterd_36BIT_SDCARD T2081QDS T2080QDS T4240QDS T1040D4RDB
>> T4240RDB_SDCARD T2080RDB_SDCARD T1024QDS_NAND T4240QDS_SRIO_PCIE_BOOT
>> T1024RDB_NAND T2081QDS_SPIFLASH T1040QDS_SECURE_BOOT UCP1020 T4240RDB
>> T4160QDS_NAND T1042D4RDB_SECURE_BOOT T1042RDB_SECURE_BOOT T2080RDB
>> T4240QDS_SECURE_BOOT T1024QDS T1040RDB T1042RDB_PI_NAND T2080RDB_NAND
>> T1042RDB_PI_SDCARD T1042D4RDB_NAND T2081QDS_NAND T4160QDS_SDCARD
>> T2080QDS_SDCARD T1042RDB T4160QDS_SECURE_BOOT T1040RDB_SDCARD
>> T2081QDS_SRIO_PCIE_BOOT T2080RDB_SECURE_BOOT B4860QDS_SECURE_BOOT
>> T1040QDS T1042D4RDB B4860QDS_NAND T1040QDS_DDR4 T2080QDS_SECURE_BOOT
>> T2080RDB_SPIFLASH T4240QDS_SDCARD T1024QDS_DDR4 T1040D4RDB_SDCARD
>> T1040D4RDB_SPIFLASH T1024QDS_DDR4_SECURE_BOOT T2080QDS_NAND
>> controlcenterd_36BIT_SDCARD_DEVELOP T2080QDS_SRIO_PCIE_BOOT
>> UCP1020_SPIFLASH T1040D4RDB_NAND T4160QDS T4160RDB T1024QDS_SECURE_BOOT
>> B4860QDS_SPIFLASH T1040RDB_SPIFLASH T1024RDB T4240QDS_NAND B4420QDS_NAND
>> T1040D4RDB_SECURE_BOOT T2080RDB_SRIO_PCIE_BOOT T1024RDB_SECURE_BOOT
>> T1024QDS_SDCARD T1042D4RDB_SPIFLASH T1042RDB_PI_NAND_SECURE_BOOT
>> T1042D4RDB_SDCARD T2081QDS_SDCARD T1024RDB_SDCARD T1042RDB_PI
>> B4420QDS_SPIFLASH
>> w+(T4240RDB,T1024RDB_SPIFLASH,T2080RDB_SECURE_BOOT,T2080QDS_SPIFLASH,B4860QDS_SECURE_BOOT,B4860QDS_SRIO_PCIE_BOOT,T1042RDB_PI_SPIFLASH,B4860QDS,T1024QDS_SPIFLASH,B4420QDS,controlcenterd_36BIT_SDCARD,T2081QDS,T2080QDS,T4240QDS,T1040D4RDB,T4240RDB_SDCARD,T2080RDB_SDCARD,T1024QDS_NAND,T4240QDS_SRIO_PCIE_BOOT,T1024RDB_NAND,T2081QDS_SPIFLASH,T1040QDS_SECURE_BOOT,UCP1020,T4160QDS_NAND,T1042D4RDB_SECURE_BOOT,T1042RDB_SECURE_BOOT,T2080RDB,T4240QDS_SECURE_BOOT,T2081QDS_SRIO_PCIE_BOOT,T1024QDS,T1040RDB,T1042RDB_PI_NAND,T2080RDB_NAND,T1042RDB_PI_SDCARD,T2081QDS_NAND,T4160QDS_SDCARD,T2080QDS_SDCARD,T1042RDB,T4160QDS_SECURE_BOOT,T1040RDB_SDCARD,T1040D4RDB_SPIFLASH,T1040QDS,T1042D4RDB,B4860QDS_NAND,T1040QDS_DDR4,T2080QDS_SECURE_BOOT,T2080RDB_SPIFLASH,T4240QDS_SDCARD,T1024QDS_DDR4,T1040D4RDB_SDCARD,T1024QDS_DDR4_SECURE_BOOT,T2080QDS_NAND,controlcenterd_36BIT_SDCARD_DEVELOP,T2080QDS_SRIO_PCIE_BOOT,UCP1020_SPIFLASH,T1040D4RDB_NAND,T4160QDS,T4160RDB,T1024QDS_SECURE_BOOT,B4860QDS_SPIFLASH,T1040RDB_SPIFLASH,T1024RDB,T4240QDS_NAND,B4420QDS_NAND,T1040D4RDB_SECURE_BOOT,T2080RDB_SRIO_PCIE_BOOT,T1024RDB_SECURE_BOOT,T1024QDS_SDCARD,T1042D4RDB_SPIFLASH,T1042RDB_PI_NAND_SECURE_BOOT,T1040RDB_SECURE_BOOT,T1042D4RDB_NAND,T1042D4RDB_SDCARD,T2081QDS_SDCARD,T1040RDB_NAND,T1024RDB_SDCARD,B4420QDS_SPIFLASH,T1042RDB_PI)
>> ../drivers/mtd/spi/spi_flash.c: In function 'spi_flash_scan':
>> w+(T4240RDB,T1024RDB_SPIFLASH,T2080RDB_SECURE_BOOT,T2080QDS_SPIFLASH,B4860QDS_SECURE_BOOT,B4860QDS_SRIO_PCIE_BOOT,T1042RDB_PI_SPIFLASH,B4860QDS,T1024QDS_SPIFLASH,B4420QDS,controlcenterd_36BIT_SDCARD,T2081QDS,T2080QDS,T4240QDS,T1040D4RDB,T4240RDB_SDCARD,T2080RDB_SDCARD,T1024QDS_NAND,T4240QDS_SRIO_PCIE_BOOT,T1024RDB_NAND,T2081QDS_SPIFLASH,T1040QDS_SECURE_BOOT,UCP1020,T4160QDS_NAND,T1042D4RDB_SECURE_BOOT,T1042RDB_SECURE_BOOT,T2080RDB,T4240QDS_SECURE_BOOT,T2081QDS_SRIO_PCIE_BOOT,T1024QDS,T1040RDB,T1042RDB_PI_NAND,T2080RDB_NAND,T1042RDB_PI_SDCARD,T2081QDS_NAND,T4160QDS_SDCARD,T2080QDS_SDCARD,T1042RDB,T4160QDS_SECURE_BOOT,T1040RDB_SDCARD,T1040D4RDB_SPIFLASH,T1040QDS,T1042D4RDB,B4860QDS_NAND,T1040QDS_DDR4,T2080QDS_SECURE_BOOT,T2080RDB_SPIFLASH,T4240QDS_SDCARD,T1024QDS_DDR4,T1040D4RDB_SDCARD,T1024QDS_DDR4_SECURE_BOOT,T2080QDS_NAND,controlcenterd_36BIT_SDCARD_DEVELOP,T2080QDS_SRIO_PCIE_BOOT,UCP1020_SPIFLASH,T1040D4RDB_NAND,T4160QDS,T4160RDB,T1024QDS_SECURE_BOOT,B4860QDS_SPIFLASH,T1040RDB_SPIFLASH,T1024RDB,T4240QDS_NAND,B4420QDS_NAND,T1040D4RDB_SECURE_BOOT,T2080RDB_SRIO_PCIE_BOOT,T1024RDB_SECURE_BOOT,T1024QDS_SDCARD,T1042D4RDB_SPIFLASH,T1042RDB_PI_NAND_SECURE_BOOT,T1040RDB_SECURE_BOOT,T1042D4RDB_NAND,T1042D4RDB_SDCARD,T2081QDS_SDCARD,T1040RDB_NAND,T1024RDB_SDCARD,B4420QDS_SPIFLASH,T1042RDB_PI)
>> ../drivers/mtd/spi/spi_flash.c:1043:13: warning: variable 'ext_jedec'
>> set but not used [-Wunused-but-set-variable]
>> w+(T4240RDB,T1024RDB_SPIFLASH,T2080RDB_SECURE_BOOT,T2080QDS_SPIFLASH,B4860QDS_SECURE_BOOT,B4860QDS_SRIO_PCIE_BOOT,T1042RDB_PI_SPIFLASH,B4860QDS,T1024QDS_SPIFLASH,B4420QDS,controlcenterd_36BIT_SDCARD,T2081QDS,T2080QDS,T4240QDS,T1040D4RDB,T4240RDB_SDCARD,T2080RDB_SDCARD,T1024QDS_NAND,T4240QDS_SRIO_PCIE_BOOT,T1024RDB_NAND,T2081QDS_SPIFLASH,T1040QDS_SECURE_BOOT,UCP1020,T4160QDS_NAND,T1042D4RDB_SECURE_BOOT,T1042RDB_SECURE_BOOT,T2080RDB,T4240QDS_SECURE_BOOT,T2081QDS_SRIO_PCIE_BOOT,T1024QDS,T1040RDB,T1042RDB_PI_NAND,T2080RDB_NAND,T1042RDB_PI_SDCARD,T2081QDS_NAND,T4160QDS_SDCARD,T2080QDS_SDCARD,T1042RDB,T4160QDS_SECURE_BOOT,T1040RDB_SDCARD,T1040D4RDB_SPIFLASH,T1040QDS,T1042D4RDB,B4860QDS_NAND,T1040QDS_DDR4,T2080QDS_SECURE_BOOT,T2080RDB_SPIFLASH,T4240QDS_SDCARD,T1024QDS_DDR4,T1040D4RDB_SDCARD,T1024QDS_DDR4_SECURE_BOOT,T2080QDS_NAND,controlcenterd_36BIT_SDCARD_DEVELOP,T2080QDS_SRIO_PCIE_BOOT,UCP1020_SPIFLASH,T1040D4RDB_NAND,T4160QDS,T4160RDB,T1024QDS_SECURE_BOOT,B4860QDS_SPIFLASH,T1040RDB_SPIFLASH,T1024RDB,T4240QDS_NAND,B4420QDS_NAND,T1040D4RDB_SECURE_BOOT,T2080RDB_SRIO_PCIE_BOOT,T1024RDB_SECURE_BOOT,T1024QDS_SDCARD,T1042D4RDB_SPIFLASH,T1042RDB_PI_NAND_SECURE_BOOT,T1040RDB_SECURE_BOOT,T1042D4RDB_NAND,T1042D4RDB_SDCARD,T2081QDS_SDCARD,T1040RDB_NAND,T1024RDB_SDCARD,B4420QDS_SPIFLASH,T1042RDB_PI)
>> ../drivers/mtd/spi/spi_flash.c:1043:6: warning: variable 'jedec' set but
>> not used [-Wunused-but-set-variable]
>> w+(T4240RDB,B4860QDS_SECURE_BOOT,B4860QDS_SRIO_PCIE_BOOT,B4860QDS,B4420QDS,T4240QDS,T4240RDB_SDCARD,T4240QDS_SRIO_PCIE_BOOT,T4160QDS_NAND,T4240QDS_SECURE_BOOT,T4160QDS_SDCARD,T4160QDS_SECURE_BOOT,B4860QDS_NAND,T4240QDS_SDCARD,T4160QDS,T4160RDB,B4860QDS_SPIFLASH,T4240QDS_NAND,B4420QDS_NAND,B4420QDS_SPIFLASH)
>> ../drivers/mtd/spi/spi_flash.c:1045:6: warning: 'ret' may be used
>> uninitialized in this function [-Wmaybe-uninitialized]
>
> Similar for arm
>
> 02: sf: Adopt flash table INFO macro from Linux
> aarch64: + p2371-2180 ls1046aqds_sdcard_ifc
> ls2080aqds_SECURE_BOOT ls1043aqds ls1043ardb p2571 xilinx_zynqmp_ep
> ls1046aqds_nand evb-rk3399 ls2080ardb_SECURE_BOOT ls1046aqds
> ls1043aqds_nand ls1043ardb_SECURE_BOOT ls1043aqds_lpuart ls1043ardb_nand
> ls2080aqds ls2080ardb p2371-0000 ls1043aqds_nor_ddr3
> xilinx_zynqmp_zc1751_xm016_dc2 e2220-1170 ls1043ardb_sdcard
> ls1043aqds_sdcard_ifc
> arm: + mx6sabresd_spl vf610twr_nand mx6slevk_spinor
> ls1021atwr_sdcard_qspi vf610twr mx6sxsabresd_spl mx6ul_14x14_evk
> mx6slevk_spl mx6slevk mx6sxsabreauto mx6sxsabresd mx6qsabreauto
> mx6dlsabresd mx6qpsabreauto mx6dlsabreauto mx6ul_9x9_evk ls1021atwr_qspi
> mx6qsabresd
> +(mx6sabresd_spl,ls1046aqds_sdcard_ifc,ls2080aqds_SECURE_BOOT,vf610twr_nand,ls1043aqds,ls1043ardb,mx6slevk_spinor,p2571,ls1021atwr_sdcard_qspi,vf610twr,xilinx_zynqmp_ep,ls1046aqds_nand,evb-rk3399,ls2080ardb_SECURE_BOOT,mx6sxsabresd_spl,mx6ul_14x14_evk,ls1046aqds,mx6slevk_spl,mx6slevk,mx6sxsabreauto,ls1043aqds_nand,ls1043ardb_SECURE_BOOT,ls1043aqds_lpuart,ls1043ardb_nand,ls2080aqds,mx6sxsabresd,ls2080ardb,mx6qsabreauto,mx6dlsabresd,mx6qpsabreauto,mx6dlsabreauto,p2371-0000,ls1043aqds_nor_ddr3,p2371-2180,xilinx_zynqmp_zc1751_xm016_dc2,mx6ul_9x9_evk,e2220-1170,ls1043ardb_sdcard,ls1021atwr_qspi,ls1043aqds_sdcard_ifc,mx6qsabresd)
> u16 jedec, ext_jedec;
> +(mx6sabresd_spl,ls1046aqds_sdcard_ifc,ls2080aqds_SECURE_BOOT,vf610twr_nand,ls1043aqds,ls1043ardb,mx6slevk_spinor,p2571,ls1021atwr_sdcard_qspi,vf610twr,xilinx_zynqmp_ep,ls1046aqds_nand,evb-rk3399,ls2080ardb_SECURE_BOOT,mx6sxsabresd_spl,mx6ul_14x14_evk,ls1046aqds,mx6slevk_spl,mx6slevk,mx6sxsabreauto,ls1043aqds_nand,ls1043ardb_SECURE_BOOT,ls1043aqds_lpuart,ls1043ardb_nand,ls2080aqds,mx6sxsabresd,ls2080ardb,mx6qsabreauto,mx6dlsabresd,mx6qpsabreauto,mx6dlsabreauto,p2371-0000,ls1043aqds_nor_ddr3,p2371-2180,xilinx_zynqmp_zc1751_xm016_dc2,mx6ul_9x9_evk,e2220-1170,ls1043ardb_sdcard,ls1021atwr_qspi,ls1043aqds_sdcard_ifc,mx6qsabresd)
> ^
> +(mx6sabresd_spl,ls1046aqds_sdcard_ifc,ls2080aqds_SECURE_BOOT,vf610twr_nand,ls1043aqds,ls1043ardb,mx6slevk_spinor,p2571,ls1021atwr_sdcard_qspi,vf610twr,xilinx_zynqmp_ep,ls1046aqds_nand,evb-rk3399,ls2080ardb_SECURE_BOOT,mx6sxsabresd_spl,mx6ul_14x14_evk,ls1046aqds,mx6slevk_spl,mx6slevk,mx6sxsabreauto,ls1043aqds_nand,ls1043ardb_SECURE_BOOT,ls1043aqds_lpuart,ls1043ardb_nand,ls2080aqds,mx6sxsabresd,ls2080ardb,mx6qsabreauto,mx6dlsabresd,mx6qpsabreauto,mx6dlsabreauto,p2371-0000,ls1043aqds_nor_ddr3,p2371-2180,xilinx_zynqmp_zc1751_xm016_dc2,mx6ul_9x9_evk,e2220-1170,ls1043ardb_sdcard,ls1021atwr_qspi,ls1043aqds_sdcard_ifc,mx6qsabresd)
> ^
> +(mx6sxsabresd_spl) int ret;
> w+(mx6sabresd_spl,ls1046aqds_sdcard_ifc,ls2080aqds_SECURE_BOOT,vf610twr_nand,ls1043aqds,ls1043ardb,mx6slevk_spinor,p2571,ls1021atwr_sdcard_qspi,vf610twr,xilinx_zynqmp_ep,ls1046aqds_nand,evb-rk3399,ls2080ardb_SECURE_BOOT,mx6sxsabresd_spl,mx6ul_14x14_evk,ls1046aqds,mx6slevk_spl,mx6slevk,mx6sxsabreauto,ls1043aqds_nand,ls1043ardb_SECURE_BOOT,ls1043aqds_lpuart,ls1043ardb_nand,ls2080aqds,mx6sxsabresd,ls2080ardb,mx6qsabreauto,mx6dlsabresd,mx6qpsabreauto,mx6dlsabreauto,p2371-0000,ls1043aqds_nor_ddr3,p2371-2180,xilinx_zynqmp_zc1751_xm016_dc2,mx6ul_9x9_evk,e2220-1170,ls1043ardb_sdcard,ls1021atwr_qspi,ls1043aqds_sdcard_ifc,mx6qsabresd)
> ../drivers/mtd/spi/spi_flash.c: In function ‘spi_flash_scan’:
> w+(mx6sabresd_spl,ls1046aqds_sdcard_ifc,ls2080aqds_SECURE_BOOT,vf610twr_nand,ls1043aqds,ls1043ardb,mx6slevk_spinor,p2571,ls1021atwr_sdcard_qspi,vf610twr,xilinx_zynqmp_ep,ls1046aqds_nand,evb-rk3399,ls2080ardb_SECURE_BOOT,mx6sxsabresd_spl,mx6ul_14x14_evk,ls1046aqds,mx6slevk_spl,mx6slevk,mx6sxsabreauto,ls1043aqds_nand,ls1043ardb_SECURE_BOOT,ls1043aqds_lpuart,ls1043ardb_nand,ls2080aqds,mx6sxsabresd,ls2080ardb,mx6qsabreauto,mx6dlsabresd,mx6qpsabreauto,mx6dlsabreauto,p2371-0000,ls1043aqds_nor_ddr3,p2371-2180,xilinx_zynqmp_zc1751_xm016_dc2,mx6ul_9x9_evk,e2220-1170,ls1043ardb_sdcard,ls1021atwr_qspi,ls1043aqds_sdcard_ifc,mx6qsabresd)
> ../drivers/mtd/spi/spi_flash.c:1043:13: warning: variable ‘ext_jedec’
> set but not used [-Wunused-but-set-variable]
> w+(mx6sabresd_spl,ls1046aqds_sdcard_ifc,ls2080aqds_SECURE_BOOT,vf610twr_nand,ls1043aqds,ls1043ardb,mx6slevk_spinor,p2571,ls1021atwr_sdcard_qspi,vf610twr,xilinx_zynqmp_ep,ls1046aqds_nand,evb-rk3399,ls2080ardb_SECURE_BOOT,mx6sxsabresd_spl,mx6ul_14x14_evk,ls1046aqds,mx6slevk_spl,mx6slevk,mx6sxsabreauto,ls1043aqds_nand,ls1043ardb_SECURE_BOOT,ls1043aqds_lpuart,ls1043ardb_nand,ls2080aqds,mx6sxsabresd,ls2080ardb,mx6qsabreauto,mx6dlsabresd,mx6qpsabreauto,mx6dlsabreauto,p2371-0000,ls1043aqds_nor_ddr3,p2371-2180,xilinx_zynqmp_zc1751_xm016_dc2,mx6ul_9x9_evk,e2220-1170,ls1043ardb_sdcard,ls1021atwr_qspi,ls1043aqds_sdcard_ifc,mx6qsabresd)
> ../drivers/mtd/spi/spi_flash.c:1043:6: warning: variable ‘jedec’ set but
> not used [-Wunused-but-set-variable]
> w+(mx6sxsabresd_spl) ../drivers/mtd/spi/spi_flash.c:1045:6: warning:
> ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Looks like you fix it in this patch "sf: Remove legacy idcode detection
> code" later.
>
> York
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
More information about the U-Boot
mailing list