Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
49e7dc54
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
49e7dc54
编写于
4月 30, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge of master.kernel.org:/home/rmk/linux-2.6-rmk.git
上级
9ea1f8f5
bb9bffcb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
60 addition
and
23 deletion
+60
-23
arch/arm/common/rtctime.c
arch/arm/common/rtctime.c
+15
-14
arch/arm/mach-integrator/time.c
arch/arm/mach-integrator/time.c
+12
-5
arch/arm/mach-pxa/generic.c
arch/arm/mach-pxa/generic.c
+25
-0
drivers/char/s3c2410-rtc.c
drivers/char/s3c2410-rtc.c
+6
-2
include/asm-arm/rtc.h
include/asm-arm/rtc.h
+2
-2
未找到文件。
arch/arm/common/rtctime.c
浏览文件 @
49e7dc54
...
...
@@ -141,10 +141,10 @@ void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now, struct rtc
next
->
tm_sec
=
alrm
->
tm_sec
;
}
static
inline
void
rtc_read_time
(
struct
rtc_ops
*
ops
,
struct
rtc_time
*
tm
)
static
inline
int
rtc_read_time
(
struct
rtc_ops
*
ops
,
struct
rtc_time
*
tm
)
{
memset
(
tm
,
0
,
sizeof
(
struct
rtc_time
));
ops
->
read_time
(
tm
);
return
ops
->
read_time
(
tm
);
}
static
inline
int
rtc_set_time
(
struct
rtc_ops
*
ops
,
struct
rtc_time
*
tm
)
...
...
@@ -163,8 +163,7 @@ static inline int rtc_read_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm)
int
ret
=
-
EINVAL
;
if
(
ops
->
read_alarm
)
{
memset
(
alrm
,
0
,
sizeof
(
struct
rtc_wkalrm
));
ops
->
read_alarm
(
alrm
);
ret
=
0
;
ret
=
ops
->
read_alarm
(
alrm
);
}
return
ret
;
}
...
...
@@ -283,7 +282,9 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
break
;
case
RTC_RD_TIME
:
rtc_read_time
(
ops
,
&
tm
);
ret
=
rtc_read_time
(
ops
,
&
tm
);
if
(
ret
)
break
;
ret
=
copy_to_user
(
uarg
,
&
tm
,
sizeof
(
tm
));
if
(
ret
)
ret
=
-
EFAULT
;
...
...
@@ -424,15 +425,15 @@ static int rtc_read_proc(char *page, char **start, off_t off, int count, int *eo
struct
rtc_time
tm
;
char
*
p
=
page
;
rtc_read_time
(
ops
,
&
tm
);
p
+=
sprintf
(
p
,
"rtc_time
\t
: %02d:%02d:
%02d
\n
"
"rtc_date
\t
: %04d-%02d-%02d
\n
"
"rtc_epoch
\t
: %04lu
\n
"
,
tm
.
tm_hour
,
tm
.
tm_min
,
tm
.
tm_sec
,
tm
.
tm_year
+
1900
,
tm
.
tm_mon
+
1
,
tm
.
tm_mday
,
rtc_epoch
);
if
(
rtc_read_time
(
ops
,
&
tm
)
==
0
)
{
p
+=
sprintf
(
p
,
"rtc_time
\t
: %02d:%02d:%02d
\n
"
"rtc_date
\t
: %04d-%02d-
%02d
\n
"
"rtc_epoch
\t
: %04lu
\n
"
,
tm
.
tm_hour
,
tm
.
tm_min
,
tm
.
tm_sec
,
tm
.
tm_year
+
1900
,
tm
.
tm_mon
+
1
,
tm
.
tm_mday
,
rtc_epoch
);
}
if
(
rtc_read_alarm
(
ops
,
&
alrm
)
==
0
)
{
p
+=
sprintf
(
p
,
"alrm_time
\t
: "
);
...
...
arch/arm/mach-integrator/time.c
浏览文件 @
49e7dc54
...
...
@@ -40,25 +40,32 @@ static int integrator_set_rtc(void)
return
1
;
}
static
void
rtc_read_alarm
(
struct
rtc_wkalrm
*
alrm
)
static
int
rtc_read_alarm
(
struct
rtc_wkalrm
*
alrm
)
{
rtc_time_to_tm
(
readl
(
rtc_base
+
RTC_MR
),
&
alrm
->
time
);
return
0
;
}
static
int
rtc_set_alarm
(
struct
rtc_wkalrm
*
alrm
)
static
in
line
in
t
rtc_set_alarm
(
struct
rtc_wkalrm
*
alrm
)
{
unsigned
long
time
;
int
ret
;
ret
=
rtc_tm_to_time
(
&
alrm
->
time
,
&
time
);
/*
* At the moment, we can only deal with non-wildcarded alarm times.
*/
ret
=
rtc_valid_tm
(
&
alrm
->
time
);
if
(
ret
==
0
)
ret
=
rtc_tm_to_time
(
&
alrm
->
time
,
&
time
);
if
(
ret
==
0
)
writel
(
time
,
rtc_base
+
RTC_MR
);
return
ret
;
}
static
void
rtc_read_time
(
struct
rtc_time
*
tm
)
static
int
rtc_read_time
(
struct
rtc_time
*
tm
)
{
rtc_time_to_tm
(
readl
(
rtc_base
+
RTC_DR
),
tm
);
return
0
;
}
/*
...
...
@@ -69,7 +76,7 @@ static void rtc_read_time(struct rtc_time *tm)
* edge of the 1Hz clock, we must write the time one second
* in advance.
*/
static
int
rtc_set_time
(
struct
rtc_time
*
tm
)
static
in
line
in
t
rtc_set_time
(
struct
rtc_time
*
tm
)
{
unsigned
long
time
;
int
ret
;
...
...
arch/arm/mach-pxa/generic.c
浏览文件 @
49e7dc54
...
...
@@ -220,6 +220,30 @@ static struct platform_device stuart_device = {
.
id
=
2
,
};
static
struct
resource
i2c_resources
[]
=
{
{
.
start
=
0x40301680
,
.
end
=
0x403016a3
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
IRQ_I2C
,
.
end
=
IRQ_I2C
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
struct
platform_device
i2c_device
=
{
.
name
=
"pxa2xx-i2c"
,
.
id
=
0
,
.
resource
=
i2c_resources
,
.
num_resources
=
ARRAY_SIZE
(
i2c_resources
),
};
void
__init
pxa_set_i2c_info
(
struct
i2c_pxa_platform_data
*
info
)
{
i2c_device
.
dev
.
platform_data
=
info
;
}
static
struct
platform_device
*
devices
[]
__initdata
=
{
&
pxamci_device
,
&
udc_device
,
...
...
@@ -227,6 +251,7 @@ static struct platform_device *devices[] __initdata = {
&
ffuart_device
,
&
btuart_device
,
&
stuart_device
,
&
i2c_device
,
};
static
int
__init
pxa_init
(
void
)
...
...
drivers/char/s3c2410-rtc.c
浏览文件 @
49e7dc54
...
...
@@ -116,7 +116,7 @@ static void s3c2410_rtc_setfreq(int freq)
/* Time read/write */
static
void
s3c2410_rtc_gettime
(
struct
rtc_time
*
rtc_tm
)
static
int
s3c2410_rtc_gettime
(
struct
rtc_time
*
rtc_tm
)
{
unsigned
int
have_retried
=
0
;
...
...
@@ -151,6 +151,8 @@ static void s3c2410_rtc_gettime(struct rtc_time *rtc_tm)
rtc_tm
->
tm_year
+=
100
;
rtc_tm
->
tm_mon
-=
1
;
return
0
;
}
...
...
@@ -171,7 +173,7 @@ static int s3c2410_rtc_settime(struct rtc_time *tm)
return
0
;
}
static
void
s3c2410_rtc_getalarm
(
struct
rtc_wkalrm
*
alrm
)
static
int
s3c2410_rtc_getalarm
(
struct
rtc_wkalrm
*
alrm
)
{
struct
rtc_time
*
alm_tm
=
&
alrm
->
time
;
unsigned
int
alm_en
;
...
...
@@ -231,6 +233,8 @@ static void s3c2410_rtc_getalarm(struct rtc_wkalrm *alrm)
}
/* todo - set alrm->enabled ? */
return
0
;
}
static
int
s3c2410_rtc_setalarm
(
struct
rtc_wkalrm
*
alrm
)
...
...
include/asm-arm/rtc.h
浏览文件 @
49e7dc54
...
...
@@ -18,9 +18,9 @@ struct rtc_ops {
void
(
*
release
)(
void
);
int
(
*
ioctl
)(
unsigned
int
,
unsigned
long
);
void
(
*
read_time
)(
struct
rtc_time
*
);
int
(
*
read_time
)(
struct
rtc_time
*
);
int
(
*
set_time
)(
struct
rtc_time
*
);
void
(
*
read_alarm
)(
struct
rtc_wkalrm
*
);
int
(
*
read_alarm
)(
struct
rtc_wkalrm
*
);
int
(
*
set_alarm
)(
struct
rtc_wkalrm
*
);
int
(
*
proc
)(
char
*
buf
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录