[U-Boot] [PATCH 2/2][Boards Need to Switch DM] spi: omap3_spi: Full dm conversion

Jagan Teki jagannadh.teki at gmail.com
Wed Mar 7 04:57:54 UTC 2018


On Wed, Mar 7, 2018 at 5:46 AM, Adam Ford <aford173 at gmail.com> wrote:
> On Tue, Mar 6, 2018 at 12:03 PM, Jagan Teki <jagannadh.teki at gmail.com> wrote:
>> omap3_spi now support dt along with platform data,
>> respective boards need to switch into dm for the same.
>
> I applied both 1/2 and 2/2 patches and tested them together on omap3_logic.
>
> Without any changes to my config, this patch fails to build. That
> board has CONFIG_OMAP3_SPI=y by default.
>
> cmd/built-in.o: In function `do_spi_xfer':
> /home/aford/src/u-boot/cmd/spi.c:61: undefined reference to `spi_setup_slave'
> /home/aford/src/u-boot/cmd/spi.c:68: undefined reference to `spi_claim_bus'
> /home/aford/src/u-boot/cmd/spi.c:71: undefined reference to `spi_xfer'
> /home/aford/src/u-boot/cmd/spi.c:88: undefined reference to `spi_release_bus'
> /home/aford/src/u-boot/cmd/spi.c:90: undefined reference to `spi_free_slave'
> common/built-in.o: In function `jumptable_init':
> /home/aford/src/u-boot/common/exports.c:30: undefined reference to `spi_init'
> /home/aford/src/u-boot/common/exports.c:30: undefined reference to
> `spi_setup_slave'
> /home/aford/src/u-boot/common/exports.c:30: undefined reference to
> `spi_free_slave'
> /home/aford/src/u-boot/common/exports.c:30: undefined reference to
> `spi_claim_bus'
> /home/aford/src/u-boot/common/exports.c:30: undefined reference to
> `spi_release_bus'
> /home/aford/src/u-boot/common/exports.c:30: undefined reference to `spi_xfer'
> arm-linux-ld.bfd: BFD (GNU Binutils) 2.29.1 assertion fail elf32-arm.c:9509
> arm-linux-ld.bfd: BFD (GNU Binutils) 2.29.1 assertion fail elf32-arm.c:9509
> arm-linux-ld.bfd: BFD (GNU Binutils) 2.29.1 assertion fail elf32-arm.c:9509
> arm-linux-ld.bfd: BFD (GNU Binutils) 2.29.1 assertion fail elf32-arm.c:9509
> arm-linux-ld.bfd: BFD (GNU Binutils) 2.29.1 assertion fail elf32-arm.c:9509

This is expected, ie reason I've mentioned commit head 'Boards Need to
Switch DM'

>
> If seems to me like we at least should keep the non-DM version of the
> driver working in addition to the DM version until all the boards are
> migrated.

This migration seems not happening since from long, ie reason we
praposed deadline for migrating onto dm [1] So better to migrate
before deadline.

>
>
> Having said that, When I enabled DM_SPI and McSPI, I got the following errors:
>
>
>   CC      common/fdt_support.o
> drivers/spi/omap3_spi.c: In function ‘omap3_spi_ofdata_to_platdata’:
> drivers/spi/omap3_spi.c:537:34: error: ‘blob’ undeclared (first use in
> this function); did you mean ‘_log’?
>   plat->pin_dir = fdtdec_get_uint(blob, node, "ti,pindir-d0-out-d1-in",
>                                   ^~~~
>                                   _log
> drivers/spi/omap3_spi.c:537:34: note: each undeclared identifier is
> reported only once for each function it appears in
> drivers/spi/omap3_spi.c:537:40: error: ‘node’ undeclared (first use in
> this function); did you mean ‘ofnode’?
>   plat->pin_dir = fdtdec_get_uint(blob, node, "ti,pindir-d0-out-d1-in",
>                                         ^~~~
>                                         ofnode
> scripts/Makefile.build:280: recipe for target 'drivers/spi/omap3_spi.o' failed
> make[1]: *** [drivers/spi/omap3_spi.o] Error 1
> Makefile:1330: recipe for target 'drivers/spi' failed
>
> Any suggestions on how to proceed?

Yes, I'm sending v2 to fix these.

[1] http://u-boot.denx.narkive.com/BBRm2pZc/spi-zapping-non-dm-drivers-deadline-v2018-09


More information about the U-Boot mailing list