mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>,
	Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/2] ARM: i.MX: Add support for ZII RDU1 board
Date: Tue, 19 Jun 2018 09:24:11 -0700	[thread overview]
Message-ID: <CAHQ1cqGXRaf1qQ4MmKRvtnejANvkezvMPng9MJuKmBhXJn+7mw@mail.gmail.com> (raw)
In-Reply-To: <1529398276.7211.10.camel@pengutronix.de>

On Tue, Jun 19, 2018 at 1:51 AM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> Am Montag, den 18.06.2018, 22:43 -0700 schrieb Andrey Smirnov:
> > ZII RDU1 is a i.MX51 based, Babbade board derivative supported by
> > upstream kernel. This commit adds support for it to Barebox.
> >
> > > Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> > > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> > ---
> >  arch/arm/boards/Makefile                      |  1 +
> >  arch/arm/boards/zii-imx51-rdu1/Makefile       |  2 +
> >  arch/arm/boards/zii-imx51-rdu1/board.c        | 38 ++++++++++++
> >  .../flash-header-imx51-zii-rdu1.imxcfg        | 60 +++++++++++++++++++
> >  arch/arm/boards/zii-imx51-rdu1/lowlevel.c     | 46 ++++++++++++++
> >  arch/arm/configs/imx_v7_defconfig             |  1 +
> >  arch/arm/dts/Makefile                         |  1 +
> >  arch/arm/dts/imx51-zii-rdu1.dts               | 46 ++++++++++++++
> >  arch/arm/mach-imx/Kconfig                     |  5 ++
> >  images/Makefile.imx                           |  5 ++
> >  10 files changed, 205 insertions(+)
> >  create mode 100644 arch/arm/boards/zii-imx51-rdu1/Makefile
> >  create mode 100644 arch/arm/boards/zii-imx51-rdu1/board.c
> >  create mode 100644 arch/arm/boards/zii-imx51-rdu1/flash-header-imx51-zii-rdu1.imxcfg
> >  create mode 100644 arch/arm/boards/zii-imx51-rdu1/lowlevel.c
> >  create mode 100644 arch/arm/dts/imx51-zii-rdu1.dts
> >
> > diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
> > index f1dc4c685..e5d217f52 100644
> > --- a/arch/arm/boards/Makefile
> > +++ b/arch/arm/boards/Makefile
> > > @@ -150,5 +150,6 @@ obj-$(CONFIG_MACH_VSCOM_BALTOS)                 += vscom-baltos/
> > >  obj-$(CONFIG_MACH_QEMU_VIRT64)                     += qemu-virt64/
> > >  obj-$(CONFIG_MACH_WARP7)                   += element14-warp7/
> > >  obj-$(CONFIG_MACH_VF610_TWR)                       += freescale-vf610-twr/
> > > +obj-$(CONFIG_MACH_ZII_RDU1)                        += zii-imx51-rdu1/
> > >  obj-$(CONFIG_MACH_ZII_RDU2)                        += zii-imx6q-rdu2/
> > >  obj-$(CONFIG_MACH_ZII_VF610_DEV)           += zii-vf610-dev/
> > diff --git a/arch/arm/boards/zii-imx51-rdu1/Makefile b/arch/arm/boards/zii-imx51-rdu1/Makefile
> > new file mode 100644
> > index 000000000..01c7a259e
> > --- /dev/null
> > +++ b/arch/arm/boards/zii-imx51-rdu1/Makefile
> > @@ -0,0 +1,2 @@
> > +obj-y += board.o
> > +lwl-y += lowlevel.o
> > diff --git a/arch/arm/boards/zii-imx51-rdu1/board.c b/arch/arm/boards/zii-imx51-rdu1/board.c
> > new file mode 100644
> > index 000000000..5e8f96ebd
> > --- /dev/null
> > +++ b/arch/arm/boards/zii-imx51-rdu1/board.c
> > @@ -0,0 +1,38 @@
> > +/*
> > + * Copyright (C) 2015 Nikita Yushchenko, CogentEmbedded, Inc
> > + * Copyright (C) 2015 Andrey Gusakov, CogentEmbedded, Inc
> > + * Copyright (C) 2007 Sascha Hauer, Pengutronix
> > + *
> > + * This program is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU General Public License as
> > + * published by the Free Software Foundation; either version 2 of
> > + * the License, or (at your option) any later version.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License for more details.
> > + *
> > + *
> > + */
> > +
> > +#define pr_fmt(fmt) "zii-rdu1: " fmt
> > +
> > +#include <common.h>
> > +#include <init.h>
> > +#include <mach/bbu.h>
> > +
> > +static int zii_rdu1_init(void)
> > +{
> > > +   if (!of_machine_is_compatible("zii,imx51-rdu1"))
> > > +           return 0;
> > +
> > > +   barebox_set_hostname("rdu1");
> > +
> > > +   imx51_bbu_internal_mmc_register_handler("mmc", "/dev/mmc0", 0);
> > > +   imx51_bbu_internal_spi_i2c_register_handler("spi",
> > > +                                               "/dev/dataflash0.barebox",
> > +                                                 BBU_HANDLER_FLAG_DEFAULT);
>
> Did you test that this works? The Barebox partition has an offset and
> according the RM the BootROM looks at a specific location for the image
> header, so I think the Barebox image needs to be truncated for this to
> work.
>

No, missed this one, sorry. I'll drop this code until we figure out a
way to make it work with the least amount of hacks.

> Regards,
> Lucas
>
> > +     return 0;
> > +}
> > +coredevice_initcall(zii_rdu1_init);
> > \ No newline at end of file
>
> Please add the newline.

Sure.

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-06-19 16:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19  5:43 [PATCH 1/2] ARM: babbage: Make PMIC initialization shareable Andrey Smirnov
2018-06-19  5:43 ` [PATCH 2/2] ARM: i.MX: Add support for ZII RDU1 board Andrey Smirnov
2018-06-19  8:51   ` Lucas Stach
2018-06-19 11:34     ` Nikita Yushchenko
2018-06-19 12:42       ` Lucas Stach
2018-06-19 16:24     ` Andrey Smirnov [this message]
2018-06-19  8:51 ` [PATCH 1/2] ARM: babbage: Make PMIC initialization shareable Lucas Stach
2018-06-19 16:55   ` Andrey Smirnov
2018-06-20  7:16     ` Sascha Hauer
2018-06-20 18:13       ` Andrey Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHQ1cqGXRaf1qQ4MmKRvtnejANvkezvMPng9MJuKmBhXJn+7mw@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=l.stach@pengutronix.de \
    --cc=nikita.yoush@cogentembedded.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox