Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
b6d17c1a
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
b6d17c1a
编写于
9月 01, 2010
作者:
R
Russell King
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'imx-for-2.6.36' of
git://git.pengutronix.de/git/imx/linux-2.6
上级
1fd31707
14f0f512
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
68 addition
and
33 deletion
+68
-33
arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c
arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c
+1
-1
arch/arm/mach-mx25/mach-cpuimx25.c
arch/arm/mach-mx25/mach-cpuimx25.c
+2
-2
arch/arm/mach-mx3/clock-imx35.c
arch/arm/mach-mx3/clock-imx35.c
+55
-22
arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
+1
-1
arch/arm/mach-mx3/mach-cpuimx35.c
arch/arm/mach-mx3/mach-cpuimx35.c
+2
-2
arch/arm/mach-mx5/clock-mx51.c
arch/arm/mach-mx5/clock-mx51.c
+1
-1
arch/arm/plat-mxc/Kconfig
arch/arm/plat-mxc/Kconfig
+1
-0
arch/arm/plat-mxc/include/mach/eukrea-baseboards.h
arch/arm/plat-mxc/include/mach/eukrea-baseboards.h
+2
-2
arch/arm/plat-mxc/tzic.c
arch/arm/plat-mxc/tzic.c
+3
-2
未找到文件。
arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c
浏览文件 @
b6d17c1a
...
@@ -215,7 +215,7 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata = {
...
@@ -215,7 +215,7 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata = {
* Add platform devices present on this baseboard and init
* Add platform devices present on this baseboard and init
* them from CPU side as far as required to use them later on
* them from CPU side as far as required to use them later on
*/
*/
void
__init
eukrea_mbimxsd_baseboard_init
(
void
)
void
__init
eukrea_mbimxsd
25
_baseboard_init
(
void
)
{
{
if
(
mxc_iomux_v3_setup_multiple_pads
(
eukrea_mbimxsd_pads
,
if
(
mxc_iomux_v3_setup_multiple_pads
(
eukrea_mbimxsd_pads
,
ARRAY_SIZE
(
eukrea_mbimxsd_pads
)))
ARRAY_SIZE
(
eukrea_mbimxsd_pads
)))
...
...
arch/arm/mach-mx25/mach-cpuimx25.c
浏览文件 @
b6d17c1a
...
@@ -147,8 +147,8 @@ static void __init eukrea_cpuimx25_init(void)
...
@@ -147,8 +147,8 @@ static void __init eukrea_cpuimx25_init(void)
if
(
!
otg_mode_host
)
if
(
!
otg_mode_host
)
mxc_register_device
(
&
otg_udc_device
,
&
otg_device_pdata
);
mxc_register_device
(
&
otg_udc_device
,
&
otg_device_pdata
);
#ifdef CONFIG_MACH_EUKREA_MBIMXSD_BASEBOARD
#ifdef CONFIG_MACH_EUKREA_MBIMXSD
25
_BASEBOARD
eukrea_mbimxsd_baseboard_init
();
eukrea_mbimxsd
25
_baseboard_init
();
#endif
#endif
}
}
...
...
arch/arm/mach-mx3/clock-imx35.c
浏览文件 @
b6d17c1a
...
@@ -155,7 +155,7 @@ static unsigned long get_rate_arm(void)
...
@@ -155,7 +155,7 @@ static unsigned long get_rate_arm(void)
aad
=
&
clk_consumer
[(
pdr0
>>
16
)
&
0xf
];
aad
=
&
clk_consumer
[(
pdr0
>>
16
)
&
0xf
];
if
(
aad
->
sel
)
if
(
aad
->
sel
)
fref
=
fref
*
2
/
3
;
fref
=
fref
*
3
/
4
;
return
fref
/
aad
->
arm
;
return
fref
/
aad
->
arm
;
}
}
...
@@ -164,7 +164,7 @@ static unsigned long get_rate_ahb(struct clk *clk)
...
@@ -164,7 +164,7 @@ static unsigned long get_rate_ahb(struct clk *clk)
{
{
unsigned
long
pdr0
=
__raw_readl
(
CCM_BASE
+
CCM_PDR0
);
unsigned
long
pdr0
=
__raw_readl
(
CCM_BASE
+
CCM_PDR0
);
struct
arm_ahb_div
*
aad
;
struct
arm_ahb_div
*
aad
;
unsigned
long
fref
=
get_rate_
mpll
();
unsigned
long
fref
=
get_rate_
arm
();
aad
=
&
clk_consumer
[(
pdr0
>>
16
)
&
0xf
];
aad
=
&
clk_consumer
[(
pdr0
>>
16
)
&
0xf
];
...
@@ -176,16 +176,11 @@ static unsigned long get_rate_ipg(struct clk *clk)
...
@@ -176,16 +176,11 @@ static unsigned long get_rate_ipg(struct clk *clk)
return
get_rate_ahb
(
NULL
)
>>
1
;
return
get_rate_ahb
(
NULL
)
>>
1
;
}
}
static
unsigned
long
get_3_3_div
(
unsigned
long
in
)
{
return
(((
in
>>
3
)
&
0x7
)
+
1
)
*
((
in
&
0x7
)
+
1
);
}
static
unsigned
long
get_rate_uart
(
struct
clk
*
clk
)
static
unsigned
long
get_rate_uart
(
struct
clk
*
clk
)
{
{
unsigned
long
pdr3
=
__raw_readl
(
CCM_BASE
+
CCM_PDR3
);
unsigned
long
pdr3
=
__raw_readl
(
CCM_BASE
+
CCM_PDR3
);
unsigned
long
pdr4
=
__raw_readl
(
CCM_BASE
+
CCM_PDR4
);
unsigned
long
pdr4
=
__raw_readl
(
CCM_BASE
+
CCM_PDR4
);
unsigned
long
div
=
get_3_3_div
(
pdr4
>>
10
)
;
unsigned
long
div
=
((
pdr4
>>
10
)
&
0x3f
)
+
1
;
if
(
pdr3
&
(
1
<<
14
))
if
(
pdr3
&
(
1
<<
14
))
return
get_rate_arm
()
/
div
;
return
get_rate_arm
()
/
div
;
...
@@ -216,7 +211,7 @@ static unsigned long get_rate_sdhc(struct clk *clk)
...
@@ -216,7 +211,7 @@ static unsigned long get_rate_sdhc(struct clk *clk)
break
;
break
;
}
}
return
rate
/
get_3_3_div
(
div
);
return
rate
/
(
div
+
1
);
}
}
static
unsigned
long
get_rate_mshc
(
struct
clk
*
clk
)
static
unsigned
long
get_rate_mshc
(
struct
clk
*
clk
)
...
@@ -270,7 +265,7 @@ static unsigned long get_rate_csi(struct clk *clk)
...
@@ -270,7 +265,7 @@ static unsigned long get_rate_csi(struct clk *clk)
else
else
rate
=
get_rate_ppll
();
rate
=
get_rate_ppll
();
return
rate
/
get_3_3_div
((
pdr2
>>
16
)
&
0x3f
);
return
rate
/
(((
pdr2
>>
16
)
&
0x3f
)
+
1
);
}
}
static
unsigned
long
get_rate_otg
(
struct
clk
*
clk
)
static
unsigned
long
get_rate_otg
(
struct
clk
*
clk
)
...
@@ -283,25 +278,51 @@ static unsigned long get_rate_otg(struct clk *clk)
...
@@ -283,25 +278,51 @@ static unsigned long get_rate_otg(struct clk *clk)
else
else
rate
=
get_rate_ppll
();
rate
=
get_rate_ppll
();
return
rate
/
get_3_3_div
((
pdr4
>>
22
)
&
0x3f
);
return
rate
/
(((
pdr4
>>
22
)
&
0x3f
)
+
1
);
}
}
static
unsigned
long
get_rate_ipg_per
(
struct
clk
*
clk
)
static
unsigned
long
get_rate_ipg_per
(
struct
clk
*
clk
)
{
{
unsigned
long
pdr0
=
__raw_readl
(
CCM_BASE
+
CCM_PDR0
);
unsigned
long
pdr0
=
__raw_readl
(
CCM_BASE
+
CCM_PDR0
);
unsigned
long
pdr4
=
__raw_readl
(
CCM_BASE
+
CCM_PDR4
);
unsigned
long
pdr4
=
__raw_readl
(
CCM_BASE
+
CCM_PDR4
);
unsigned
long
div
1
,
div2
;
unsigned
long
div
;
if
(
pdr0
&
(
1
<<
26
))
{
if
(
pdr0
&
(
1
<<
26
))
{
div1
=
(
pdr4
>>
19
)
&
0x7
;
div
=
(
pdr4
>>
16
)
&
0x3f
;
div2
=
(
pdr4
>>
16
)
&
0x7
;
return
get_rate_arm
()
/
(
div
+
1
);
return
get_rate_arm
()
/
((
div1
+
1
)
*
(
div2
+
1
));
}
else
{
}
else
{
div
1
=
(
pdr0
>>
12
)
&
0x7
;
div
=
(
pdr0
>>
12
)
&
0x7
;
return
get_rate_ahb
(
NULL
)
/
div1
;
return
get_rate_ahb
(
NULL
)
/
(
div
+
1
)
;
}
}
}
}
static
unsigned
long
get_rate_hsp
(
struct
clk
*
clk
)
{
unsigned
long
hsp_podf
=
(
__raw_readl
(
CCM_BASE
+
CCM_PDR0
)
>>
20
)
&
0x03
;
unsigned
long
fref
=
get_rate_mpll
();
if
(
fref
>
400
*
1000
*
1000
)
{
switch
(
hsp_podf
)
{
case
0
:
return
fref
>>
2
;
case
1
:
return
fref
>>
3
;
case
2
:
return
fref
/
3
;
}
}
else
{
switch
(
hsp_podf
)
{
case
0
:
case
2
:
return
fref
/
3
;
case
1
:
return
fref
/
6
;
}
}
return
0
;
}
static
int
clk_cgr_enable
(
struct
clk
*
clk
)
static
int
clk_cgr_enable
(
struct
clk
*
clk
)
{
{
u32
reg
;
u32
reg
;
...
@@ -359,7 +380,7 @@ DEFINE_CLOCK(i2c1_clk, 0, CCM_CGR1, 10, get_rate_ipg_per, NULL);
...
@@ -359,7 +380,7 @@ DEFINE_CLOCK(i2c1_clk, 0, CCM_CGR1, 10, get_rate_ipg_per, NULL);
DEFINE_CLOCK
(
i2c2_clk
,
1
,
CCM_CGR1
,
12
,
get_rate_ipg_per
,
NULL
);
DEFINE_CLOCK
(
i2c2_clk
,
1
,
CCM_CGR1
,
12
,
get_rate_ipg_per
,
NULL
);
DEFINE_CLOCK
(
i2c3_clk
,
2
,
CCM_CGR1
,
14
,
get_rate_ipg_per
,
NULL
);
DEFINE_CLOCK
(
i2c3_clk
,
2
,
CCM_CGR1
,
14
,
get_rate_ipg_per
,
NULL
);
DEFINE_CLOCK
(
iomuxc_clk
,
0
,
CCM_CGR1
,
16
,
NULL
,
NULL
);
DEFINE_CLOCK
(
iomuxc_clk
,
0
,
CCM_CGR1
,
16
,
NULL
,
NULL
);
DEFINE_CLOCK
(
ipu_clk
,
0
,
CCM_CGR1
,
18
,
get_rate_
ahb
,
NULL
);
DEFINE_CLOCK
(
ipu_clk
,
0
,
CCM_CGR1
,
18
,
get_rate_
hsp
,
NULL
);
DEFINE_CLOCK
(
kpp_clk
,
0
,
CCM_CGR1
,
20
,
get_rate_ipg
,
NULL
);
DEFINE_CLOCK
(
kpp_clk
,
0
,
CCM_CGR1
,
20
,
get_rate_ipg
,
NULL
);
DEFINE_CLOCK
(
mlb_clk
,
0
,
CCM_CGR1
,
22
,
get_rate_ahb
,
NULL
);
DEFINE_CLOCK
(
mlb_clk
,
0
,
CCM_CGR1
,
22
,
get_rate_ahb
,
NULL
);
DEFINE_CLOCK
(
mshc_clk
,
0
,
CCM_CGR1
,
24
,
get_rate_mshc
,
NULL
);
DEFINE_CLOCK
(
mshc_clk
,
0
,
CCM_CGR1
,
24
,
get_rate_mshc
,
NULL
);
...
@@ -485,10 +506,10 @@ static struct clk_lookup lookups[] = {
...
@@ -485,10 +506,10 @@ static struct clk_lookup lookups[] = {
int
__init
mx35_clocks_init
()
int
__init
mx35_clocks_init
()
{
{
unsigned
int
ll
=
0
;
unsigned
int
cgr2
=
3
<<
26
,
cgr3
=
0
;
#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC)
#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC)
ll
=
(
3
<<
16
)
;
cgr2
|=
3
<<
16
;
#endif
#endif
clkdev_add_table
(
lookups
,
ARRAY_SIZE
(
lookups
));
clkdev_add_table
(
lookups
,
ARRAY_SIZE
(
lookups
));
...
@@ -499,8 +520,20 @@ int __init mx35_clocks_init()
...
@@ -499,8 +520,20 @@ int __init mx35_clocks_init()
__raw_writel
((
3
<<
18
),
CCM_BASE
+
CCM_CGR0
);
__raw_writel
((
3
<<
18
),
CCM_BASE
+
CCM_CGR0
);
__raw_writel
((
3
<<
2
)
|
(
3
<<
4
)
|
(
3
<<
6
)
|
(
3
<<
8
)
|
(
3
<<
16
),
__raw_writel
((
3
<<
2
)
|
(
3
<<
4
)
|
(
3
<<
6
)
|
(
3
<<
8
)
|
(
3
<<
16
),
CCM_BASE
+
CCM_CGR1
);
CCM_BASE
+
CCM_CGR1
);
__raw_writel
((
3
<<
26
)
|
ll
,
CCM_BASE
+
CCM_CGR2
);
__raw_writel
(
0
,
CCM_BASE
+
CCM_CGR3
);
/*
* Check if we came up in internal boot mode. If yes, we need some
* extra clocks turned on, otherwise the MX35 boot ROM code will
* hang after a watchdog reset.
*/
if
(
!
(
__raw_readl
(
CCM_BASE
+
CCM_RCSR
)
&
(
3
<<
10
)))
{
/* Additionally turn on UART1, SCC, and IIM clocks */
cgr2
|=
3
<<
16
|
3
<<
4
;
cgr3
|=
3
<<
2
;
}
__raw_writel
(
cgr2
,
CCM_BASE
+
CCM_CGR2
);
__raw_writel
(
cgr3
,
CCM_BASE
+
CCM_CGR3
);
mxc_timer_init
(
&
gpt_clk
,
mxc_timer_init
(
&
gpt_clk
,
MX35_IO_ADDRESS
(
MX35_GPT1_BASE_ADDR
),
MX35_INT_GPT
);
MX35_IO_ADDRESS
(
MX35_GPT1_BASE_ADDR
),
MX35_INT_GPT
);
...
...
arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
浏览文件 @
b6d17c1a
...
@@ -216,7 +216,7 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata = {
...
@@ -216,7 +216,7 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata = {
* Add platform devices present on this baseboard and init
* Add platform devices present on this baseboard and init
* them from CPU side as far as required to use them later on
* them from CPU side as far as required to use them later on
*/
*/
void
__init
eukrea_mbimxsd_baseboard_init
(
void
)
void
__init
eukrea_mbimxsd
35
_baseboard_init
(
void
)
{
{
if
(
mxc_iomux_v3_setup_multiple_pads
(
eukrea_mbimxsd_pads
,
if
(
mxc_iomux_v3_setup_multiple_pads
(
eukrea_mbimxsd_pads
,
ARRAY_SIZE
(
eukrea_mbimxsd_pads
)))
ARRAY_SIZE
(
eukrea_mbimxsd_pads
)))
...
...
arch/arm/mach-mx3/mach-cpuimx35.c
浏览文件 @
b6d17c1a
...
@@ -201,8 +201,8 @@ static void __init mxc_board_init(void)
...
@@ -201,8 +201,8 @@ static void __init mxc_board_init(void)
if
(
!
otg_mode_host
)
if
(
!
otg_mode_host
)
mxc_register_device
(
&
mxc_otg_udc_device
,
&
otg_device_pdata
);
mxc_register_device
(
&
mxc_otg_udc_device
,
&
otg_device_pdata
);
#ifdef CONFIG_MACH_EUKREA_MBIMXSD_BASEBOARD
#ifdef CONFIG_MACH_EUKREA_MBIMXSD
35
_BASEBOARD
eukrea_mbimxsd_baseboard_init
();
eukrea_mbimxsd
35
_baseboard_init
();
#endif
#endif
}
}
...
...
arch/arm/mach-mx5/clock-mx51.c
浏览文件 @
b6d17c1a
...
@@ -56,7 +56,7 @@ static void _clk_ccgr_disable(struct clk *clk)
...
@@ -56,7 +56,7 @@ static void _clk_ccgr_disable(struct clk *clk)
{
{
u32
reg
;
u32
reg
;
reg
=
__raw_readl
(
clk
->
enable_reg
);
reg
=
__raw_readl
(
clk
->
enable_reg
);
reg
&=
~
(
MXC_CCM_CCGRx_
MOD_OFF
<<
clk
->
enable_shift
);
reg
&=
~
(
MXC_CCM_CCGRx_
CG_MASK
<<
clk
->
enable_shift
);
__raw_writel
(
reg
,
clk
->
enable_reg
);
__raw_writel
(
reg
,
clk
->
enable_reg
);
}
}
...
...
arch/arm/plat-mxc/Kconfig
浏览文件 @
b6d17c1a
...
@@ -43,6 +43,7 @@ config ARCH_MXC91231
...
@@ -43,6 +43,7 @@ config ARCH_MXC91231
config ARCH_MX5
config ARCH_MX5
bool "MX5-based"
bool "MX5-based"
select CPU_V7
select CPU_V7
select ARM_L1_CACHE_SHIFT_6
help
help
This enables support for systems based on the Freescale i.MX51 family
This enables support for systems based on the Freescale i.MX51 family
...
...
arch/arm/plat-mxc/include/mach/eukrea-baseboards.h
浏览文件 @
b6d17c1a
...
@@ -37,9 +37,9 @@
...
@@ -37,9 +37,9 @@
* mach-mx5/eukrea_mbimx51-baseboard.c for cpuimx51
* mach-mx5/eukrea_mbimx51-baseboard.c for cpuimx51
*/
*/
extern
void
eukrea_mbimx25_baseboard_init
(
void
);
extern
void
eukrea_mbimx
sd
25_baseboard_init
(
void
);
extern
void
eukrea_mbimx27_baseboard_init
(
void
);
extern
void
eukrea_mbimx27_baseboard_init
(
void
);
extern
void
eukrea_mbimx35_baseboard_init
(
void
);
extern
void
eukrea_mbimx
sd
35_baseboard_init
(
void
);
extern
void
eukrea_mbimx51_baseboard_init
(
void
);
extern
void
eukrea_mbimx51_baseboard_init
(
void
);
#endif
#endif
...
...
arch/arm/plat-mxc/tzic.c
浏览文件 @
b6d17c1a
...
@@ -164,8 +164,9 @@ int tzic_enable_wake(int is_idle)
...
@@ -164,8 +164,9 @@ int tzic_enable_wake(int is_idle)
return
-
EAGAIN
;
return
-
EAGAIN
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
v
=
is_idle
?
__raw_readl
(
TZIC_ENSET0
(
i
))
:
wakeup_intr
[
i
];
v
=
is_idle
?
__raw_readl
(
tzic_base
+
TZIC_ENSET0
(
i
))
:
__raw_writel
(
v
,
TZIC_WAKEUP0
(
i
));
wakeup_intr
[
i
];
__raw_writel
(
v
,
tzic_base
+
TZIC_WAKEUP0
(
i
));
}
}
return
0
;
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录