Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
fad8c772
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fad8c772
编写于
9月 14, 2009
作者:
E
Edgar E. Iglesias
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pflash_cfi01: Correct debug build, no functional changes.
Signed-off-by:
N
Edgar E. Iglesias
<
edgar.iglesias@gmail.com
>
上级
a6124103
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
11 deletion
+12
-11
hw/pflash_cfi01.c
hw/pflash_cfi01.c
+12
-11
未找到文件。
hw/pflash_cfi01.c
浏览文件 @
fad8c772
...
...
@@ -110,9 +110,10 @@ static uint32_t pflash_read (pflash_t *pfl, target_phys_addr_t offset,
else
if
(
pfl
->
width
==
4
)
boff
=
boff
>>
2
;
DPRINTF
(
"%s: reading offset "
TARGET_FMT_lx
" under cmd %02x width %d
\n
"
,
#if 0
DPRINTF("%s: reading offset " TARGET_FMT_plx " under cmd %02x width %d\n",
__func__, offset, pfl->cmd, width);
#endif
switch
(
pfl
->
cmd
)
{
case
0x00
:
/* Flash area read */
...
...
@@ -120,7 +121,7 @@ static uint32_t pflash_read (pflash_t *pfl, target_phys_addr_t offset,
switch
(
width
)
{
case
1
:
ret
=
p
[
offset
];
DPRINTF
(
"%s: data offset "
TARGET_FMT_lx
" %02x
\n
"
,
DPRINTF
(
"%s: data offset "
TARGET_FMT_
p
lx
" %02x
\n
"
,
__func__
,
offset
,
ret
);
break
;
case
2
:
...
...
@@ -131,7 +132,7 @@ static uint32_t pflash_read (pflash_t *pfl, target_phys_addr_t offset,
ret
=
p
[
offset
];
ret
|=
p
[
offset
+
1
]
<<
8
;
#endif
DPRINTF
(
"%s: data offset "
TARGET_FMT_lx
" %04x
\n
"
,
DPRINTF
(
"%s: data offset "
TARGET_FMT_
p
lx
" %04x
\n
"
,
__func__
,
offset
,
ret
);
break
;
case
4
:
...
...
@@ -147,7 +148,7 @@ static uint32_t pflash_read (pflash_t *pfl, target_phys_addr_t offset,
ret
|=
p
[
offset
+
2
]
<<
16
;
ret
|=
p
[
offset
+
3
]
<<
24
;
#endif
DPRINTF
(
"%s: data offset "
TARGET_FMT_lx
" %08x
\n
"
,
DPRINTF
(
"%s: data offset "
TARGET_FMT_
p
lx
" %08x
\n
"
,
__func__
,
offset
,
ret
);
break
;
default:
...
...
@@ -199,8 +200,8 @@ static void inline pflash_data_write(pflash_t *pfl, target_phys_addr_t offset,
{
uint8_t
*
p
=
pfl
->
storage
;
DPRINTF
(
"%s: block write offset "
TARGET_FMT_lx
" value %x counter "
TARGET_FMT_lx
"
\n
"
,
DPRINTF
(
"%s: block write offset "
TARGET_FMT_
p
lx
" value %x counter "
TARGET_FMT_
p
lx
"
\n
"
,
__func__
,
offset
,
value
,
pfl
->
counter
);
switch
(
width
)
{
case
1
:
...
...
@@ -244,7 +245,7 @@ static void pflash_write(pflash_t *pfl, target_phys_addr_t offset,
cmd
=
value
;
DPRINTF
(
"%s: writing offset "
TARGET_FMT_lx
" value %08x width %d wcycle 0x%x
\n
"
,
DPRINTF
(
"%s: writing offset "
TARGET_FMT_
p
lx
" value %08x width %d wcycle 0x%x
\n
"
,
__func__
,
offset
,
value
,
width
,
pfl
->
wcycle
);
/* Set the device in I/O access mode */
...
...
@@ -264,14 +265,14 @@ static void pflash_write(pflash_t *pfl, target_phys_addr_t offset,
goto
reset_flash
;
case
0x10
:
/* Single Byte Program */
case
0x40
:
/* Single Byte Program */
DPRINTF
(
stderr
,
"%s: Single Byte Program
\n
"
,
__func__
);
DPRINTF
(
"%s: Single Byte Program
\n
"
,
__func__
);
break
;
case
0x20
:
/* Block erase */
p
=
pfl
->
storage
;
offset
&=
~
(
pfl
->
sector_len
-
1
);
DPRINTF
(
"%s: block erase at "
TARGET_FMT_lx
" bytes "
TARGET_FMT_lx
"
\n
"
,
DPRINTF
(
"%s: block erase at "
TARGET_FMT_
p
lx
" bytes "
TARGET_FMT_
p
lx
"
\n
"
,
__func__
,
offset
,
pfl
->
sector_len
);
memset
(
p
+
offset
,
0xff
,
pfl
->
sector_len
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录