From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [v2 1/1] wandboard: fix dtb file names.
Date: Tue, 19 Jul 2016 13:43:44 -0400 [thread overview]
Message-ID: <20160719174344.GI7260@bill-the-cat> (raw)
In-Reply-To: <CAOMZO5C+t9f76co9rKai312zkpF69i0Deyz_gyJKWFt09Agu9A@mail.gmail.com>
On Tue, Jul 19, 2016 at 02:32:17PM -0300, Fabio Estevam wrote:
> On Tue, Jul 19, 2016 at 2:23 PM, Adam Duskett <Adamduskett@outlook.com> wrote:
> > With the previous suggestion from Wolfgang Denk, this patch removes
> > the findfdt function from wandboard.h and instead replaces it with
> > some simple logic in wandboard.c.
> >
> > The new function "set_fdtfile" is called in board_late_init. This
> > function simply finds the length of the dtb file name, allocates
> > enough space for that string, and sets the fdtfile name to that string.
> >
> > This results in slightly shorter / faster script code as well.
> >
> > Dear Adam Duskett,
> >
> > In message <BLU436-SMTP46BCB8C63151CD3166FBD1B9360@phx.gbl> you wrote:
> >> With the release of kernel 4.1.15 for the imx6 line of processors,
> >> wandboard now uses imx6q-wandboard-revc1.dtb and imx6dl-wandboard-revc1.dtb.
> >> This patch fixes the naming convention to work with kernel 4.1.15
> >>
> >> Signed-off-by: Adam Duskett <adamduskett@outlook.com>
> >> ---
> >> include/configs/wandboard.h | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
> >> index 99f5c0c..d41b600 100644
> >> --- a/include/configs/wandboard.h
> >> +++ b/include/configs/wandboard.h
> >> @@ -135,9 +135,9 @@
> >> "setenv bootargs ${bootargs} ${fbmem}\0" \
> >> "findfdt="\
> >> "if test $board_name = C1 && test $board_rev = MX6Q ; then " \
> >> - "setenv fdtfile imx6q-wandboard.dtb; fi; " \
> >> + "setenv fdtfile imx6q-wandboard-revc1.dtb; fi; " \
> >> "if test $board_name = C1 && test $board_rev = MX6DL ; then " \
> >> - "setenv fdtfile imx6dl-wandboard.dtb; fi; " \
> >> + "setenv fdtfile imx6dl-wandboard-revc1.dtb; fi; " \
> >> "if test $board_name = B1 && test $board_rev = MX6Q ; then " \
> >> "setenv fdtfile imx6q-wandboard-revb1.dtb; fi; " \
> >> "if test $board_name = B1 && test $board_rev = MX6DL ; then " \
> >
> > Instead of adding to an ever growing list of names, would it not make
> > sense to solve this programmatically, like by concatenating "i" +
> > tolower($board_rev) + "-wandboard-rev" + tolower($board_name) + ".dtb"?
> >
> > I guess this would also result in shorter / faster script code?
> >
> > Best regards,
> >
> > Wolfgang Denk
> >
> > Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
> > ---
> > Changes:
> >
> > v1 - v2:
> > - Removed findfdt from h file and moved it to init code.
> >
> >
> > board/wandboard/wandboard.c | 20 ++++++++++++++++++++
> > include/configs/wandboard.h | 12 ------------
> > 2 files changed, 20 insertions(+), 12 deletions(-)
>
> This is not really making things simpler as shown by the diff stat.
But this does show that we need to step back and think about how to more
easily do what this is trying to do. If $soc was set as in Stefan's
patch for example, we would just need board_name to be being set in
lowercase rather than upper case.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160719/46c6fc53/attachment.sig>
next prev parent reply other threads:[~2016-07-19 17:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 17:23 [U-Boot] [v2 1/1] wandboard: fix dtb file names Adam Duskett
2016-07-19 17:32 ` Fabio Estevam
2016-07-19 17:40 ` Adam Duskett
2016-07-19 17:46 ` Fabio Estevam
2016-07-19 17:51 ` Adam Duskett
2016-07-20 14:52 ` Stefano Babic
2016-07-19 17:43 ` Tom Rini [this message]
2016-07-19 17:51 ` Fabio Estevam
2016-07-19 17:58 ` Adam Duskett
2016-07-19 18:05 ` Fabio Estevam
2016-07-19 18:04 ` Tom Rini
2016-07-19 17:47 ` Wolfgang Denk
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=20160719174344.GI7260@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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