* [U-Boot] [PATCH] imx: mx6: fix reg base address when runtime usage
@ 2015-11-30 8:04 Peng Fan
2015-12-01 15:13 ` Stefano Babic
2015-12-07 14:03 ` Stefano Babic
0 siblings, 2 replies; 3+ messages in thread
From: Peng Fan @ 2015-11-30 8:04 UTC (permalink / raw)
To: u-boot
Should use parenthese to wrap the macro definition, otherwise
we will encounter error like the following:
"
if (base_addr != LCDIF1_BASE_ADDR) {
puts("Wrong LCD interface!\n");
return -EINVAL;
}
"
Without this patch, we will always encounter "Wrong LCD interface".
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
---
arch/arm/include/asm/arch-mx6/imx-regs.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 2f068e5..f24525e 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -335,10 +335,10 @@
#include <asm/types.h>
/* only for i.MX6SX/UL */
-#define WDOG3_BASE_ADDR (is_cpu_type(MXC_CPU_MX6UL) ? \
- MX6UL_WDOG3_BASE_ADDR : MX6SX_WDOG3_BASE_ADDR)
-#define LCDIF1_BASE_ADDR (is_cpu_type(MXC_CPU_MX6UL)) ? \
- MX6UL_LCDIF1_BASE_ADDR : MX6SX_LCDIF1_BASE_ADDR
+#define WDOG3_BASE_ADDR ((is_cpu_type(MXC_CPU_MX6UL) ? \
+ MX6UL_WDOG3_BASE_ADDR : MX6SX_WDOG3_BASE_ADDR))
+#define LCDIF1_BASE_ADDR ((is_cpu_type(MXC_CPU_MX6UL)) ? \
+ MX6UL_LCDIF1_BASE_ADDR : MX6SX_LCDIF1_BASE_ADDR)
extern void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);
--
2.6.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] imx: mx6: fix reg base address when runtime usage
2015-11-30 8:04 [U-Boot] [PATCH] imx: mx6: fix reg base address when runtime usage Peng Fan
@ 2015-12-01 15:13 ` Stefano Babic
2015-12-07 14:03 ` Stefano Babic
1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2015-12-01 15:13 UTC (permalink / raw)
To: u-boot
On 30/11/2015 09:04, Peng Fan wrote:
> Should use parenthese to wrap the macro definition, otherwise
> we will encounter error like the following:
>
> "
> if (base_addr != LCDIF1_BASE_ADDR) {
> puts("Wrong LCD interface!\n");
> return -EINVAL;
> }
> "
>
> Without this patch, we will always encounter "Wrong LCD interface".
>
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
> arch/arm/include/asm/arch-mx6/imx-regs.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
> index 2f068e5..f24525e 100644
> --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
> @@ -335,10 +335,10 @@
> #include <asm/types.h>
>
> /* only for i.MX6SX/UL */
> -#define WDOG3_BASE_ADDR (is_cpu_type(MXC_CPU_MX6UL) ? \
> - MX6UL_WDOG3_BASE_ADDR : MX6SX_WDOG3_BASE_ADDR)
> -#define LCDIF1_BASE_ADDR (is_cpu_type(MXC_CPU_MX6UL)) ? \
> - MX6UL_LCDIF1_BASE_ADDR : MX6SX_LCDIF1_BASE_ADDR
> +#define WDOG3_BASE_ADDR ((is_cpu_type(MXC_CPU_MX6UL) ? \
> + MX6UL_WDOG3_BASE_ADDR : MX6SX_WDOG3_BASE_ADDR))
> +#define LCDIF1_BASE_ADDR ((is_cpu_type(MXC_CPU_MX6UL)) ? \
> + MX6UL_LCDIF1_BASE_ADDR : MX6SX_LCDIF1_BASE_ADDR)
>
>
> extern void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);
>
Reviewed-by: Stefano Babic <sbabic@denx.de>
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
* [U-Boot] [PATCH] imx: mx6: fix reg base address when runtime usage
2015-11-30 8:04 [U-Boot] [PATCH] imx: mx6: fix reg base address when runtime usage Peng Fan
2015-12-01 15:13 ` Stefano Babic
@ 2015-12-07 14:03 ` Stefano Babic
1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2015-12-07 14:03 UTC (permalink / raw)
To: u-boot
On 30/11/2015 09:04, Peng Fan wrote:
> Should use parenthese to wrap the macro definition, otherwise
> we will encounter error like the following:
>
> "
> if (base_addr != LCDIF1_BASE_ADDR) {
> puts("Wrong LCD interface!\n");
> return -EINVAL;
> }
> "
>
> Without this patch, we will always encounter "Wrong LCD interface".
>
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
> arch/arm/include/asm/arch-mx6/imx-regs.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
> index 2f068e5..f24525e 100644
> --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
> @@ -335,10 +335,10 @@
> #include <asm/types.h>
>
> /* only for i.MX6SX/UL */
> -#define WDOG3_BASE_ADDR (is_cpu_type(MXC_CPU_MX6UL) ? \
> - MX6UL_WDOG3_BASE_ADDR : MX6SX_WDOG3_BASE_ADDR)
> -#define LCDIF1_BASE_ADDR (is_cpu_type(MXC_CPU_MX6UL)) ? \
> - MX6UL_LCDIF1_BASE_ADDR : MX6SX_LCDIF1_BASE_ADDR
> +#define WDOG3_BASE_ADDR ((is_cpu_type(MXC_CPU_MX6UL) ? \
> + MX6UL_WDOG3_BASE_ADDR : MX6SX_WDOG3_BASE_ADDR))
> +#define LCDIF1_BASE_ADDR ((is_cpu_type(MXC_CPU_MX6UL)) ? \
> + MX6UL_LCDIF1_BASE_ADDR : MX6SX_LCDIF1_BASE_ADDR)
>
>
> extern void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);
>
Applied to u-boot-imx, thanks !
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:[~2015-12-07 14:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 8:04 [U-Boot] [PATCH] imx: mx6: fix reg base address when runtime usage Peng Fan
2015-12-01 15:13 ` Stefano Babic
2015-12-07 14:03 ` 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.