Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
65670a1b
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
65670a1b
编写于
11月 08, 2010
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'rmobile/core' into rmobile-fixes-for-linus
上级
151f52f0
2f6ba579
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
171 addition
and
34 deletion
+171
-34
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/Kconfig
+2
-0
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-ap4evb.c
+45
-1
arch/arm/mach-shmobile/clock-sh7372.c
arch/arm/mach-shmobile/clock-sh7372.c
+102
-0
arch/arm/mach-shmobile/include/mach/gpio.h
arch/arm/mach-shmobile/include/mach/gpio.h
+2
-2
arch/arm/mach-shmobile/include/mach/sh7372.h
arch/arm/mach-shmobile/include/mach/sh7372.h
+2
-0
drivers/clocksource/sh_cmt.c
drivers/clocksource/sh_cmt.c
+3
-7
drivers/clocksource/sh_mtu2.c
drivers/clocksource/sh_mtu2.c
+3
-7
drivers/clocksource/sh_tmu.c
drivers/clocksource/sh_tmu.c
+3
-7
include/linux/mmc/sh_mmcif.h
include/linux/mmc/sh_mmcif.h
+9
-9
include/linux/sh_timer.h
include/linux/sh_timer.h
+0
-1
未找到文件。
arch/arm/mach-shmobile/Kconfig
浏览文件 @
65670a1b
...
...
@@ -116,4 +116,6 @@ endmenu
config SH_CLK_CPG
bool
source "drivers/sh/Kconfig"
endif
arch/arm/mach-shmobile/board-ap4evb.c
浏览文件 @
65670a1b
...
...
@@ -565,12 +565,50 @@ static struct platform_device *qhd_devices[] __initdata = {
/* FSI */
#define IRQ_FSI evt2irq(0x1840)
static
int
fsi_set_rate
(
int
is_porta
,
int
rate
)
{
struct
clk
*
fsib_clk
;
struct
clk
*
fdiv_clk
=
&
sh7372_fsidivb_clk
;
int
ret
;
/* set_rate is not needed if port A */
if
(
is_porta
)
return
0
;
fsib_clk
=
clk_get
(
NULL
,
"fsib_clk"
);
if
(
IS_ERR
(
fsib_clk
))
return
-
EINVAL
;
switch
(
rate
)
{
case
48000
:
clk_set_rate
(
fsib_clk
,
clk_round_rate
(
fsib_clk
,
85428000
));
clk_set_rate
(
fdiv_clk
,
clk_round_rate
(
fdiv_clk
,
12204000
));
ret
=
SH_FSI_ACKMD_256
|
SH_FSI_BPFMD_64
;
break
;
default:
pr_err
(
"unsupported rate in FSI2 port B
\n
"
);
ret
=
-
EINVAL
;
break
;
}
clk_put
(
fsib_clk
);
return
ret
;
}
static
struct
sh_fsi_platform_info
fsi_info
=
{
.
porta_flags
=
SH_FSI_BRS_INV
|
SH_FSI_OUT_SLAVE_MODE
|
SH_FSI_IN_SLAVE_MODE
|
SH_FSI_OFMT
(
PCM
)
|
SH_FSI_IFMT
(
PCM
),
.
portb_flags
=
SH_FSI_BRS_INV
|
SH_FSI_BRM_INV
|
SH_FSI_LRS_INV
|
SH_FSI_OFMT
(
SPDIF
),
.
set_rate
=
fsi_set_rate
,
};
static
struct
resource
fsi_resources
[]
=
{
...
...
@@ -634,6 +672,7 @@ static struct platform_device lcdc1_device = {
static
struct
sh_mobile_hdmi_info
hdmi_info
=
{
.
lcd_chan
=
&
sh_mobile_lcdc1_info
.
ch
[
0
],
.
lcd_dev
=
&
lcdc1_device
.
dev
,
.
flags
=
HDMI_SND_SRC_SPDIF
,
};
static
struct
resource
hdmi_resources
[]
=
{
...
...
@@ -992,6 +1031,7 @@ static void __init ap4evb_map_io(void)
#define GPIO_PORT9CR 0xE6051009
#define GPIO_PORT10CR 0xE605100A
#define USCCR1 0xE6058144
static
void
__init
ap4evb_init
(
void
)
{
u32
srcr4
;
...
...
@@ -1062,7 +1102,7 @@ static void __init ap4evb_init(void)
/* setup USB phy */
__raw_writew
(
0x8a0a
,
0xE6058130
);
/* USBCR2 */
/* enable FSI2 */
/* enable FSI2
port A (ak4643)
*/
gpio_request
(
GPIO_FN_FSIAIBT
,
NULL
);
gpio_request
(
GPIO_FN_FSIAILR
,
NULL
);
gpio_request
(
GPIO_FN_FSIAISLD
,
NULL
);
...
...
@@ -1079,6 +1119,10 @@ static void __init ap4evb_init(void)
gpio_request
(
GPIO_PORT41
,
NULL
);
gpio_direction_input
(
GPIO_PORT41
);
/* setup FSI2 port B (HDMI) */
gpio_request
(
GPIO_FN_FSIBCK
,
NULL
);
__raw_writew
(
__raw_readw
(
USCCR1
)
&
~
(
1
<<
6
),
USCCR1
);
/* use SPDIF */
/* set SPU2 clock to 119.6 MHz */
clk
=
clk_get
(
NULL
,
"spu_clk"
);
if
(
!
IS_ERR
(
clk
))
{
...
...
arch/arm/mach-shmobile/clock-sh7372.c
浏览文件 @
65670a1b
...
...
@@ -50,6 +50,9 @@
#define SMSTPCR3 0xe615013c
#define SMSTPCR4 0xe6150140
#define FSIDIVA 0xFE1F8000
#define FSIDIVB 0xFE1F8008
/* Platforms must set frequency on their DV_CLKI pin */
struct
clk
sh7372_dv_clki_clk
=
{
};
...
...
@@ -288,6 +291,7 @@ struct clk sh7372_pllc2_clk = {
.
ops
=
&
pllc2_clk_ops
,
.
parent
=
&
extal1_div2_clk
,
.
freq_table
=
pllc2_freq_table
,
.
nr_freqs
=
ARRAY_SIZE
(
pllc2_freq_table
)
-
1
,
.
parent_table
=
pllc2_parent
,
.
parent_num
=
ARRAY_SIZE
(
pllc2_parent
),
};
...
...
@@ -417,6 +421,101 @@ static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = {
fsibckcr_parent
,
ARRAY_SIZE
(
fsibckcr_parent
),
6
,
2
),
};
/* FSI DIV */
static
unsigned
long
fsidiv_recalc
(
struct
clk
*
clk
)
{
unsigned
long
value
;
value
=
__raw_readl
(
clk
->
mapping
->
base
);
if
((
value
&
0x3
)
!=
0x3
)
return
0
;
value
>>=
16
;
if
(
value
<
2
)
return
0
;
return
clk
->
parent
->
rate
/
value
;
}
static
long
fsidiv_round_rate
(
struct
clk
*
clk
,
unsigned
long
rate
)
{
return
clk_rate_div_range_round
(
clk
,
2
,
0xffff
,
rate
);
}
static
void
fsidiv_disable
(
struct
clk
*
clk
)
{
__raw_writel
(
0
,
clk
->
mapping
->
base
);
}
static
int
fsidiv_enable
(
struct
clk
*
clk
)
{
unsigned
long
value
;
value
=
__raw_readl
(
clk
->
mapping
->
base
)
>>
16
;
if
(
value
<
2
)
{
fsidiv_disable
(
clk
);
return
-
ENOENT
;
}
__raw_writel
((
value
<<
16
)
|
0x3
,
clk
->
mapping
->
base
);
return
0
;
}
static
int
fsidiv_set_rate
(
struct
clk
*
clk
,
unsigned
long
rate
,
int
algo_id
)
{
int
idx
;
if
(
clk
->
parent
->
rate
==
rate
)
{
fsidiv_disable
(
clk
);
return
0
;
}
idx
=
(
clk
->
parent
->
rate
/
rate
)
&
0xffff
;
if
(
idx
<
2
)
return
-
ENOENT
;
__raw_writel
(
idx
<<
16
,
clk
->
mapping
->
base
);
return
fsidiv_enable
(
clk
);
}
static
struct
clk_ops
fsidiv_clk_ops
=
{
.
recalc
=
fsidiv_recalc
,
.
round_rate
=
fsidiv_round_rate
,
.
set_rate
=
fsidiv_set_rate
,
.
enable
=
fsidiv_enable
,
.
disable
=
fsidiv_disable
,
};
static
struct
clk_mapping
sh7372_fsidiva_clk_mapping
=
{
.
phys
=
FSIDIVA
,
.
len
=
8
,
};
struct
clk
sh7372_fsidiva_clk
=
{
.
ops
=
&
fsidiv_clk_ops
,
.
parent
=
&
div6_reparent_clks
[
DIV6_FSIA
],
/* late install */
.
mapping
=
&
sh7372_fsidiva_clk_mapping
,
};
static
struct
clk_mapping
sh7372_fsidivb_clk_mapping
=
{
.
phys
=
FSIDIVB
,
.
len
=
8
,
};
struct
clk
sh7372_fsidivb_clk
=
{
.
ops
=
&
fsidiv_clk_ops
,
.
parent
=
&
div6_reparent_clks
[
DIV6_FSIB
],
/* late install */
.
mapping
=
&
sh7372_fsidivb_clk_mapping
,
};
static
struct
clk
*
late_main_clks
[]
=
{
&
sh7372_fsidiva_clk
,
&
sh7372_fsidivb_clk
,
};
enum
{
MSTP001
,
MSTP131
,
MSTP130
,
MSTP129
,
MSTP128
,
MSTP127
,
MSTP126
,
MSTP125
,
...
...
@@ -585,6 +684,9 @@ void __init sh7372_clock_init(void)
if
(
!
ret
)
ret
=
sh_clk_mstp32_register
(
mstp_clks
,
MSTP_NR
);
for
(
k
=
0
;
!
ret
&&
(
k
<
ARRAY_SIZE
(
late_main_clks
));
k
++
)
ret
=
clk_register
(
late_main_clks
[
k
]);
clkdev_add_table
(
lookups
,
ARRAY_SIZE
(
lookups
));
if
(
!
ret
)
...
...
arch/arm/mach-shmobile/include/mach/gpio.h
浏览文件 @
65670a1b
...
...
@@ -35,12 +35,12 @@ static inline int gpio_cansleep(unsigned gpio)
static
inline
int
gpio_to_irq
(
unsigned
gpio
)
{
return
-
ENOSYS
;
return
__gpio_to_irq
(
gpio
)
;
}
static
inline
int
irq_to_gpio
(
unsigned
int
irq
)
{
return
-
E
INVAL
;
return
-
E
NOSYS
;
}
#endif
/* CONFIG_GPIOLIB */
...
...
arch/arm/mach-shmobile/include/mach/sh7372.h
浏览文件 @
65670a1b
...
...
@@ -464,5 +464,7 @@ extern struct clk sh7372_dv_clki_div2_clk;
extern
struct
clk
sh7372_pllc2_clk
;
extern
struct
clk
sh7372_fsiack_clk
;
extern
struct
clk
sh7372_fsibck_clk
;
extern
struct
clk
sh7372_fsidiva_clk
;
extern
struct
clk
sh7372_fsidivb_clk
;
#endif
/* __ASM_SH7372_H__ */
drivers/clocksource/sh_cmt.c
浏览文件 @
65670a1b
...
...
@@ -615,15 +615,11 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
/* get hold of clock */
p
->
clk
=
clk_get
(
&
p
->
pdev
->
dev
,
"cmt_fck"
);
if
(
IS_ERR
(
p
->
clk
))
{
dev_warn
(
&
p
->
pdev
->
dev
,
"using deprecated clock lookup
\n
"
);
p
->
clk
=
clk_get
(
&
p
->
pdev
->
dev
,
cfg
->
clk
);
if
(
IS_ERR
(
p
->
clk
))
{
dev_err
(
&
p
->
pdev
->
dev
,
"cannot get clock
\n
"
);
ret
=
PTR_ERR
(
p
->
clk
);
goto
err1
;
}
}
if
(
resource_size
(
res
)
==
6
)
{
p
->
width
=
16
;
...
...
drivers/clocksource/sh_mtu2.c
浏览文件 @
65670a1b
...
...
@@ -286,15 +286,11 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
/* get hold of clock */
p
->
clk
=
clk_get
(
&
p
->
pdev
->
dev
,
"mtu2_fck"
);
if
(
IS_ERR
(
p
->
clk
))
{
dev_warn
(
&
p
->
pdev
->
dev
,
"using deprecated clock lookup
\n
"
);
p
->
clk
=
clk_get
(
&
p
->
pdev
->
dev
,
cfg
->
clk
);
if
(
IS_ERR
(
p
->
clk
))
{
dev_err
(
&
p
->
pdev
->
dev
,
"cannot get clock
\n
"
);
ret
=
PTR_ERR
(
p
->
clk
);
goto
err1
;
}
}
return
sh_mtu2_register
(
p
,
(
char
*
)
dev_name
(
&
p
->
pdev
->
dev
),
cfg
->
clockevent_rating
);
...
...
drivers/clocksource/sh_tmu.c
浏览文件 @
65670a1b
...
...
@@ -392,15 +392,11 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
/* get hold of clock */
p
->
clk
=
clk_get
(
&
p
->
pdev
->
dev
,
"tmu_fck"
);
if
(
IS_ERR
(
p
->
clk
))
{
dev_warn
(
&
p
->
pdev
->
dev
,
"using deprecated clock lookup
\n
"
);
p
->
clk
=
clk_get
(
&
p
->
pdev
->
dev
,
cfg
->
clk
);
if
(
IS_ERR
(
p
->
clk
))
{
dev_err
(
&
p
->
pdev
->
dev
,
"cannot get clock
\n
"
);
ret
=
PTR_ERR
(
p
->
clk
);
goto
err1
;
}
}
return
sh_tmu_register
(
p
,
(
char
*
)
dev_name
(
&
p
->
pdev
->
dev
),
cfg
->
clockevent_rating
,
...
...
include/linux/mmc/sh_mmcif.h
浏览文件 @
65670a1b
...
...
@@ -59,19 +59,19 @@ struct sh_mmcif_plat_data {
#define MMCIF_CE_HOST_STS2 0x0000004C
#define MMCIF_CE_VERSION 0x0000007C
extern
inline
u32
sh_mmcif_readl
(
void
__iomem
*
addr
,
int
reg
)
static
inline
u32
sh_mmcif_readl
(
void
__iomem
*
addr
,
int
reg
)
{
return
readl
(
addr
+
reg
);
}
extern
inline
void
sh_mmcif_writel
(
void
__iomem
*
addr
,
int
reg
,
u32
val
)
static
inline
void
sh_mmcif_writel
(
void
__iomem
*
addr
,
int
reg
,
u32
val
)
{
writel
(
val
,
addr
+
reg
);
}
#define SH_MMCIF_BBS 512
/* boot block size */
extern
inline
void
sh_mmcif_boot_cmd_send
(
void
__iomem
*
base
,
static
inline
void
sh_mmcif_boot_cmd_send
(
void
__iomem
*
base
,
unsigned
long
cmd
,
unsigned
long
arg
)
{
sh_mmcif_writel
(
base
,
MMCIF_CE_INT
,
0
);
...
...
@@ -79,7 +79,7 @@ extern inline void sh_mmcif_boot_cmd_send(void __iomem *base,
sh_mmcif_writel
(
base
,
MMCIF_CE_CMD_SET
,
cmd
);
}
extern
inline
int
sh_mmcif_boot_cmd_poll
(
void
__iomem
*
base
,
unsigned
long
mask
)
static
inline
int
sh_mmcif_boot_cmd_poll
(
void
__iomem
*
base
,
unsigned
long
mask
)
{
unsigned
long
tmp
;
int
cnt
;
...
...
@@ -95,14 +95,14 @@ extern inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask)
return
-
1
;
}
extern
inline
int
sh_mmcif_boot_cmd
(
void
__iomem
*
base
,
static
inline
int
sh_mmcif_boot_cmd
(
void
__iomem
*
base
,
unsigned
long
cmd
,
unsigned
long
arg
)
{
sh_mmcif_boot_cmd_send
(
base
,
cmd
,
arg
);
return
sh_mmcif_boot_cmd_poll
(
base
,
0x00010000
);
}
extern
inline
int
sh_mmcif_boot_do_read_single
(
void
__iomem
*
base
,
static
inline
int
sh_mmcif_boot_do_read_single
(
void
__iomem
*
base
,
unsigned
int
block_nr
,
unsigned
long
*
buf
)
{
...
...
@@ -125,7 +125,7 @@ extern inline int sh_mmcif_boot_do_read_single(void __iomem *base,
return
0
;
}
extern
inline
int
sh_mmcif_boot_do_read
(
void
__iomem
*
base
,
static
inline
int
sh_mmcif_boot_do_read
(
void
__iomem
*
base
,
unsigned
long
first_block
,
unsigned
long
nr_blocks
,
void
*
buf
)
...
...
@@ -143,7 +143,7 @@ extern inline int sh_mmcif_boot_do_read(void __iomem *base,
return
ret
;
}
extern
inline
void
sh_mmcif_boot_init
(
void
__iomem
*
base
)
static
inline
void
sh_mmcif_boot_init
(
void
__iomem
*
base
)
{
unsigned
long
tmp
;
...
...
@@ -177,7 +177,7 @@ extern inline void sh_mmcif_boot_init(void __iomem *base)
sh_mmcif_boot_cmd
(
base
,
0x03400040
,
0x00010000
);
}
extern
inline
void
sh_mmcif_boot_slurp
(
void
__iomem
*
base
,
static
inline
void
sh_mmcif_boot_slurp
(
void
__iomem
*
base
,
unsigned
char
*
buf
,
unsigned
long
no_bytes
)
{
...
...
include/linux/sh_timer.h
浏览文件 @
65670a1b
...
...
@@ -5,7 +5,6 @@ struct sh_timer_config {
char
*
name
;
long
channel_offset
;
int
timer_bit
;
char
*
clk
;
unsigned
long
clockevent_rating
;
unsigned
long
clocksource_rating
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录