Re: [U-Boot] [PATCH v2] mx51evk: Add CONFIG_REVISION_TAG

2012-09-23 Thread Stefano Babic
On 18/09/2012 16:48, Benoît Thébaudeau wrote:
> FSL 2.6.35 kernel assumes that the bootloader passes the CONFIG_REVISION_TAG
> information.
> 
> If this data is not present, the kernel misconfigures the TZIC, which results 
> in
> the timer interrupt handler never being called, so the kernel deadlocks while
> calibrating its delay.
> 
> Suggested-by: Greg Topmiller 
> Signed-off-by: Benoît Thébaudeau 
> Cc: Stefano Babic 
> Cc: Fabio Estevam 
> ---

Applied to u-boot-imx (fix), thanks.

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: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] mx51evk: Add CONFIG_REVISION_TAG

2012-09-18 Thread Fabio Estevam
On Tue, Sep 18, 2012 at 11:48 AM, Benoît Thébaudeau
 wrote:
> FSL 2.6.35 kernel assumes that the bootloader passes the CONFIG_REVISION_TAG
> information.
>
> If this data is not present, the kernel misconfigures the TZIC, which results 
> in
> the timer interrupt handler never being called, so the kernel deadlocks while
> calibrating its delay.
>
> Suggested-by: Greg Topmiller 
> Signed-off-by: Benoît Thébaudeau 
> Cc: Stefano Babic 
> Cc: Fabio Estevam 

Acked-by: Fabio Estevam 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] mx51evk: Add CONFIG_REVISION_TAG

2012-09-18 Thread Benoît Thébaudeau
FSL 2.6.35 kernel assumes that the bootloader passes the CONFIG_REVISION_TAG
information.

If this data is not present, the kernel misconfigures the TZIC, which results in
the timer interrupt handler never being called, so the kernel deadlocks while
calibrating its delay.

Suggested-by: Greg Topmiller 
Signed-off-by: Benoît Thébaudeau 
Cc: Stefano Babic 
Cc: Fabio Estevam 
---
Changes for v2:
 - Add board revision to SoC revision from GPIO1[22] pin information.

 .../arch/arm/include/asm/arch-mx5/imx-regs.h   |2 ++
 .../board/freescale/mx51evk/mx51evk.c  |8 
 .../include/configs/mx51evk.h  |1 +
 3 files changed, 11 insertions(+)

diff --git u-boot-imx-1d9b033.orig/arch/arm/include/asm/arch-mx5/imx-regs.h 
u-boot-imx-1d9b033/arch/arm/include/asm/arch-mx5/imx-regs.h
index d1ef15d..46017f4 100644
--- u-boot-imx-1d9b033.orig/arch/arm/include/asm/arch-mx5/imx-regs.h
+++ u-boot-imx-1d9b033/arch/arm/include/asm/arch-mx5/imx-regs.h
@@ -321,6 +321,8 @@
 #define BOARD_REV_1_0   0x0
 #define BOARD_REV_2_0   0x1
 
+#define BOARD_VER_OFFSET   0x8
+
 #define IMX_IIM_BASE(IIM_BASE_ADDR)
 
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
diff --git u-boot-imx-1d9b033.orig/board/freescale/mx51evk/mx51evk.c 
u-boot-imx-1d9b033/board/freescale/mx51evk/mx51evk.c
index 7a0682a..a94701c 100644
--- u-boot-imx-1d9b033.orig/board/freescale/mx51evk/mx51evk.c
+++ u-boot-imx-1d9b033/board/freescale/mx51evk/mx51evk.c
@@ -60,6 +60,14 @@ int dram_init(void)
return 0;
 }
 
+u32 get_board_rev(void)
+{
+   u32 rev = get_cpu_rev();
+   if (!gpio_get_value(IMX_GPIO_NR(1, 22)))
+   rev |= BOARD_REV_2_0 << BOARD_VER_OFFSET;
+   return rev;
+}
+
 static void setup_iomux_uart(void)
 {
unsigned int pad = PAD_CTL_HYS_ENABLE | PAD_CTL_PKE_ENABLE |
diff --git u-boot-imx-1d9b033.orig/include/configs/mx51evk.h 
u-boot-imx-1d9b033/include/configs/mx51evk.h
index ba4a4a6..7b027b4 100644
--- u-boot-imx-1d9b033.orig/include/configs/mx51evk.h
+++ u-boot-imx-1d9b033/include/configs/mx51evk.h
@@ -44,6 +44,7 @@
 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
+#define CONFIG_REVISION_TAG
 
 #define CONFIG_OF_LIBFDT
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot