[U-Boot] [RFC PATCH 4/4 v1] dreamplug: enable fdt

Jason
2011-09-15T19:50:55Z

On Thu, Sep 15, 2011 at 12:25:36PM -0700, Simon Glass wrote:
> On Thu, Sep 15, 2011 at 6:54 AM, Jason Cooper <u-boot@lakedaemon.net> wrote:
> >
> > Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
> > ---
> > ?board/Marvell/dreamplug/kirkwood-dreamplug.dts | ? 12 +++++++++++
> > ?board/Marvell/dreamplug/kirkwood.dtsi ? ? ? ? ?| ? 25 ++++++++++++++++++++++++
> > ?include/configs/dreamplug.h ? ? ? ? ? ? ? ? ? ?| ? ?5 ++++
> > ?3 files changed, 42 insertions(+), 0 deletions(-)
> > ?create mode 100644 board/Marvell/dreamplug/kirkwood-dreamplug.dts
> > ?create mode 100644 board/Marvell/dreamplug/kirkwood.dtsi
> >
> > diff --git a/board/Marvell/dreamplug/kirkwood-dreamplug.dts b/board/Marvell/dreamplug/kirkwood-dreamplug.dts
> > new file mode 100644
> > index 0000000..eb900c3
> > --- /dev/null
> > +++ b/board/Marvell/dreamplug/kirkwood-dreamplug.dts
> > @@ -0,0 +1,12 @@
> > +/dts-v1/;
> > +
> > +/include/ "kirkwood.dtsi"
> > +
> > +/ {
> > + ? ? ? model = "Marvell Dreamplug";
> > + ? ? ? compatible = "marvell,dreamplug", "marvell,kirkwood";
> > +
> > + ? ? ? rtc at 0xf1010300 {
> > + ? ? ? ? ? ? ? status = "ok";
> > + ? ? ? };
> > +};
> > diff --git a/board/Marvell/dreamplug/kirkwood.dtsi b/board/Marvell/dreamplug/kirkwood.dtsi
> > new file mode 100644
> > index 0000000..15e52bd
> > --- /dev/null
> > +++ b/board/Marvell/dreamplug/kirkwood.dtsi
> > @@ -0,0 +1,25 @@
> > +/ {
> > + ? ? ? model = "Marvell Kirkwood";
> > + ? ? ? compatible = "marvell,kirkwood";
> > + ? ? ? #address-cells = <1>;
> > + ? ? ? #size-cells = <1>;
> > +
> > + ? ? ? cpus {
> > + ? ? ? ? ? ? ? #address-cells = <1>;
> > + ? ? ? ? ? ? ? #size-cells = <0>;
> > + ? ? ? ? ? ? ? cpu at 0 {
> > + ? ? ? ? ? ? ? ? ? ? ? compatible = "arm,arm926ejs";
> > + ? ? ? ? ? ? ? ? ? ? ? reg = <0>;
> > + ? ? ? ? ? ? ? };
> > + ? ? ? };
> > +
> > + ? ? ? rtc at 0xf1010300 {
> > + ? ? ? ? ? ? ? compatible = "marvell,kirkwood-rtc";
> > + ? ? ? ? ? ? ? reg = <0xf1010300 0x02>;
> > + ? ? ? ? ? ? ? status = "disabled";
> > + ? ? ? };
> > +
> > + ? ? ? aliases {
> > + ? ? ? ? ? ? ? rtc0 = "/rtc at 0xf1010300";
> > + ? ? ? };
> > +};
> > diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
> > index 8d1b935..9960d35 100644
> > --- a/include/configs/dreamplug.h
> > +++ b/include/configs/dreamplug.h
> > @@ -50,6 +50,11 @@
> > ?#define CONFIG_MACH_TYPE ? ? ? MACH_TYPE_DREAMPLUG
> > ?#define CONFIG_SKIP_LOWLEVEL_INIT ? ? ?/* disable board lowlevel_init */
> >
> > +#define CONFIG_OF_EMBED
> > +#define CONFIG_DEFAULT_DEVICE_TREE "kirkwood-dreamplug"
>
> One of my experiments was to create this automatically from
> <vendor>-<board>.dts, so that this isn't needed explicitly. Is it
> better to require a CONFIG for this, or just use the expected name?

There is a large probability that users may roll their own dts files.
Until device-tree.git is a reality, I'd say keep it so users can specify
which dts file they want to build.

thx,

Jason.