[U-Boot] [PATCH] Kconfig: dra7x: Kconfig based PHYS_64BIT select based on Soc type

Ravi Babu ravibabu at ti.com
Tue Jul 26 14:55:09 CEST 2016


Moving CONFIG_PHYS_64BIT selection to Kconfig based on
Soc/board type chosen.

This fixes the usb crash observed due to phy_addr_t size
mismatch which is causing the wrong offset calculation
for dwc3 structure members and leads to crash.

The phy_addr_t size is depends on CONFIG_PHYS_64BIT either
8bytes or 4 bytes. Due to non-inclusion of common.h or
config.h in some of dwc3 source files, the phy_addr_t size
was different, which leads wrong offset code generation
and leading to crash.

The issue is noticed due to commit [1]. But the right
fix would be select CONFIG_PHYS_64BIT based on Soc type
at Kconfig, so it will apply across all source files.

[1] commit 95ebc253e6d4a3370e3dab14743bfc99fcd9cf1b
types.h: move and redefine resource_size_t

Signed-off-by: Ravi Babu <ravibabu at ti.com>
---
 arch/arm/cpu/armv7/omap5/Kconfig |    1 +
 include/configs/dra7xx_evm.h     |    1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
index 4fb5ef9..a8600b1 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/cpu/armv7/omap5/Kconfig
@@ -13,6 +13,7 @@ config TARGET_OMAP5_UEVM
 config TARGET_DRA7XX_EVM
 	bool "TI DRA7XX"
 	select TI_I2C_BOARD_DETECT
+	select PHYS_64BIT
 
 config TARGET_AM57XX_EVM
 	bool "AM57XX"
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index a11a923..5114104 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -20,7 +20,6 @@
 #endif
 
 #define CONFIG_VERY_BIG_RAM
-#define CONFIG_PHYS_64BIT
 #define CONFIG_NR_DRAM_BANKS		2
 #define CONFIG_MAX_MEM_MAPPED		0x80000000
 
-- 
1.7.9.5



More information about the U-Boot mailing list