On 07/27/2016 07:57 PM, Qianyu Gong wrote: > Hi York, > >> -----Original Message----- >> From: york sun >> Sent: Wednesday, July 27, 2016 10:55 PM >> To: Qianyu Gong <qianyu.g...@nxp.com>; u-boot@lists.denx.de; Simon Glass >> <s...@chromium.org> >> Cc: Shaohui Xie <shaohui....@nxp.com>; Zhiqiang Hou <zhiqiang....@nxp.com>; >> Wenbin Song <wenbin.s...@nxp.com>; Yao Yuan <yao.y...@nxp.com>; Mingkai >> Hu <mingkai...@nxp.com>; Prabhakar Kushwaha >> <prabhakar.kushw...@nxp.com> >> Subject: Re: [PATCH 2/2] config.h: clean unused CONFIG_ENV_SPI_* if using >> driver >> model >> >> On 07/27/2016 03:00 AM, Qianyu Gong wrote: >>> >>> Hi York, >>> >>>> -----Original Message----- >>>> From: york sun >>>> Sent: Tuesday, July 26, 2016 12:26 PM >>>> To: Qianyu Gong <qianyu.g...@nxp.com>; u-boot@lists.denx.de; >>>> Prabhakar Kushwaha <prabhakar.kushw...@nxp.com>; Mingkai Hu >>>> <mingkai...@nxp.com> >>>> Cc: Shaohui Xie <shaohui....@nxp.com>; Zhiqiang Hou >>>> <zhiqiang....@nxp.com>; Wenbin Song <wenbin.s...@nxp.com> >>>> Subject: Re: [PATCH 2/2] config.h: clean unused CONFIG_ENV_SPI_* if >>>> using driver model >>>> >>>> On 07/25/2016 09:05 PM, Qianyu Gong wrote: >>>>> Hi York, >>>>> >>>>> >>>>> As the drivel model is a trend anyway, I just doubt if it is >>>>> necessary to support non-DM for the new platforms. >>>>> >>>>> In fact, we have discarded configurations for non-DM SPI such as SPI >>>>> mode related macros >>>>> >>>>> when doing LS1043A upstream. So the current configuration of LS1043A >>>>> doesn't support non-DM SPI. >>>>> >>>>> >>>>> LS1012A supports both ways but the code doesn't differentiate the >>>>> respective macros. >>>>> >>>>> The CONFIG_ENV_SPI_* are set for FMAN ucode at the beginning but I >>>>> just find that LS1012A doesn't have FMAN. So it's dead code if using >>>>> DM or just duplicated code that is the same with defines in >>>>> common/env_sf.c if using non-DM. >>>> >>>> Qianyu, >>>> >>>> If DM_SPI_FLASH should always be set, please select it from Kconfig. >>>> >>>> York >>>> >>>> >>> >>> For LS1043A, DM_SPI_FLASH is still defined in >> include/configs/ls1043a_common.h. >>> So I think it won't be affected by menuconfig. But it should have been >>> moved to >> defconfig. >>> >>> As DM_SPI_FLASH doesn't depend on any platforms as per >>> "drivers/mtd/spi/Kconfig", I can just focus on solving the issue >>> caused by deselecting DM_SPI_FLASH. I also discussed with Yuan Yao. >>> >>> So how about I adding anything in Fman Kconfig like this? >>> " >>> config SYS_QE_FW_IN_SPIFLASH >>> depends on (FSL_LAYERSCAPE && DM_SPI_FLASH) || PPC " >>> But as for the existing code, it may need more efforts. >>> >> >> I think you can add "select" for the platforms which always use >> DM_SPI_FLASH, for >> example TARGET_LS1043AQDS. >> >> Simon, >> >> Please comment if this is a good practice. >> >> York >> > > If one doesn't select DSPI/QSPI on LS1043A boards, there would be no need to > select DM_SPI_FLASH. So to some extent it's not always used, correct? >
If SPI is not always enabled, you don't need to select DM_SPI_FLASH. Just be aware, you can end up with a config in which legacy SPI enabled, but DM_SPI_FLASH not enabled, if you run menuconfig. York _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot