From 33434730eae219e4cf33975138f2e5b9aa398215 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Tue, 17 Jun 2014 17:08:58 -0700 Subject: libpayload: Fix baseaddr access in serial/tegra.c Fix baseaddr typecast to allow use in 32- and 64-bit systems BUG=None BRANCH=None TEST=Compiles successfully for rush Original-Change-Id: Ie5ded744d75a0ae4d1428d04ff2478bdfe54d146 Original-Signed-off-by: Furquan Shaikh Original-Reviewed-on: https://chromium-review.googlesource.com/204424 Original-Reviewed-by: Aaron Durbin Original-Commit-Queue: Furquan Shaikh Original-Tested-by: Furquan Shaikh (cherry picked from commit b56814fe5fc7d3a2fdfb324d4baafb27a9d3ffd6) Signed-off-by: Marc Jones Change-Id: Icedc1c819e39b92a0dd92e98f848e15b3039dfbe Reviewed-on: http://review.coreboot.org/8123 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/libpayload/drivers/serial/tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads') diff --git a/payloads/libpayload/drivers/serial/tegra.c b/payloads/libpayload/drivers/serial/tegra.c index fa5ff16526..a3dad2b09f 100644 --- a/payloads/libpayload/drivers/serial/tegra.c +++ b/payloads/libpayload/drivers/serial/tegra.c @@ -99,7 +99,7 @@ void serial_init(void) if (!lib_sysinfo.serial || !lib_sysinfo.serial->baseaddr) return; - uart_regs = (struct tegra_uart *)lib_sysinfo.serial->baseaddr; + uart_regs = (struct tegra_uart *)(uintptr_t)lib_sysinfo.serial->baseaddr; } void serial_console_init(void) -- cgit v1.2.3