Hi,simon Thank you for your replay!
> -----Original Message----- > From: Simon Glass <s...@chromium.org> > Sent: 2019年4月25日 7:59 > To: Chuanhua Han <chuanhua....@nxp.com> > Cc: eugen.hris...@microchip.com; Ruchika Gupta <ruchika.gu...@nxp.com>; > Shengzhou Liu <shengzhou....@nxp.com>; tr...@konsulko.com; Prabhakar > Kushwaha <prabhakar.kushw...@nxp.com>; u-boot@lists.denx.de; > simon.k.r.goldschm...@gmail.com; ma...@denx.de; s...@denx.de; > kever.y...@rock-chips.com; alex.kier...@gmail.com > Subject: [EXT] Re: the dm of SPL does not support very well on spiboot > > Caution: EXT Email > > Hi Chuanhua, > > On Sun, 21 Apr 2019 at 09:00, Chuanhua Han <chuanhua....@nxp.com> > wrote: > > > > Hi,all > > > > > > > > 1. When I tested and compiled some spiboot boards, I found that the > board compilation of these spiflash boot configurations failed. > > > > These boards all support the dm mode of spl, and the boot mode used is > spiboot. > > > > Here is the board configuration I compiled: > > > > > > > > configs/sama5d2_xplained_spiflash_defconfig > > > > configs/sama5d3xek_spiflash_defconfig > > > > configs/sama5d4_xplained_spiflash_defconfig > > > > configs/sama5d4ek_spiflash_defconfig > > > > > > > > eg: > > > > sama5d4ek_spiflash_defconfig > > > > > > > > CC spl/drivers/clk/at91/clk-master.o > > > > drivers/spi/spi.c: In function ‘spi_do_alloc_slave’: > > > > CC spl/lib/libfdt/fdt_ro.o > > > > CC spl/lib/libfdt/fdt_region.o > > > > drivers/spi/spi.c:34:8: error: ‘struct spi_slave’ has no member named > ‘bus’ > > > > slave->bus = bus; > > > > ^~ > > > > drivers/spi/spi.c:35:8: error: ‘struct spi_slave’ has no member named ‘cs’ > > > > slave->cs = cs; > > > > ^~ > > > > scripts/Makefile.build:278: recipe for target 'spl/drivers/spi/spi.o' > > failed > > > > > > > > So far there seems to be no spiboot board that compiles successfully and > works properly. > > > > > > > > I would like to know how to configure uboot in SPL using dm spiboot to > ensure normal compilation. > > > > > > > > =================== > > > > > > > > 2. When I compile d with T2080QDS_SPIFLASH_defconfig, a similar > error message appears. > > > > I have included the following options in the configuration file: > > > > CONFIG_DM_SPI=y > > > > CONFIG_DM_SPI_FLASH=y > > > > > > > > The following is the error log: > > > > $ make T2080QDS_SPIFLASH_defconfig&&make -j32 all > > > > HOSTCC scripts/basic/fixdep > > > > HOSTCC scripts/kconfig/conf.o > > > > … > > > > LD spl/lib/built-in.o > > > > LD spl/u-boot-spl > > > > env/built-in.o: In function `setup_flash_device': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/env/sf.c:60: undefined reference to > `spi_flash_probe_bus_cs' > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/env/sf.c:68: undefined reference to > `dev_get_uclass_priv' > > > > env/built-in.o: In function `spi_flash_read': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/include/spi_flash.h:118: undefined > reference to `spi_flash_read_dm' > > > > env/built-in.o: In function `env_sf_load': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/env/sf.c:317: undefined reference to > `spi_flash_free' > > > > drivers/built-in.o: In function `fsl_spi_spl_load_image': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/mtd/spi/fsl_espi_spl.c:18: > undefined reference to `spi_flash_probe' > > > > drivers/built-in.o: In function `spi_flash_read': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/include/spi_flash.h:118: undefined > reference to `spi_flash_read_dm' > > > > drivers/built-in.o: In function `fsl_spi_boot': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/mtd/spi/fsl_espi_spl.c:44: > undefined reference to `spi_flash_probe' > > > > drivers/built-in.o: In function `spi_flash_read': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/include/spi_flash.h:118: undefined > reference to `spi_flash_read_dm' > > > > drivers/built-in.o: In function `spi_flash_std_write': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/mtd/spi/sf_probe.c:113: > undefined reference to `dev_get_uclass_priv' > > > > drivers/built-in.o: In function `spi_flash_std_read': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/mtd/spi/sf_probe.c:103: > undefined reference to `dev_get_uclass_priv' > > > > drivers/built-in.o: In function `spi_flash_std_get_sw_write_prot': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/mtd/spi/sf_probe.c:140: > undefined reference to `dev_get_uclass_priv' > > > > drivers/built-in.o: In function `spi_flash_std_erase': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/mtd/spi/sf_probe.c:122: > undefined reference to `dev_get_uclass_priv' > > > > drivers/built-in.o: In function `spi_flash_std_probe': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/mtd/spi/sf_probe.c:147: > undefined reference to `dev_get_parent_priv' > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/mtd/spi/sf_probe.c:148: > undefined reference to `dev_get_parent_platdata' > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/mtd/spi/sf_probe.c:151: > undefined reference to `dev_get_uclass_priv' > > > > scripts/Makefile.spl:384: recipe for target 'spl/u-boot-spl' failed > > > > make[1]: *** [spl/u-boot-spl] Error 1 > > > > Makefile:1649: recipe for target 'spl/u-boot-spl' failed > > > > make: *** [spl/u-boot-spl] Error 2 > > > > > > > > So I added the following two options to solve the above error: > > > > CONFIG_SPL_DM=y > > > > CONFIG_SPL_OF_CONTROL=y > > > > > > > > > > > > But it brings new mistakes: > > > > LD spl/drivers/built-in.o > > > > LD spl/lib/built-in.o > > > > LD spl/u-boot-spl > > > > drivers/built-in.o: In function `blk_post_probe': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/drivers/block/blk-uclass.c:645: > undefined reference to `part_init' > > > > scripts/Makefile.spl:384: recipe for target 'spl/u-boot-spl' failed > > > > make[1]: *** [spl/u-boot-spl] Error 1 > > > > Makefile:1649: recipe for target 'spl/u-boot-spl' failed > > > > make: *** [spl/u-boot-spl] Error 2 > > > > > > > > The following options have been added for the current error: > > > > # CONFIG_SPL_BLK is not set > > > > > > > > At this time, the compiler passes, but spiboot cannot be performed on the > spi-flash, uboot cannot be started. > > > > > > > > I tried to open the following options: > > > > CONFIG_SPL_FRAMEWORK=y > > > > Delete the following options: > > > > -# CONFIG_SPL_BLK is not set > > > > > > > > Multiple definitions of error were reported: > > > > LD spl/common/spl/built-in.o > > > > LD spl/disk/built-in.o > > > > LD spl/lib/built-in.o > > > > LD spl/u-boot-spl > > > > common/spl/built-in.o: In function `board_init_r': > > > > /home/hanch/DSPI/u-boot-fsl-qoriq/common/spl/spl.c:567: multiple > definition of `board_init_r' > > > > board/freescale/t208xqds/built-in.o:/home/hanch/DSPI/u-boot-fsl-qoriq/ > > board/freescale/t208xqds/spl.c:97: first defined here > > Your board doesn't use the SPL framework, which is not good. It should be > updated. Yes ,boards really shouldn't use the SPL framework, I've updated it > > > > > scripts/Makefile.spl:384: recipe for target 'spl/u-boot-spl' failed > > > > make[1]: *** [spl/u-boot-spl] Error 1 > > > > Makefile:1649: recipe for target 'spl/u-boot-spl' failed > > > > make: *** [spl/u-boot-spl] Error 2 > > > > > > > > Then I guess whether the dm of SPL does not support very well on spiboot. I > hope you can help. > > I think you have solved the problems with DM, and just need to figure out the > SPL framework issue. Yes , I have solved the problem of SPL and have made upstream for review,thank you > > > > > Looking forward to your reply, thank you very much!!! > > Regards, > Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot