[U-Boot] [RFC PATCH 0/4 v1] Use fdt to init mvrtc driver for dreamplug

Simon Glass sjg at chromium.org
Thu Sep 15 21:16:11 CEST 2011


Hi Jason,

On Thu, Sep 15, 2011 at 6:54 AM, Jason Cooper <u-boot at lakedaemon.net> wrote:
> Simon, All,
>
> This patch series is my attempt to learn device tree with a driver I'm
> familiar with.  Also, to create a real, working example for fdt in U-boot.

Great!
>
> To make this work, I applied v2 of Simon Glass' patch series (what this
> email is in reply to) against v2011.09-rc1.  I then cherry picked my
> dreamplug board support patch.  Last, I applied the following series.
>
> It works, although with CONFIG_OF_EMBED.  I haven't tried _SEPARATE yet.

Please do, as that is what we really want people to use.

>
> Some thoughts:
>
> 1.) 'kirkwood-dreamplug.dts' can be renamed 'dreamplug.dts'.  Due to
>    machine_is_XXX 'dreamplug' will be unique, concise, and descriptive.
>    This requires changes to Simon Glass' patchset.
>
> 2.) The fdt files should be moved up one directory level, in the end, it
>    should look like:
>
>    board/Marvell/armada100-dt.c
>    board/Marvell/armada100-dt.h
>    board/Marvell/armada100.dtsi
>    board/Marvell/dreamplug.dts
>    board/Marvell/gplugd.dts      # this includes armada100.dtsi
>    board/Marvell/guruplug.dts
>    board/Marvell/kirkwood.dtsi
>    board/Marvell/kirkwood-dt.c
>    board/Marvell/kirkwood-dt.h
>    board/Marvell/openrd.dts
>    board/Marvell/sheevaplug.dts
>    ...
>    board/Marvell/<other boards>.dts
>
>    This also requires changes to Simon's patchset.

Hmm I'm not sure about that - perhaps at least a dts subdirectory?

>
> 3.) Since mach names (dreamplug) and SoC names (kirkwood) are unique,
>    should we put all .dts and .dtsi files in one dir?  eg /dts ?  This
>    would facilitate migration to Grant Likely's device-tree.git
>    whereever and whenever it lands.  This is also similar to how Linux
>    currently does it (arch/arm/boot/dts/)

It does have advantages, although (hopefully) the number of files will
grow quite large. But bear in mind that people will create their own
.dtsi files, so we will need a strong naming convention there also
(always use the board prefix perhaps).

If we want to be similar to Linux they should go in arch/<arch>/dts,
but then we are putting board description files outside the board/
structure, which doesn't seem right. The arch/arm/ subdir is supposed
to be for arch-specific code which is generic across boards. Remember
that the dts will include board things, not just SOC things.

Clearly we don't want .dts files in boards/ and even boards/dts seems
odd since all the other files are in board/<vendor>. Hmm I quite like
having them in board/<vendor>/dts.

Regards,
Simon

>
> Jason Cooper (4):
>  fdt: remove i2c example code.
>  fdt_decode: make more available.
>  mvrtc: add fdt support.
>  dreamplug: enable fdt
>
>  board/Marvell/dreamplug/kirkwood-dreamplug.dts |   12 +++++
>  board/Marvell/dreamplug/kirkwood.dtsi          |   25 ++++++++++
>  common/fdt_decode.c                            |   26 ++--------
>  drivers/rtc/mvrtc.c                            |   62 ++++++++++++++++++++++-
>  drivers/rtc/mvrtc.h                            |    7 +++
>  include/configs/dreamplug.h                    |    5 ++
>  include/fdt_decode.h                           |   46 +++++------------
>  7 files changed, 128 insertions(+), 55 deletions(-)
>  create mode 100644 board/Marvell/dreamplug/kirkwood-dreamplug.dts
>  create mode 100644 board/Marvell/dreamplug/kirkwood.dtsi
>
>


More information about the U-Boot mailing list