[U-Boot] SPI driver convert to Driver Model

Simon Glass sjg at chromium.org
Mon Jan 26 13:28:28 CET 2015


Hi,

On 25 January 2015 at 20:44, Haikun.Wang at freescale.com
<Haikun.Wang at freescale.com> wrote:
> Hi,
>
> My driver should support ls1021aqds, ls1021atwr, mcf5445x, mcf5227x, mcf52x2.

Please avoid top-posting.

The first one at least supports generic board. It doesn't look like
mcf5445x does though, so you should move that over ASAP (the deadline
has actually passed). There may be pending patches I don't know about.
Once you do that you can use drive model.

For device tree you can see a PowerPC conversion at u-boot-dm branch ppc-working

http://git.denx.de/?p=u-boot/u-boot-dm.git;a=shortlog;h=refs/heads/ppc-working

This should help you get it running on m68k. Sorry there are several
patches there that don't relate to this. These ones seem relevant.

1a83894 powerpc: ppc4xx: Use CONFIG_OF_CONTROL for canyonlands boards
d70d614 powerpc: ppc4xx: Allow the end of u-boot.bin to be found
bfd89eb powerpc: ppc4xx: Call board_init_f_mem() for generic board
44c9942 powerpc: ppc4xx: dts: Bring in canyonlands device tree files
529e967 powerpc: ppc4xx: canyonlands: Move to generic board
3a17e68 powerpc: ppc4xx: Move CANYONLANDS/GLACIER/ARCHES to Kconfig
4bfa397 powerpc: Permit device tree control of U-Boot (CONFIG_OF_CONTROL)
4eda9b6 Introduce board_init_f_mem() to handle early memory layout

You should be able to create simple files with just the SPI interfaces
that you need. You can always expand them later.

If I had a board I would be happy to help.

Regards,
Simon

>
> Best regards,
> Wang Haikun
>
>
> -----Original Message-----
> From: sjg at google.com [mailto:sjg at google.com] On Behalf Of Simon Glass
> Sent: Friday, January 23, 2015 6:36 AM
> To: Wang Haikun-B53464
> Cc: U-Boot Mailing List
> Subject: Re: SPI driver convert to Driver Model
>
> (copying the list)
>
> Hi,
>
> On 19 January 2015 at 22:38, Haikun.Wang at freescale.com <Haikun.Wang at freescale.com> wrote:
>> Hi Simon,
>>
>>
>>
>> I am working for converting my SPI driver to driver model.
>>
>> I encountered some problems.
>>
>> My driver need to support many old platforms, such as m68k serials and
>> there is no DTS file for them in kernel now.
>>
>> It seems that compiling couldn’t be completed successfully  with
>> enable CONFIG_DM_SPI and disable CONFIG_OF_CONTROL
>>
>> because of some functions in file driver/spi/spi-uclass.c call DTS’s
>> interfaces .
>>
>> So are you working for supporting SPI DM works correctly in some
>> platforms without creating new DTS file for them such as m68k?
>>
>> Or can you give me some advice?
>
> One suggestion is to add a simple device tree for the platform. If you only need to support serial and SPI it might be quite simple.
>
> Specifically what boards are you supporting?
>
> Regards,
> Simon


More information about the U-Boot mailing list