Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
71baa1a5
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,发现更多精彩内容 >>
提交
71baa1a5
编写于
1月 15, 2006
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MIPS] Get rid of unnecessary prototypes. Fixes and optimizations for HZ > 100.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
05faa7b7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
27 deletion
+25
-27
arch/mips/sgi-ip22/ip22-reset.c
arch/mips/sgi-ip22/ip22-reset.c
+25
-27
未找到文件。
arch/mips/sgi-ip22/ip22-reset.c
浏览文件 @
71baa1a5
...
...
@@ -3,8 +3,9 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1997, 1998, 2001,
2003
by Ralf Baechle
* Copyright (C) 1997, 1998, 2001,
03, 05
by Ralf Baechle
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/ds1286.h>
#include <linux/module.h>
...
...
@@ -41,28 +42,10 @@ static struct timer_list power_timer, blink_timer, debounce_timer, volume_timer;
#define MACHINE_PANICED 1
#define MACHINE_SHUTTING_DOWN 2
static
int
machine_state
=
0
;
static
void
sgi_machine_restart
(
char
*
command
)
__attribute__
((
noreturn
));
static
void
sgi_machine_halt
(
void
)
__attribute__
((
noreturn
));
static
void
sgi_machine_power_off
(
void
)
__attribute__
((
noreturn
));
static
int
machine_state
;
static
void
sgi_machine_restart
(
char
*
command
)
{
if
(
machine_state
&
MACHINE_SHUTTING_DOWN
)
sgi_machine_power_off
();
sgimc
->
cpuctrl0
|=
SGIMC_CCTRL0_SYSINIT
;
while
(
1
);
}
static
void
sgi_machine_halt
(
void
)
{
if
(
machine_state
&
MACHINE_SHUTTING_DOWN
)
sgi_machine_power_off
();
ArcEnterInteractiveMode
();
}
static
void
sgi_machine_power_off
(
void
)
static
void
ATTRIB_NORET
sgi_machine_power_off
(
void
)
{
unsigned
int
tmp
;
...
...
@@ -84,6 +67,21 @@ static void sgi_machine_power_off(void)
}
}
static
void
ATTRIB_NORET
sgi_machine_restart
(
char
*
command
)
{
if
(
machine_state
&
MACHINE_SHUTTING_DOWN
)
sgi_machine_power_off
();
sgimc
->
cpuctrl0
|=
SGIMC_CCTRL0_SYSINIT
;
while
(
1
);
}
static
void
ATTRIB_NORET
sgi_machine_halt
(
void
)
{
if
(
machine_state
&
MACHINE_SHUTTING_DOWN
)
sgi_machine_power_off
();
ArcEnterInteractiveMode
();
}
static
void
power_timeout
(
unsigned
long
data
)
{
sgi_machine_power_off
();
...
...
@@ -95,7 +93,7 @@ static void blink_timeout(unsigned long data)
sgi_ioc_reset
^=
(
SGIOC_RESET_LC0OFF
|
SGIOC_RESET_LC1OFF
);
sgioc
->
reset
=
sgi_ioc_reset
;
mod_timer
(
&
blink_timer
,
jiffies
+
data
);
mod_timer
(
&
blink_timer
,
jiffies
+
data
);
}
static
void
debounce
(
unsigned
long
data
)
...
...
@@ -103,7 +101,7 @@ static void debounce(unsigned long data)
del_timer
(
&
debounce_timer
);
if
(
sgint
->
istat1
&
SGINT_ISTAT1_PWR
)
{
/* Interrupt still being sent. */
debounce_timer
.
expires
=
jiffies
+
5
;
/* 0.05s */
debounce_timer
.
expires
=
jiffies
+
(
HZ
/
20
)
;
/* 0.05s */
add_timer
(
&
debounce_timer
);
sgioc
->
panel
=
SGIOC_PANEL_POWERON
|
SGIOC_PANEL_POWERINTR
|
...
...
@@ -151,7 +149,7 @@ static inline void volume_up_button(unsigned long data)
indy_volume_button
(
1
);
if
(
sgint
->
istat1
&
SGINT_ISTAT1_PWR
)
{
volume_timer
.
expires
=
jiffies
+
1
;
volume_timer
.
expires
=
jiffies
+
(
HZ
/
100
)
;
add_timer
(
&
volume_timer
);
}
}
...
...
@@ -164,7 +162,7 @@ static inline void volume_down_button(unsigned long data)
indy_volume_button
(
-
1
);
if
(
sgint
->
istat1
&
SGINT_ISTAT1_PWR
)
{
volume_timer
.
expires
=
jiffies
+
1
;
volume_timer
.
expires
=
jiffies
+
(
HZ
/
100
)
;
add_timer
(
&
volume_timer
);
}
}
...
...
@@ -199,14 +197,14 @@ static irqreturn_t panel_int(int irq, void *dev_id, struct pt_regs *regs)
if
(
!
(
buttons
&
SGIOC_PANEL_VOLUPINTR
))
{
init_timer
(
&
volume_timer
);
volume_timer
.
function
=
volume_up_button
;
volume_timer
.
expires
=
jiffies
+
1
;
volume_timer
.
expires
=
jiffies
+
(
HZ
/
100
)
;
add_timer
(
&
volume_timer
);
}
/* Volume down button was pressed */
if
(
!
(
buttons
&
SGIOC_PANEL_VOLDNINTR
))
{
init_timer
(
&
volume_timer
);
volume_timer
.
function
=
volume_down_button
;
volume_timer
.
expires
=
jiffies
+
1
;
volume_timer
.
expires
=
jiffies
+
(
HZ
/
100
)
;
add_timer
(
&
volume_timer
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录