Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
0491fcbb
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0491fcbb
编写于
3月 25, 2010
作者:
S
Sascha Hauer
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'mx51' into mxc-rc
上级
ae7a3f13
fc300206
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
83 addition
and
41 deletion
+83
-41
arch/arm/mach-mx5/clock-mx51.c
arch/arm/mach-mx5/clock-mx51.c
+1
-1
arch/arm/mach-mx5/cpu.c
arch/arm/mach-mx5/cpu.c
+53
-0
arch/arm/mach-mx5/mm.c
arch/arm/mach-mx5/mm.c
+13
-19
arch/arm/plat-mxc/include/mach/mx51.h
arch/arm/plat-mxc/include/mach/mx51.h
+12
-21
arch/arm/plat-mxc/include/mach/uncompress.h
arch/arm/plat-mxc/include/mach/uncompress.h
+4
-0
未找到文件。
arch/arm/mach-mx5/clock-mx51.c
浏览文件 @
0491fcbb
...
...
@@ -757,7 +757,7 @@ DEFINE_CLOCK(uart3_ipg_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG7_OFFSET,
/* GPT */
DEFINE_CLOCK
(
gpt_clk
,
0
,
MXC_CCM_CCGR2
,
MXC_CCM_CCGRx_CG9_OFFSET
,
NULL
,
NULL
,
&
ipg_
per
clk
,
NULL
);
NULL
,
NULL
,
&
ipg_clk
,
NULL
);
DEFINE_CLOCK
(
gpt_ipg_clk
,
0
,
MXC_CCM_CCGR2
,
MXC_CCM_CCGRx_CG10_OFFSET
,
NULL
,
NULL
,
&
ipg_clk
,
NULL
);
...
...
arch/arm/mach-mx5/cpu.c
浏览文件 @
0491fcbb
...
...
@@ -14,9 +14,62 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <mach/hardware.h>
#include <asm/io.h>
static
int
cpu_silicon_rev
=
-
1
;
#define SI_REV 0x48
static
void
query_silicon_parameter
(
void
)
{
void
__iomem
*
rom
=
ioremap
(
MX51_IROM_BASE_ADDR
,
MX51_IROM_SIZE
);
u32
rev
;
if
(
!
rom
)
{
cpu_silicon_rev
=
-
EINVAL
;
return
;
}
rev
=
readl
(
rom
+
SI_REV
);
switch
(
rev
)
{
case
0x1
:
cpu_silicon_rev
=
MX51_CHIP_REV_1_0
;
break
;
case
0x2
:
cpu_silicon_rev
=
MX51_CHIP_REV_1_1
;
break
;
case
0x10
:
cpu_silicon_rev
=
MX51_CHIP_REV_2_0
;
break
;
case
0x20
:
cpu_silicon_rev
=
MX51_CHIP_REV_3_0
;
break
;
default:
cpu_silicon_rev
=
0
;
}
iounmap
(
rom
);
}
/*
* Returns:
* the silicon revision of the cpu
* -EINVAL - not a mx51
*/
int
mx51_revision
(
void
)
{
if
(
!
cpu_is_mx51
())
return
-
EINVAL
;
if
(
cpu_silicon_rev
==
-
1
)
query_silicon_parameter
();
return
cpu_silicon_rev
;
}
EXPORT_SYMBOL
(
mx51_revision
);
static
int
__init
post_cpu_init
(
void
)
{
unsigned
int
reg
;
...
...
arch/arm/mach-mx5/mm.c
浏览文件 @
0491fcbb
...
...
@@ -34,11 +34,6 @@ static struct map_desc mxc_io_desc[] __initdata = {
.
pfn
=
__phys_to_pfn
(
MX51_DEBUG_BASE_ADDR
),
.
length
=
MX51_DEBUG_SIZE
,
.
type
=
MT_DEVICE
},
{
.
virtual
=
MX51_TZIC_BASE_ADDR_VIRT
,
.
pfn
=
__phys_to_pfn
(
MX51_TZIC_BASE_ADDR
),
.
length
=
MX51_TZIC_SIZE
,
.
type
=
MT_DEVICE
},
{
.
virtual
=
MX51_AIPS1_BASE_ADDR_VIRT
,
.
pfn
=
__phys_to_pfn
(
MX51_AIPS1_BASE_ADDR
),
...
...
@@ -54,11 +49,6 @@ static struct map_desc mxc_io_desc[] __initdata = {
.
pfn
=
__phys_to_pfn
(
MX51_AIPS2_BASE_ADDR
),
.
length
=
MX51_AIPS2_SIZE
,
.
type
=
MT_DEVICE
},
{
.
virtual
=
MX51_NFC_AXI_BASE_ADDR_VIRT
,
.
pfn
=
__phys_to_pfn
(
MX51_NFC_AXI_BASE_ADDR
),
.
length
=
MX51_NFC_AXI_SIZE
,
.
type
=
MT_DEVICE
},
};
...
...
@@ -69,14 +59,6 @@ static struct map_desc mxc_io_desc[] __initdata = {
*/
void
__init
mx51_map_io
(
void
)
{
u32
tzic_addr
;
if
(
mx51_revision
()
<
MX51_CHIP_REV_2_0
)
tzic_addr
=
0x8FFFC000
;
else
tzic_addr
=
0xE0003000
;
mxc_io_desc
[
2
].
pfn
=
__phys_to_pfn
(
tzic_addr
);
mxc_set_cpu_type
(
MXC_CPU_MX51
);
mxc_iomux_v3_init
(
MX51_IO_ADDRESS
(
MX51_IOMUXC_BASE_ADDR
));
mxc_arch_reset_init
(
MX51_IO_ADDRESS
(
MX51_WDOG_BASE_ADDR
));
...
...
@@ -85,5 +67,17 @@ void __init mx51_map_io(void)
void
__init
mx51_init_irq
(
void
)
{
tzic_init_irq
(
MX51_IO_ADDRESS
(
MX51_TZIC_BASE_ADDR
));
unsigned
long
tzic_addr
;
void
__iomem
*
tzic_virt
;
if
(
mx51_revision
()
<
MX51_CHIP_REV_2_0
)
tzic_addr
=
MX51_TZIC_BASE_ADDR_TO1
;
else
tzic_addr
=
MX51_TZIC_BASE_ADDR
;
tzic_virt
=
ioremap
(
tzic_addr
,
SZ_16K
);
if
(
!
tzic_virt
)
panic
(
"unable to map TZIC interrupt controller
\n
"
);
tzic_init_irq
(
tzic_virt
);
}
arch/arm/plat-mxc/include/mach/mx51.h
浏览文件 @
0491fcbb
...
...
@@ -14,7 +14,7 @@
* FB100000 70000000 1M SPBA 0
* FB000000 73F00000 1M AIPS 1
* FB200000 83F00000 1M AIPS 2
*
FA100000
8FFFC000 16K TZIC (interrupt controller)
*
8FFFC000 16K TZIC (interrupt controller)
* 90000000 256M CSD0 SDRAM/DDR
* A0000000 256M CSD1 SDRAM/DDR
* B0000000 128M CS0 Flash
...
...
@@ -23,10 +23,16 @@
* C8000000 64M CS3 Flash
* CC000000 32M CS4 SRAM
* CE000000 32M CS5 SRAM
*
F9000000
CFFF0000 64K NFC (NAND Flash AXI)
*
CFFF0000 64K NFC (NAND Flash AXI)
*
*/
/*
* IROM
*/
#define MX51_IROM_BASE_ADDR 0x0
#define MX51_IROM_SIZE SZ_64K
/*
* IRAM
*/
...
...
@@ -40,7 +46,6 @@
* NFC
*/
#define MX51_NFC_AXI_BASE_ADDR 0xCFFF0000
/* NAND flash AXI */
#define MX51_NFC_AXI_BASE_ADDR_VIRT 0xF9000000
#define MX51_NFC_AXI_SIZE SZ_64K
/*
...
...
@@ -49,9 +54,8 @@
#define MX51_GPU_BASE_ADDR 0x20000000
#define MX51_GPU2D_BASE_ADDR 0xD0000000
#define MX51_TZIC_BASE_ADDR 0x8FFFC000
#define MX51_TZIC_BASE_ADDR_VIRT 0xFA100000
#define MX51_TZIC_SIZE SZ_16K
#define MX51_TZIC_BASE_ADDR_TO1 0x8FFFC000
#define MX51_TZIC_BASE_ADDR 0xE0000000
#define MX51_DEBUG_BASE_ADDR 0x60000000
#define MX51_DEBUG_BASE_ADDR_VIRT 0xFA200000
...
...
@@ -232,12 +236,10 @@
#define MX51_IO_ADDRESS(x) \
(void __iomem *) \
(MX51_IS_MODULE(x, IRAM) ? MX51_IRAM_IO_ADDRESS(x) : \
MX51_IS_MODULE(x, TZIC) ? MX51_TZIC_IO_ADDRESS(x) : \
MX51_IS_MODULE(x, DEBUG) ? MX51_DEBUG_IO_ADDRESS(x) : \
MX51_IS_MODULE(x, SPBA0) ? MX51_SPBA0_IO_ADDRESS(x) : \
MX51_IS_MODULE(x, AIPS1) ? MX51_AIPS1_IO_ADDRESS(x) : \
MX51_IS_MODULE(x, AIPS2) ? MX51_AIPS2_IO_ADDRESS(x) : \
MX51_IS_MODULE(x, NFC_AXI) ? MX51_NFC_AXI_IO_ADDRESS(x) : \
MX51_IS_MODULE(x, AIPS2) ? MX51_AIPS2_IO_ADDRESS(x) : \
0xDEADBEEF)
/*
...
...
@@ -246,9 +248,6 @@
#define MX51_IRAM_IO_ADDRESS(x) \
(((x) - MX51_IRAM_BASE_ADDR) + MX51_IRAM_BASE_ADDR_VIRT)
#define MX51_TZIC_IO_ADDRESS(x) \
(((x) - MX51_TZIC_BASE_ADDR) + MX51_TZIC_BASE_ADDR_VIRT)
#define MX51_DEBUG_IO_ADDRESS(x) \
(((x) - MX51_DEBUG_BASE_ADDR) + MX51_DEBUG_BASE_ADDR_VIRT)
...
...
@@ -261,9 +260,6 @@
#define MX51_AIPS2_IO_ADDRESS(x) \
(((x) - MX51_AIPS2_BASE_ADDR) + MX51_AIPS2_BASE_ADDR_VIRT)
#define MX51_NFC_AXI_IO_ADDRESS(x) \
(((x) - MX51_NFC_AXI_BASE_ADDR) + MX51_NFC_AXI_BASE_ADDR_VIRT)
#define MX51_IS_MEM_DEVICE_NONSHARED(x) 0
/*
...
...
@@ -443,12 +439,7 @@
#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
extern
unsigned
int
system_rev
;
static
inline
unsigned
int
mx51_revision
(
void
)
{
return
system_rev
;
}
extern
int
mx51_revision
(
void
);
#endif
#endif
/* __ASM_ARCH_MXC_MX51_H__ */
arch/arm/plat-mxc/include/mach/uncompress.h
浏览文件 @
0491fcbb
...
...
@@ -66,6 +66,7 @@ static inline void flush(void)
#define MX2X_UART1_BASE_ADDR 0x1000a000
#define MX3X_UART1_BASE_ADDR 0x43F90000
#define MX3X_UART2_BASE_ADDR 0x43F94000
#define MX51_UART1_BASE_ADDR 0x73fbc000
static
__inline__
void
__arch_decomp_setup
(
unsigned
long
arch_id
)
{
...
...
@@ -101,6 +102,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
case
MACH_TYPE_MAGX_ZN5
:
uart_base
=
MX3X_UART2_BASE_ADDR
;
break
;
case
MACH_TYPE_MX51_BABBAGE
:
uart_base
=
MX51_UART1_BASE_ADDR
;
break
;
default:
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录