public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH RFC 5/5] imx: mx6ul: Add initial board support for Engicam GEAM6UL
Date: Tue, 6 Sep 2016 08:03:28 -0400	[thread overview]
Message-ID: <20160906120328.GD4990@bill-the-cat> (raw)
In-Reply-To: <CAOMZO5AGxvz+mdzbxEJCSKaD4ML7+TWLWfpnJRiCdomtvnZzaQ@mail.gmail.com>

On Sun, Sep 04, 2016 at 11:47:06AM -0300, Fabio Estevam wrote:
> On Sun, Sep 4, 2016 at 10:32 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> 
> > Please do read the thread fully before commenting, I've mentioned the
> > state of hardware when I relied to Peng. And also this is an RFC patch
> > I'm looking for comments on function like changes whether the flow of
> > adding code to existing software is meaningful or not and not intended
> > to directly applying these onto ML.
> 
> I have already stated my opinion that you should put your board code
> into board/engicam.

Yes, this sounds right.

> > But I prefer to maintain the same on board/freescale/imx6ul. Becuase,
> > If the most of the code is common to all boards with specific SOC it's
> > better to have common code for reusability instead of adding different
> > board files with duplicate code. For example please see board/sunxi or
> > board/xilinx/zynq where microzed, zed or zynbo not directly
> > manufactured from xilinx but they maintained as common.
> 
> All the ifdefery inside board/sunxi/board.c is exactly what I would
> like to avoid here.

Now, in fairness to sunxi, that's more like what would happen if you
decided to support all of the imx6 and imx7 SoCs in a single board.c.

> mx6ul is a recent SoC and there is only mx6ul evk and pico mx6ul
> boards currently supported in U-Boot.
> 
> I don't think this can scale to support all upcoming boards into a
> single board/freescale/mx6ul/board.c.
> 
> Why is mx6ul special in this case compared to the other mx6 variants?
> 
> Will you be able to support all mx6q boards into
> board/freescale/mx6q/board.c as well?
> 
> I am sure this will be unmaintainable.

I suspect there's a certain amount of code that should be in
arch/arm/mach-imx/board.c like a __weak dram_init() and maybe some
${soc}.c files too for things that really aren't board specific but
rather SoC-required.  Of course I'm biased since this is how the TI
stuff evolved to.

But also, if the enigcam board is an example of "take the ref board, cut
it down a bit, ship" or even "take the ref board, tweak slightly", there
will still be some code duplication as they simply made the same board
decisions that NXP did in the reference platform.

-- 
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/20160906/e0ba70ba/attachment.sig>

  reply	other threads:[~2016-09-06 12:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03  8:22 [U-Boot] [PATCH 1/5] imx: mx6ul: Refactor common code as mx6ul Jagan Teki
2016-09-03  8:22 ` [U-Boot] [PATCH 2/5] configs: mx6ul: Update comment in license notes Jagan Teki
2016-09-03  8:22 ` [U-Boot] [PATCH 3/5] spi: Kconfig: Move FSL_QSPI entry to non-dm place Jagan Teki
2016-09-03  8:22 ` [U-Boot] [PATCH 4/5] configs: mx6ul: Move SPI/SPI-FLASH configs to defconfig Jagan Teki
2016-09-03  8:22 ` [U-Boot] [PATCH RFC 5/5] imx: mx6ul: Add initial board support for Engicam GEAM6UL Jagan Teki
2016-09-03 10:08   ` Peng Fan
2016-09-03 12:48     ` Jagan Teki
2016-09-04  1:26   ` Fabio Estevam
2016-09-04  2:22     ` Jagan Teki
2016-09-04  2:23     ` Fabio Estevam
2016-09-04  2:27       ` Jagan Teki
2016-09-04 13:08   ` Fabio Estevam
2016-09-04 13:10     ` Michael Trimarchi
2016-09-04 13:32     ` Jagan Teki
2016-09-04 14:47       ` Fabio Estevam
2016-09-06 12:03         ` Tom Rini [this message]
2016-09-04  2:27 ` [U-Boot] [PATCH 1/5] imx: mx6ul: Refactor common code as mx6ul Fabio Estevam
2016-09-04  2:30   ` Jagan Teki

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=20160906120328.GD4990@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