Commit 6aa51068 authored by Dima Zavin's avatar Dima Zavin Committed by Kukjin Kim

ARM: EXYNOS: use chip_id reg in uncompress to select uart base phys

Signed-off-by: default avatarDima Zavin <dima@android.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent fd9abe1b
...@@ -20,9 +20,24 @@ volatile u8 *uart_base; ...@@ -20,9 +20,24 @@ volatile u8 *uart_base;
#include <plat/uncompress.h> #include <plat/uncompress.h>
static unsigned int __raw_readl(unsigned int ptr)
{
return *((volatile unsigned int *)ptr);
}
static void arch_detect_cpu(void) static void arch_detect_cpu(void)
{ {
if (machine_is_smdk5250()) u32 chip_id = __raw_readl(EXYNOS_PA_CHIPID);
/*
* product_id is bits 31:12
* bits 23:20 describe the exynosX family
*
*/
chip_id >>= 20;
chip_id &= 0xf;
if (chip_id == 0x5)
uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
else else
uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment