All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] imx: kconfig: introduce IMX_FIXED_IVT_OFFSET
@ 2016-06-29 11:49 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 ` [U-Boot] [PATCH 1/2] imx: kconfig: introduce IMX_FIXED_IVT_OFFSET Stefano Babic
  0 siblings, 2 replies; 3+ messages in thread
From: Peng Fan @ 2016-06-29 11:49 UTC (permalink / raw)
  To: u-boot

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.

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
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 2/2] imximage: differentiate IVT offset for IMX_FIXED_IVT_OFFSET
  2016-06-29 11:49 [U-Boot] [PATCH 1/2] imx: kconfig: introduce IMX_FIXED_IVT_OFFSET Peng Fan
@ 2016-06-29 11:49 ` Peng Fan
  2016-07-13 10:41 ` [U-Boot] [PATCH 1/2] imx: kconfig: introduce IMX_FIXED_IVT_OFFSET Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Peng Fan @ 2016-06-29 11:49 UTC (permalink / raw)
  To: u-boot

When IMX_FIXED_IVT_OFFSET defined, use FLASH_OFFSET_STANDARD for
different boot medias. This is needed for i.MX7.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 tools/imximage.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/imximage.h b/tools/imximage.h
index c7b9b5c..531dc7b 100644
--- a/tools/imximage.h
+++ b/tools/imximage.h
@@ -26,10 +26,17 @@
 #define FLASH_OFFSET_NAND	FLASH_OFFSET_STANDARD
 #define FLASH_OFFSET_SD		FLASH_OFFSET_STANDARD
 #define FLASH_OFFSET_SPI	FLASH_OFFSET_STANDARD
+#define FLASH_OFFSET_SATA	FLASH_OFFSET_STANDARD
+
+#ifdef CONFIG_IMX_FIXED_IVT_OFFSET
+#define FLASH_OFFSET_ONENAND	FLASH_OFFSET_STANDARD
+#define FLASH_OFFSET_NOR	FLASH_OFFSET_STANDARD
+#define FLASH_OFFSET_QSPI	FLASH_OFFSET_STANDARD
+#else
 #define FLASH_OFFSET_ONENAND	0x100
 #define FLASH_OFFSET_NOR	0x1000
-#define FLASH_OFFSET_SATA	FLASH_OFFSET_STANDARD
 #define FLASH_OFFSET_QSPI	0x1000
+#endif
 
 /* Initial Load Region Size */
 #define FLASH_LOADSIZE_UNDEFINED	0xFFFFFFFF
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 1/2] imx: kconfig: introduce IMX_FIXED_IVT_OFFSET
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2016-07-13 10:41 UTC (permalink / raw)
  To: u-boot

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
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-13 10:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [U-Boot] [PATCH 1/2] imx: kconfig: introduce IMX_FIXED_IVT_OFFSET Stefano Babic

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.