All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] Add nitrogen6x board
Date: Mon, 08 Oct 2012 14:54:35 +0200	[thread overview]
Message-ID: <5072CD0B.7060607@denx.de> (raw)
In-Reply-To: <506F3CFE.8020305@boundarydevices.com>

On 05/10/2012 22:03, Eric Nelson wrote:
> On 10/05/2012 12:00 PM, Tom Rini wrote:
>> On Fri, Oct 05, 2012 at 11:42:19AM -0700, Eric Nelson wrote:
>>> On 10/05/2012 10:24 AM, Albert ARIBAUD wrote:
>>>> Hi Eric,
>>>>
>>>> On Thu,  4 Oct 2012 12:49:07 -0700, Eric Nelson
>>>> <eric.nelson@boundarydevices.com>   wrote:
>>>>
>>>>> Signed-off-by: Eric Nelson<eric.nelson@boundarydevices.com>
>>>>> ---
>>>>>   board/boundary/nitrogen6x/Makefile     |   41 ++
>>>>>   board/boundary/nitrogen6x/README       |   77 +++
>>>>>   board/boundary/nitrogen6x/nitrogen6x.c |  840
>>>>> ++++++++++++++++++++++++++++++++
>>>>>   boards.cfg                             |    1 +
>>>>>   include/configs/nitrogen6x.h           |  242 +++++++++
>>>>>   5 files changed, 1201 insertions(+), 0 deletions(-)
>>>>>   create mode 100644 board/boundary/nitrogen6x/Makefile
>>>>>   create mode 100644 board/boundary/nitrogen6x/README
>>>>>   create mode 100644 board/boundary/nitrogen6x/nitrogen6x.c
>>>>>   create mode 100644 include/configs/nitrogen6x.h
>>>>
>>>> If this is essentially a copy of sabrelite, I am surprised that git
>>>> does not report any copies. Did you use -C with git format-patch ?
>>>>
>>>
>>> Hi Albert,
>>>
>>> I didn't use '-C' (didn't know about it: thanks for the tip!).
>>>
>>> It wouldn't have detected copies though, because I made slight
>>> changes in each of these files, replacing the board names and
>>> file names in board/boundary/ and altering the default environment
>>> (policy bits) in nitrogen6x.h.
>>
>> And we can't deal with this by factoring the code differently?
>>
> Hi Tom,
> 
> There are two bits to this question:
>     - Can we represent the policy differences outside of a
>     board structure? These differences are all inside of
>     include/configs/nitrogen6x.
> 

What we have already done is to set a common config header that is
included by both include/configs/nitrogen6x and include/configs/sabrelite.
See for example mx6qsabre_common.h, with the boards mx6qsabresd and
mx6qsabreauto.

>     - Can we represent the board differences without a
>     board structure? This is a bit harder, since the
>     boards are slightly different. The Nitrogen6X has
>     a different ethernet PHY reset pin and an optional
>     SDIO Wi-Fi module.

Ona major point is *how* you want to represent your board into U-boot,
even if it is derived from a Freescale's evaluation board. In many case
a vendor directory is desired (freescale vs boundary).

> 
>     We could add code to SABRE Lite to accommodate these,
>     but it seems that sets a bad precedent. Would this
>     be done for every vendor that bases a design on
>     SABRE Lite?

I am afraid that it is easy to reach the case when changes for a vendor
will break other boards, and getting all in sync can be problematic.

> 
> The precise diffs for the configs and sources is attached for
> reference.
> 
> I've also been pondering how to simply re-use the code within
> the board setup file (mx6qsabrelite.c), but I haven't figured
> anything out. Clearly a lot of the code is duplicated, but at
> the same time it's board-specific.
> 
> For example, we could create a common module that sets up
> the SD card pads "like SABRE Lite", and a similar one to
> configure ethernet pads. Since SABRE Lite is a reference design,
> perhaps that makes sense.

I think that another example in u-boot doing this is for davinci (8xx)
boards, At least three boards share the same board structure, see
board/davinci/da8xxevm/Makefile.

Very board related functions are compiled using CONFIG_MACH:

COBJS-$(CONFIG_MACH_DAVINCI_DA830_EVM)  += da830evm.o
COBJS-$(CONFIG_MACH_DAVINCI_DA850_EVM)  += da850evm.o
COBJS-$(CONFIG_MACH_DAVINCI_HAWK)       += hawkboard.o

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  parent reply	other threads:[~2012-10-08 12:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04 19:49 [U-Boot] [PATCH 0/3] Add support for the Boundary Devices Nitrogen6x board Eric Nelson
2012-10-04 19:49 ` [U-Boot] [PATCH 1/3] Add nitrogen6x board Eric Nelson
2012-10-04 21:42   ` Sinan Akman
2012-10-04 21:51     ` Sinan Akman
2012-10-04 21:56   ` Fabio Estevam
2012-10-05 17:24   ` Albert ARIBAUD
2012-10-05 18:42     ` Eric Nelson
2012-10-05 19:00       ` Tom Rini
2012-10-05 20:03         ` Eric Nelson
2012-10-05 22:46           ` Tom Rini
2012-10-08 12:54           ` Stefano Babic [this message]
2012-10-08 17:24             ` Eric Nelson
2012-10-05 19:29       ` Albert ARIBAUD
2012-10-06  0:23         ` Eric Nelson
2012-10-08 12:28   ` Stefano Babic
2012-10-08 16:05     ` Eric Nelson
2012-10-08 20:30       ` Troy Kisky
2012-10-08 21:03         ` Stefano Babic
2012-10-08 21:24           ` Troy Kisky
2012-10-04 19:49 ` [U-Boot] [PATCH 2/3] nitrogen6x: configure and toggle PHY reset for Nitrogen6x Eric Nelson
2012-10-04 19:49 ` [U-Boot] [PATCH 3/3] nitrogen6x: initialize WL12XX pads, use to determine board type Eric Nelson
2012-10-08 12:32   ` Stefano Babic

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=5072CD0B.7060607@denx.de \
    --to=sbabic@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.