2012-02-09 19:57:53 -07:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
|
2011-02-14 00:33:10 -07:00
|
|
|
* http://www.samsung.com
|
2010-07-26 06:08:52 -06:00
|
|
|
*
|
2012-02-09 19:57:53 -07:00
|
|
|
* EXYNOS - uncompress code
|
2010-07-26 06:08:52 -06:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_ARCH_UNCOMPRESS_H
|
|
|
|
#define __ASM_ARCH_UNCOMPRESS_H __FILE__
|
|
|
|
|
2012-02-09 19:57:53 -07:00
|
|
|
#include <asm/mach-types.h>
|
|
|
|
|
2010-07-26 06:08:52 -06:00
|
|
|
#include <mach/map.h>
|
2012-02-09 19:57:53 -07:00
|
|
|
|
|
|
|
volatile u8 *uart_base;
|
|
|
|
|
2010-07-26 06:08:52 -06:00
|
|
|
#include <plat/uncompress.h>
|
|
|
|
|
2012-04-04 10:27:37 -06:00
|
|
|
static unsigned int __raw_readl(unsigned int ptr)
|
|
|
|
{
|
|
|
|
return *((volatile unsigned int *)ptr);
|
|
|
|
}
|
|
|
|
|
2010-07-26 06:08:52 -06:00
|
|
|
static void arch_detect_cpu(void)
|
|
|
|
{
|
2012-04-04 10:27:37 -06:00
|
|
|
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)
|
2012-02-09 19:57:53 -07:00
|
|
|
uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
|
|
|
|
else
|
|
|
|
uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
|
2010-07-26 06:08:52 -06:00
|
|
|
|
|
|
|
/*
|
|
|
|
* For preventing FIFO overrun or infinite loop of UART console,
|
|
|
|
* fifo_max should be the minimum fifo size of all of the UART channels
|
|
|
|
*/
|
|
|
|
fifo_mask = S5PV210_UFSTAT_TXMASK;
|
|
|
|
fifo_max = 15 << S5PV210_UFSTAT_TXSHIFT;
|
|
|
|
}
|
|
|
|
#endif /* __ASM_ARCH_UNCOMPRESS_H */
|