All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] SPL boot on iMX6
Date: Mon, 26 Aug 2013 07:23:37 -0700	[thread overview]
Message-ID: <521B64E9.4090203@boundarydevices.com> (raw)
In-Reply-To: <521B5944.5030500@denx.de>

On 08/26/2013 06:33 AM, Stefano Babic wrote:
> Hi Tapani,
>
> On 26/08/2013 13:12, Tapani wrote:
>>>
>>> Macros wee added exactly in the time they needed, and maybe a global
>>> look was missing.
>>>
>>> However, can you provide much more detail about this ? Which macros, in
>>> which files ?
>>>
>>
>> The macros I refer to is the MX6_PAD_ ones. The semantics of them depends on
>> the target cpu. See arch/arm/include/asm/arch-mx6/mx6-pins.h
>
> Ok - these files are not thought to be used in the same binary, we have
> to change something, taking into account we should remain compatible
> without breaking the currently supported boards.
>
> Let's start with some proposals. Maybe you have already introduced a
> CONFIG_ switch, because at the moment only one SOC per image is
> supported, and one of MX6Q, MX6DL must be set. We have also the same
> issue with -ddr files (mx6q-ddr and mx6dl-ddr). Let's say we add a
> CONFIG_MX6_MULTI to support all SocS at the same time.
>
> Then we could change the file you mention adding a suffix to each pin.
> For example, in mx6q_pins.h we could add something like this:
>
> #ifdef CONFIG_MX6_MULTI
> #define PAD_SUFFIX _6Q
> #else
> #define PAD_SUFFIX
> #endif
>
> And we add the macro to each pin, such as
> enum {
>          MX6_PAD_SD2_DAT1__USDHC2_DAT1##PAD_SUFFIX
>
> In this way we could have different names only if we support multiple
> SOCs. We need then some accessors to get the right pin, something like
> mx6_pin(soc_type, pin_name), that returns the right configuration. Of
> course, this is a very first draft, and someone else can start with
> different proposals.
>
:)

This is where we started on i.MX6, with prefixes MX6Q and MX6DL.
See commit cfb8b9d.

> Generally I would avoid to convert the enums into tables, because they
> will increase the footprint for each board.
>

Functionally, we still need table(s) for any image which supports either
variant so the proper set of pads are configured.

See this for an example
	http://lists.denx.de/pipermail/u-boot/2012-October/136394.html

The construct used in that patch set was to define FOR_DL_SOLO,
then include the pad file.
	#ifdef CONFIG_MX6Q
	#include "pads.h"
	#endif
	#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
	#define FOR_DL_SOLO
	#include "pads.h"
	#endif

Troy's implementation used a naming convention of mx6q_X
and mx6dl_solo_X such that a board supporting both would have
variables

	static iomux_v3_cfg_t mx6q_usdhc3_pads = ...

followed by

	static iomux_v3_cfg_t mx6dl_solo_usdhc3_pads = ...

Some other data structures were also duplicated with the
same naming convention (see i2c_pads).

Regards,


Eric

  reply	other threads:[~2013-08-26 14:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26  7:17 [U-Boot] SPL boot on iMX6 Tapani Utriainen
2013-08-26  7:42 ` Stefano Babic
2013-08-26 11:12   ` Tapani
2013-08-26 13:33     ` Stefano Babic
2013-08-26 14:23       ` Eric Nelson [this message]
2013-08-27 12:53         ` Stefano Babic
2013-08-27  4:07       ` Tapani Utriainen
2013-08-27 13:00         ` Stefano Babic
2013-08-27 15:00         ` Eric Nelson
2013-08-26 13:28 ` Fabio Estevam

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=521B64E9.4090203@boundarydevices.com \
    --to=eric.nelson@boundarydevices.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 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.