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/2] imx: kconfig: introduce IMX_FIXED_IVT_OFFSET
Date: Wed, 13 Jul 2016 12:41:58 +0200	[thread overview]
Message-ID: <57861AF6.3030104@denx.de> (raw)
In-Reply-To: <1467200960-26783-1-git-send-email-peng.fan@nxp.com>

Hi Peng,

On 29/06/2016 13:49, Peng Fan wrote:
> Introduce IMX_FIXED_IVT_OFFSET, which means different boot medias
> use the same IVT offset. To i.MX7, different boot medias' IVT
> offset is fixed at 0x400. So select IMX_FIXED_IVT_OFFSET for i.MX7D.
> 

It is nice that this discrepancy in the IVT offset is getting rid with
new SOCs. Very good idea by Hardware Designs.

However, I do not think it is a great to add a CONFIG_ switch. Reason is
that mkimage is a tool, and it can be maybe compiled once and used with
several SOCs without rebuilding. If you are using inside a Yocto-build,
there is not problem, else...

That means that some diversities should be managed at runtime by mkimage
itself, without rebuilding. We have two possibilities for that:

- adding some parameters tro mkimage. Well, this remains often
undocumented and the parameter can conflict with other image types. I
mention this, but I do not like.

- add this kind of flag to the imximage.cfg file.


There is already a BOOT_OFFSET attribute, see for example
board/freescale/vf610twr/imximage.cfg:

#include <asm/imx-common/imximage.cfg>

/* image version */
IMAGE_VERSION	2

/* Boot Offset 0x400, valid for both SD and NAND boot */
BOOT_OFFSET	FLASH_OFFSET_STANDARD

asm/imx-common/imximage.cfg contains i.MX6 offsets, but nevertheless,
can we used the same way for i.MX7, too ?

> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  arch/arm/cpu/armv7/mx7/Kconfig | 1 +
>  arch/arm/imx-common/Kconfig    | 7 +++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/mx7/Kconfig b/arch/arm/cpu/armv7/mx7/Kconfig
> index ecfa4a2..6e70394 100644
> --- a/arch/arm/cpu/armv7/mx7/Kconfig
> +++ b/arch/arm/cpu/armv7/mx7/Kconfig
> @@ -7,6 +7,7 @@ config MX7
>  
>  config MX7D
>  	select ROM_UNIFIED_SECTIONS
> +	select IMX_FIXED_IVT_OFFSET
>  	bool
>  
>  choice
> diff --git a/arch/arm/imx-common/Kconfig b/arch/arm/imx-common/Kconfig
> index 1b7da5a..b248ef3 100644
> --- a/arch/arm/imx-common/Kconfig
> +++ b/arch/arm/imx-common/Kconfig
> @@ -4,6 +4,13 @@ config IMX_CONFIG
>  config ROM_UNIFIED_SECTIONS
>  	bool
>  
> +config IMX_FIXED_IVT_OFFSET
> +	bool "The IVT offset for different medias fixed or not"
> +	help
> +	  The IVT offset for different boot medias are fixed or not.
> +	  To i.MX7, the IVT offset for different boot medias are
> +	  fixed.
> +
>  config IMX_RDC
>  	bool "i.MX Resource domain controller driver"
>  	depends on ARCH_MX6 || ARCH_MX7
> 

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
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:[~2016-07-13 10:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 11:49 [U-Boot] [PATCH 1/2] imx: kconfig: introduce IMX_FIXED_IVT_OFFSET Peng Fan
2016-06-29 11:49 ` [U-Boot] [PATCH 2/2] imximage: differentiate IVT offset for IMX_FIXED_IVT_OFFSET Peng Fan
2016-07-13 10:41 ` Stefano Babic [this message]

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=57861AF6.3030104@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.