Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
78709b9d
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
78709b9d
编写于
4月 26, 2007
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MIPS] IP22: Get rid of volatile in IP22 core code.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
2127435e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
22 addition
and
22 deletion
+22
-22
arch/mips/sgi-ip22/ip22-nvram.c
arch/mips/sgi-ip22/ip22-nvram.c
+12
-12
arch/mips/sgi-ip22/ip22-time.c
arch/mips/sgi-ip22/ip22-time.c
+7
-7
include/asm-mips/sgi/hpc3.h
include/asm-mips/sgi/hpc3.h
+1
-1
include/asm-mips/sgi/ip22.h
include/asm-mips/sgi/ip22.h
+1
-1
include/asm-mips/sgi/mc.h
include/asm-mips/sgi/mc.h
+1
-1
未找到文件。
arch/mips/sgi-ip22/ip22-nvram.c
浏览文件 @
78709b9d
...
...
@@ -52,8 +52,7 @@
* national semiconductor nv ram chip the op code is 3 bits and
* the address is 6/8 bits.
*/
static
inline
void
eeprom_cmd
(
volatile
unsigned
int
*
ctrl
,
unsigned
cmd
,
unsigned
reg
)
static
inline
void
eeprom_cmd
(
unsigned
int
*
ctrl
,
unsigned
cmd
,
unsigned
reg
)
{
unsigned
short
ser_cmd
;
int
i
;
...
...
@@ -61,33 +60,34 @@ static inline void eeprom_cmd(volatile unsigned int *ctrl, unsigned cmd,
ser_cmd
=
cmd
|
(
reg
<<
(
16
-
BITS_IN_COMMAND
));
for
(
i
=
0
;
i
<
BITS_IN_COMMAND
;
i
++
)
{
if
(
ser_cmd
&
(
1
<<
15
))
/* if high order bit set */
*
ctrl
|=
EEPROM_DATO
;
writel
(
readl
(
ctrl
)
|
EEPROM_DATO
,
ctrl
)
;
else
*
ctrl
&=
~
EEPROM_DATO
;
*
ctrl
&=
~
EEPROM_ECLK
;
*
ctrl
|=
EEPROM_ECLK
;
writel
(
readl
(
ctrl
)
&
~
EEPROM_DATO
,
ctrl
)
;
writel
(
readl
(
ctrl
)
&
~
EEPROM_ECLK
,
ctrl
)
;
writel
(
readl
(
ctrl
)
|
EEPROM_ECLK
,
ctrl
)
;
ser_cmd
<<=
1
;
}
*
ctrl
&=
~
EEPROM_DATO
;
/* see data sheet timing diagram */
/* see data sheet timing diagram */
writel
(
readl
(
ctrl
)
&
~
EEPROM_DATO
,
ctrl
);
}
unsigned
short
ip22_eeprom_read
(
volatile
unsigned
int
*
ctrl
,
int
reg
)
unsigned
short
ip22_eeprom_read
(
unsigned
int
*
ctrl
,
int
reg
)
{
unsigned
short
res
=
0
;
int
i
;
*
ctrl
&=
~
EEPROM_EPROT
;
writel
(
readl
(
ctrl
)
&
~
EEPROM_EPROT
,
ctrl
)
;
eeprom_cs_on
(
ctrl
);
eeprom_cmd
(
ctrl
,
EEPROM_READ
,
reg
);
/* clock the data ouf of serial mem */
for
(
i
=
0
;
i
<
16
;
i
++
)
{
*
ctrl
&=
~
EEPROM_ECLK
;
writel
(
readl
(
ctrl
)
&
~
EEPROM_ECLK
,
ctrl
)
;
delay
();
*
ctrl
|=
EEPROM_ECLK
;
writel
(
readl
(
ctrl
)
|
EEPROM_ECLK
,
ctrl
)
;
delay
();
res
<<=
1
;
if
(
*
ctrl
&
EEPROM_DATI
)
if
(
readl
(
ctrl
)
&
EEPROM_DATI
)
res
|=
1
;
}
...
...
arch/mips/sgi-ip22/ip22-time.c
浏览文件 @
78709b9d
...
...
@@ -94,7 +94,7 @@ static int indy_rtc_set_time(unsigned long tim)
static
unsigned
long
dosample
(
void
)
{
u32
ct0
,
ct1
;
volatile
u8
msb
,
lsb
;
u8
msb
,
lsb
;
/* Start the counter. */
sgint
->
tcword
=
(
SGINT_TCWORD_CNT2
|
SGINT_TCWORD_CALL
|
...
...
@@ -107,21 +107,21 @@ static unsigned long dosample(void)
/* Latch and spin until top byte of counter2 is zero */
do
{
sgint
->
tcword
=
SGINT_TCWORD_CNT2
|
SGINT_TCWORD_CLAT
;
lsb
=
sgint
->
tcnt2
;
msb
=
sgint
->
tcnt2
;
writeb
(
SGINT_TCWORD_CNT2
|
SGINT_TCWORD_CLAT
,
&
sgint
->
tcword
)
;
lsb
=
readb
(
&
sgint
->
tcnt2
)
;
msb
=
readb
(
&
sgint
->
tcnt2
)
;
ct1
=
read_c0_count
();
}
while
(
msb
);
/* Stop the counter. */
sgint
->
tcword
=
(
SGINT_TCWORD_CNT2
|
SGINT_TCWORD_CALL
|
SGINT_TCWORD_MSWST
);
writeb
(
sgint
->
tcword
,
(
SGINT_TCWORD_CNT2
|
SGINT_TCWORD_CALL
|
SGINT_TCWORD_MSWST
)
);
/*
* Return the difference, this is how far the r4k counter increments
* for every 1/HZ seconds. We round off the nearest 1 MHz of master
* clock (= 1000000 / HZ / 2).
*/
/*return (ct1 - ct0 + (500000/HZ/2)) / (500000/HZ) * (500000/HZ);*/
return
(
ct1
-
ct0
)
/
(
500000
/
HZ
)
*
(
500000
/
HZ
);
}
...
...
include/asm-mips/sgi/hpc3.h
浏览文件 @
78709b9d
...
...
@@ -206,7 +206,7 @@ struct hpc3_regs {
#define HPC3_GIOMISC_ERTIME 0x1
/* Enable external timer real time. */
#define HPC3_GIOMISC_DENDIAN 0x2
/* dma descriptor endian, 1=lit 0=big */
volatile
u32
eeprom
;
/* EEPROM data reg. */
u32
eeprom
;
/* EEPROM data reg. */
#define HPC3_EEPROM_EPROT 0x01
/* Protect register enable */
#define HPC3_EEPROM_CSEL 0x02
/* Chip select */
#define HPC3_EEPROM_ECLK 0x04
/* EEPROM clock */
...
...
include/asm-mips/sgi/ip22.h
浏览文件 @
78709b9d
...
...
@@ -72,7 +72,7 @@
#define ip22_is_fullhouse() (sgioc->sysid & SGIOC_SYSID_FULLHOUSE)
extern
unsigned
short
ip22_eeprom_read
(
volatile
unsigned
int
*
ctrl
,
int
reg
);
extern
unsigned
short
ip22_eeprom_read
(
unsigned
int
*
ctrl
,
int
reg
);
extern
unsigned
short
ip22_nvram_read
(
int
reg
);
#endif
include/asm-mips/sgi/mc.h
浏览文件 @
78709b9d
...
...
@@ -57,7 +57,7 @@ struct sgimc_regs {
volatile
u32
divider
;
/* Divider reg for RPSS */
u32
_unused5
;
volatile
u32
eeprom
;
/* EEPROM byte reg for r4k */
u32
eeprom
;
/* EEPROM byte reg for r4k */
#define SGIMC_EEPROM_PRE 0x00000001
/* eeprom chip PRE pin assertion */
#define SGIMC_EEPROM_CSEL 0x00000002
/* Active high, eeprom chip select */
#define SGIMC_EEPROM_SECLOCK 0x00000004
/* EEPROM serial clock */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录