Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
fe599e17
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fe599e17
编写于
8月 07, 2005
作者:
W
Wolfgang Denk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix errors that occur when accessing SystemACE CF
Patch by Jeff Angielski, 09 Jan 2005
上级
7ebdb19b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
4 deletion
+30
-4
CHANGELOG
CHANGELOG
+3
-0
common/cmd_ace.c
common/cmd_ace.c
+27
-4
未找到文件。
CHANGELOG
浏览文件 @
fe599e17
...
...
@@ -2,6 +2,9 @@
Changes for U-Boot 1.1.3:
======================================================================
* Fix errors that occur when accessing SystemACE CF
Patch by Jeff Angielski, 09 Jan 2005
* Document switching between U-Boot and PlanetCore on RPXlite
by Sam Song, 24 Dec 2004
...
...
common/cmd_ace.c
浏览文件 @
fe599e17
...
...
@@ -31,6 +31,12 @@
* available to cmd_fat.c:get_dev and filling in a block device
* description that has all the bits needed for FAT support to
* read sectors.
*
* According to Xilinx technical support, before accessing the
* SystemACE CF you need to set the following control bits:
* FORCECFGMODE : 1
* CFGMODE : 0
* CFGSTART : 0
*/
# include <common.h>
...
...
@@ -95,7 +101,9 @@ static int get_cf_lock(void)
int
retry
=
10
;
/* CONTROLREG = LOCKREG */
ace_writew
(
0x0002
,
0x18
);
unsigned
val
=
ace_readw
(
0x18
);
val
|=
0x0002
;
ace_writew
((
val
&
0xffff
),
0x18
);
/* Wait for MPULOCK in STATUSREG[15:0] */
while
(
!
(
ace_readw
(
0x04
)
&
0x0002
))
{
...
...
@@ -112,8 +120,9 @@ static int get_cf_lock(void)
static
void
release_cf_lock
(
void
)
{
/* CONTROLREG = none */
ace_writew
(
0x0000
,
0x18
);
unsigned
val
=
ace_readw
(
0x18
);
val
&=~
(
0x0002
);
ace_writew
((
val
&
0xffff
),
0x18
);
}
block_dev_desc_t
*
systemace_get_dev
(
int
dev
)
...
...
@@ -127,6 +136,9 @@ block_dev_desc_t * systemace_get_dev(int dev)
systemace_dev
.
blksz
=
512
;
systemace_dev
.
removable
=
1
;
systemace_dev
.
block_read
=
systemace_read
;
init_part
(
&
systemace_dev
);
}
return
&
systemace_dev
;
...
...
@@ -145,6 +157,7 @@ static unsigned long systemace_read(int dev,
int
retry
;
unsigned
blk_countdown
;
unsigned
char
*
dp
=
(
unsigned
char
*
)
buffer
;
unsigned
val
;
if
(
get_cf_lock
()
<
0
)
{
unsigned
status
=
ace_readw
(
0x04
);
...
...
@@ -165,7 +178,7 @@ static unsigned long systemace_read(int dev,
retry
=
2000
;
for
(;;)
{
unsigned
val
=
ace_readw
(
0x04
);
val
=
ace_readw
(
0x04
);
/* If CFDETECT is false, card is missing. */
if
(
!
(
val
&
0x0010
))
{
...
...
@@ -212,6 +225,11 @@ static unsigned long systemace_read(int dev,
/* Write sector count | ReadMemCardData. */
ace_writew
((
trans
&
0xff
)
|
0x0300
,
0x14
);
/* Reset the configruation controller */
val
=
ace_readw
(
0x18
);
val
|=
0x0080
;
ace_writew
(
val
,
0x18
);
retry
=
trans
*
16
;
while
(
retry
>
0
)
{
int
idx
;
...
...
@@ -231,6 +249,11 @@ static unsigned long systemace_read(int dev,
retry
-=
1
;
}
/* Clear the configruation controller reset */
val
=
ace_readw
(
0x18
);
val
&=~
0x0080
;
ace_writew
(
val
,
0x18
);
/* Count the blocks we transfer this time. */
start
+=
trans
;
blk_countdown
-=
trans
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录