Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
fd63d832
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,发现更多精彩内容 >>
提交
fd63d832
编写于
9月 08, 2007
作者:
W
Wolfgang Denk
浏览文件
操作
浏览文件
下载
差异文件
Merge with /home/raj/git/u-boot#ads5121_fixes
上级
ff7640c9
08e2e5fc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
15 deletion
+22
-15
board/ads5121/u-boot.lds
board/ads5121/u-boot.lds
+0
-1
cpu/mpc512x/config.mk
cpu/mpc512x/config.mk
+1
-1
cpu/mpc512x/fec.c
cpu/mpc512x/fec.c
+21
-13
未找到文件。
board/ads5121/u-boot.lds
浏览文件 @
fd63d832
...
...
@@ -51,7 +51,6 @@ SECTIONS
{
cpu/mpc512x/start.o (.text)
*(.text)
*(.fixup)
*(.got1)
. = ALIGN(16);
*(.rodata)
...
...
cpu/mpc512x/config.mk
浏览文件 @
fd63d832
...
...
@@ -19,7 +19,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS
+=
-fPIC
-ffixed-r14
-meabi
PLATFORM_RELFLAGS
+=
-fPIC
-ffixed-r14
-meabi
-mrelocatable
PLATFORM_CPPFLAGS
+=
-DCONFIG_MPC512X
-DCONFIG_E300
\
-ffixed-r2
-ffixed-r29
-msoft-float
-mcpu
=
603e
cpu/mpc512x/fec.c
浏览文件 @
fd63d832
...
...
@@ -32,6 +32,9 @@ int fec512x_miiphy_read(char *devname, uint8 phyAddr, uint8 regAddr, uint16 * re
int
fec512x_miiphy_write
(
char
*
devname
,
uint8
phyAddr
,
uint8
regAddr
,
uint16
data
);
int
mpc512x_fec_init_phy
(
struct
eth_device
*
dev
,
bd_t
*
bis
);
static
uchar
rx_buff
[
FEC_MAX_PKT_SIZE
];
static
int
rx_buff_idx
=
0
;
/********************************************************************/
#if (DEBUG & 0x2)
static
void
mpc512x_fec_phydump
(
char
*
devname
)
...
...
@@ -235,7 +238,7 @@ static int mpc512x_fec_init (struct eth_device *dev, bd_t * bis)
fec
->
eth
->
op_pause
=
0x00010020
;
/* Frame length=1518; MII mode */
fec
->
eth
->
r_cntrl
=
0x05ee00
0c
;
fec
->
eth
->
r_cntrl
=
0x05ee00
24
;
/* Half-duplex, heartbeat disabled */
fec
->
eth
->
x_cntrl
=
0x00000000
;
...
...
@@ -520,8 +523,7 @@ static int mpc512x_fec_recv (struct eth_device *dev)
mpc512x_fec_priv
*
fec
=
(
mpc512x_fec_priv
*
)
dev
->
priv
;
volatile
FEC_RBD
*
pRbd
=
&
fec
->
bdBase
->
rbd
[
fec
->
rbdIndex
];
unsigned
long
ievent
;
int
frame_length
,
len
=
0
;
uchar
buff
[
FEC_MAX_PKT_SIZE
];
int
frame_length
=
0
;
#if (DEBUG & 0x1)
printf
(
"mpc512x_fec_recv %d Start...
\n
"
,
fec
->
rbdIndex
);
...
...
@@ -555,31 +557,37 @@ static int mpc512x_fec_recv (struct eth_device *dev)
}
if
(
!
(
pRbd
->
status
&
FEC_RBD_EMPTY
))
{
if
((
pRbd
->
status
&
FEC_RBD_LAST
)
&&
!
(
pRbd
->
status
&
FEC_RBD_ERR
)
&&
if
(
!
(
pRbd
->
status
&
FEC_RBD_ERR
)
&&
((
pRbd
->
dataLength
-
4
)
>
14
))
{
/*
* Get buffer size
*/
frame_length
=
pRbd
->
dataLength
-
4
;
if
(
pRbd
->
status
&
FEC_RBD_LAST
)
frame_length
=
pRbd
->
dataLength
-
4
;
else
frame_length
=
pRbd
->
dataLength
;
#if (DEBUG & 0x20)
{
int
i
;
printf
(
"recv data hdr:"
);
printf
(
"recv data length 0x%08x data hdr: "
,
pRbd
->
dataLength
);
for
(
i
=
0
;
i
<
14
;
i
++
)
printf
(
"%x "
,
*
((
uint8
*
)
pRbd
->
dataPointer
+
i
));
printf
(
"
\n
"
);
}
#endif
/*
* Fill the buffer and pass it to upper layers
*/
memcpy
(
buff
,
(
void
*
)
pRbd
->
dataPointer
,
frame_length
);
NetReceive
((
uchar
*
)
buff
,
frame_length
);
len
=
frame_length
;
memcpy
(
&
rx_buff
[
rx_buff_idx
],
(
void
*
)
pRbd
->
dataPointer
,
frame_length
-
rx_buff_idx
);
rx_buff_idx
=
frame_length
;
if
(
pRbd
->
status
&
FEC_RBD_LAST
)
{
NetReceive
((
uchar
*
)
rx_buff
,
frame_length
);
rx_buff_idx
=
0
;
}
}
/*
...
...
@@ -590,7 +598,7 @@ static int mpc512x_fec_recv (struct eth_device *dev)
/* Try to fill Buffer Descriptors */
fec
->
eth
->
r_des_active
=
0x01000000
;
/* Descriptor polling active */
return
len
;
return
frame_length
;
}
/********************************************************************/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录