Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
1f6d4258
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,发现更多精彩内容 >>
提交
1f6d4258
编写于
11月 02, 2004
作者:
W
wdenk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Work around for Ethernet problems on Xaeniax board
上级
983fda83
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
55 addition
and
4 deletion
+55
-4
CHANGELOG
CHANGELOG
+2
-0
drivers/smc91111.c
drivers/smc91111.c
+30
-3
drivers/smc91111.h
drivers/smc91111.h
+22
-0
include/configs/xaeniax.h
include/configs/xaeniax.h
+1
-1
未找到文件。
CHANGELOG
浏览文件 @
1f6d4258
...
...
@@ -2,6 +2,8 @@
Changes since U-Boot 1.1.1:
======================================================================
* Work around for Ethernet problems on Xaeniax board
* Patch by TsiChung Liew, 23 Sep 2004:
- add support for MPC8220 CPU
- Add support for Alaska and Yukon boards
...
...
drivers/smc91111.c
浏览文件 @
1f6d4258
...
...
@@ -640,8 +640,15 @@ again:
}
/* we have a packet address, so tell the card to use it */
#ifndef CONFIG_XAENIAX
SMC_outb
(
packet_no
,
PN_REG
);
#else
/* On Xaeniax board, we can't use SMC_outb here because that way
* the Allocate MMU command will end up written to the command register
* as well, which will lead to a problem.
*/
SMC_outl
(
packet_no
<<
16
,
0
);
#endif
/* do not write new ptr value if Write data fifo not empty */
while
(
saved_ptr
&
PTR_NOTEMPTY
)
printf
(
"Write data fifo not empty!
\n
"
);
...
...
@@ -702,7 +709,9 @@ again:
/* release packet */
/* no need to release, MMU does that now */
/* SMC_outw (MC_FREEPKT, MMU_CMD_REG); */
#ifdef CONFIG_XAENIAX
SMC_outw
(
MC_FREEPKT
,
MMU_CMD_REG
);
#endif
/* wait for MMU getting ready (low) */
while
(
SMC_inw
(
MMU_CMD_REG
)
&
MC_BUSY
)
{
...
...
@@ -722,7 +731,9 @@ again:
/* release packet */
/* no need to release, MMU does that now */
/* SMC_outw (MC_FREEPKT, MMU_CMD_REG); */
#ifdef CONFIG_XAENIAX
SMC_outw
(
MC_FREEPKT
,
MMU_CMD_REG
);
#endif
/* wait for MMU getting ready (low) */
while
(
SMC_inw
(
MMU_CMD_REG
)
&
MC_BUSY
)
{
...
...
@@ -735,7 +746,15 @@ again:
}
/* restore previously saved registers */
#ifndef CONFIG_XAENIAX
SMC_outb
(
saved_pnr
,
PN_REG
);
#else
/* On Xaeniax board, we can't use SMC_outb here because that way
* the Allocate MMU command will end up written to the command register
* as well, which will lead to a problem.
*/
SMC_outl
(
saved_pnr
<<
16
,
0
);
#endif
SMC_outw
(
saved_ptr
,
PTR_REG
);
return
length
;
...
...
@@ -913,7 +932,15 @@ static int smc_rcv()
udelay
(
1
);
/* Wait until not busy */
/* restore saved registers */
#ifndef CONFIG_XAENIAX
SMC_outb
(
saved_pnr
,
PN_REG
);
#else
/* On Xaeniax board, we can't use SMC_outb here because that way
* the Allocate MMU command will end up written to the command register
* as well, which will lead to a problem.
*/
SMC_outl
(
saved_pnr
<<
16
,
0
);
#endif
SMC_outw
(
saved_ptr
,
PTR_REG
);
if
(
!
is_error
)
{
...
...
drivers/smc91111.h
浏览文件 @
1f6d4258
...
...
@@ -85,6 +85,19 @@ typedef unsigned long int dword;
if (__p & 2) __v >>= 8; \
else __v &= 0xff; \
__v; })
#elif defined(CONFIG_XAENIAX)
#define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))))
#define SMC_inw(z) ({ \
unsigned int __p = (unsigned int)(SMC_BASE_ADDRESS + (z)); \
unsigned int __v = *(volatile unsigned int *)((__p) & ~3); \
if (__p & 3) __v >>= 16; \
else __v &= 0xffff; \
__v; })
#define SMC_inb(p) ({ \
unsigned int ___v = SMC_inw((p) & ~1); \
if (p & 1) ___v >>= 8; \
else ___v &= 0xff; \
___v; })
#else
#define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))))
#define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+(r))))
...
...
@@ -99,6 +112,15 @@ typedef unsigned long int dword;
#ifdef CONFIG_XSENGINE
#define SMC_outl(d,r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r<<1))) = d)
#define SMC_outw(d,r) (*((volatile word *)(SMC_BASE_ADDRESS+(r<<1))) = d)
#elif defined (CONFIG_XAENIAX)
#define SMC_outl(d,r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))) = d)
#define SMC_outw(d,p) ({ \
dword __dwo = SMC_inl((p) & ~3); \
dword __dwn = (word)(d); \
__dwo &= ((p) & 3) ? 0x0000ffff : 0xffff0000; \
__dwo |= ((p) & 3) ? __dwn << 16 : __dwn; \
SMC_outl(__dwo, (p) & ~3); \
})
#else
#define SMC_outl(d,r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))) = d)
#define SMC_outw(d,r) (*((volatile word *)(SMC_BASE_ADDRESS+(r))) = d)
...
...
include/configs/xaeniax.h
浏览文件 @
1f6d4258
...
...
@@ -181,7 +181,7 @@
* SMSC91C111 Network Card
*/
#define CONFIG_DRIVER_SMC91111 1
#define CONFIG_SMC91111_BASE 0x
0C0003
0
/* chip select 3 */
#define CONFIG_SMC91111_BASE 0x
1000030
0
/* chip select 3 */
#define CONFIG_SMC_USE_32_BIT 1
/* 32 bit bus */
#undef CONFIG_SMC_91111_EXT_PHY
/* we use internal phy */
#undef CONFIG_SHOW_ACTIVITY
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录