Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
uncompress.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
3  * http://www.samsung.com
4  *
5  * EXYNOS - uncompress code
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10 */
11 
12 #ifndef __ASM_ARCH_UNCOMPRESS_H
13 #define __ASM_ARCH_UNCOMPRESS_H __FILE__
14 
15 #include <asm/mach-types.h>
16 
17 #include <mach/map.h>
18 
19 volatile u8 *uart_base;
20 
21 #include <plat/uncompress.h>
22 
23 static unsigned int __raw_readl(unsigned int ptr)
24 {
25  return *((volatile unsigned int *)ptr);
26 }
27 
28 static void arch_detect_cpu(void)
29 {
31 
32  /*
33  * product_id is bits 31:12
34  * bits 23:20 describe the exynosX family
35  *
36  */
37  chip_id >>= 20;
38  chip_id &= 0xf;
39 
40  if (chip_id == 0x5)
41  uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
42  else
43  uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
44 
45  /*
46  * For preventing FIFO overrun or infinite loop of UART console,
47  * fifo_max should be the minimum fifo size of all of the UART channels
48  */
51 }
52 #endif /* __ASM_ARCH_UNCOMPRESS_H */