public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/13] ARM: tegra: Fix build failures and warnings on 64-bit
@ 2015-03-20 11:41 Thierry Reding
  2015-03-20 11:41 ` [U-Boot] [PATCH 02/13] usb: Build warning fixes for 64-bit Thierry Reding
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Thierry Reding @ 2015-03-20 11:41 UTC (permalink / raw)
  To: u-boot

From: Thierry Reding <treding@nvidia.com>

This fixes some build errors and warnings caused by inline assembly and
pointer to integer cast size mismatches. The inline assembly build error
in config_cache() is easy to fix because the code isn't meaningful on 64
bit ARM. For the assembly-level reset_cpu() implementation, provide a
version that uses ARMv8 register names, but is otherwise identical.

The remaining warnings about pointer to integer cast size mismatches can
be fixed by simply using explicit casts where appropriate, or using long
unsigned integers rather than 32-bit sized types where an actual address
is stored.

Cc: Tom Warren <twarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 arch/arm/mach-tegra/ap.c            |  4 ++--
 arch/arm/mach-tegra/cache.c         |  2 ++
 arch/arm/mach-tegra/lowlevel_init.S | 15 +++++++++++++++
 arch/arm/mach-tegra/pinmux-common.c |  2 +-
 4 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-tegra/ap.c b/arch/arm/mach-tegra/ap.c
index cbe9be6f263a..01c15d829fc6 100644
--- a/arch/arm/mach-tegra/ap.c
+++ b/arch/arm/mach-tegra/ap.c
@@ -135,8 +135,8 @@ static u32 get_odmdata(void)
 	 * on BCTs for currently supported SoCs, which are locked down.
 	 * If this changes in new chips, we can revisit this algorithm.
 	 */
-
-	u32 bct_start, odmdata;
+	unsigned long bct_start;
+	u32 odmdata;
 
 	bct_start = readl(NV_PA_BASE_SRAM + NVBOOTINFOTABLE_BCTPTR);
 	odmdata = readl(bct_start + BCT_ODMDATA_OFFSET);
diff --git a/arch/arm/mach-tegra/cache.c b/arch/arm/mach-tegra/cache.c
index 94f5bce90ec3..0e9cb97832dd 100644
--- a/arch/arm/mach-tegra/cache.c
+++ b/arch/arm/mach-tegra/cache.c
@@ -21,6 +21,7 @@
 #include <asm/arch-tegra/ap.h>
 #include <asm/arch/gp_padctrl.h>
 
+#ifndef CONFIG_ARM64
 void config_cache(void)
 {
 	u32 reg = 0;
@@ -44,3 +45,4 @@ void config_cache(void)
 	reg |= 2;
 	asm("mcr p15, 1, %0, c9, c0, 2" : : "r" (reg));
 }
+#endif
diff --git a/arch/arm/mach-tegra/lowlevel_init.S b/arch/arm/mach-tegra/lowlevel_init.S
index a211bb3b1a60..4fa834ba60e0 100644
--- a/arch/arm/mach-tegra/lowlevel_init.S
+++ b/arch/arm/mach-tegra/lowlevel_init.S
@@ -11,6 +11,20 @@
 #include <version.h>
 #include <linux/linkage.h>
 
+#ifdef CONFIG_ARM64
+	.align	5
+ENTRY(reset_cpu)
+	/* get address for global reset register */
+	ldr	x1, =PRM_RSTCTRL
+	ldr	w3, [x1]
+	/* force reset */
+	orr	w3, w3, #0x10
+	str	w3, [x1]
+	mov	w0, w0
+1:
+	b	1b
+ENDPROC(reset_cpu)
+#else
 	.align	5
 ENTRY(reset_cpu)
 	ldr	r1, rstctl			@ get addr for global reset
@@ -24,3 +38,4 @@ _loop_forever:
 rstctl:
 	.word	PRM_RSTCTRL
 ENDPROC(reset_cpu)
+#endif
diff --git a/arch/arm/mach-tegra/pinmux-common.c b/arch/arm/mach-tegra/pinmux-common.c
index 912f65e98b06..c9dc58838803 100644
--- a/arch/arm/mach-tegra/pinmux-common.c
+++ b/arch/arm/mach-tegra/pinmux-common.c
@@ -78,7 +78,7 @@
 	(((hsm) >= PMUX_HSM_DISABLE) && ((hsm) <= PMUX_HSM_ENABLE))
 #endif
 
-#define _R(offset)	(u32 *)(NV_PA_APB_MISC_BASE + (offset))
+#define _R(offset)	(u32 *)((unsigned long)NV_PA_APB_MISC_BASE + (offset))
 
 #if defined(CONFIG_TEGRA20)
 
-- 
2.3.2

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

end of thread, other threads:[~2015-03-25 11:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20 11:41 [U-Boot] [PATCH 01/13] ARM: tegra: Fix build failures and warnings on 64-bit Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 02/13] usb: Build warning fixes for 64-bit Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 03/13] dfu: " Thierry Reding
2015-03-23 10:06   ` Lukasz Majewski
2015-03-20 11:41 ` [U-Boot] [PATCH 04/13] i2c: tegra: " Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 05/13] mmc: " Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 06/13] net: rtl8169: " Thierry Reding
2015-03-20 18:32   ` Joe Hershberger
2015-03-20 11:41 ` [U-Boot] [PATCH 07/13] pci: tegra: " Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 08/13] usb: eth: asix: " Thierry Reding
2015-03-25 11:42   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 09/13] usb: ci_udc: " Thierry Reding
2015-03-20 16:10   ` Stephen Warren
2015-03-25 11:49   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 10/13] usb: mass-storage: " Thierry Reding
2015-03-23 10:20   ` Lukasz Majewski
2015-03-23 10:23   ` Lukasz Majewski
2015-03-25 11:43   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 11/13] usb: ehci-hcd: " Thierry Reding
2015-03-25 11:50   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 12/13] usb: ehci-tegra: " Thierry Reding
2015-03-25 11:42   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 13/13] fdt: " Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox