Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
码肥人壮
rt-thread
提交
b506a3a2
R
rt-thread
项目概览
码肥人壮
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b506a3a2
编写于
11月 03, 2020
作者:
B
bigmagic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unnecessary define
上级
2fcdb0c0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
28 deletion
+11
-28
bsp/raspberry-pi/raspi4-32/driver/drv_eth.c
bsp/raspberry-pi/raspi4-32/driver/drv_eth.c
+11
-28
未找到文件。
bsp/raspberry-pi/raspi4-32/driver/drv_eth.c
浏览文件 @
b506a3a2
...
...
@@ -24,10 +24,15 @@
#define RECV_DATA_NO_CACHE (0x08400000)
#define DMA_DISC_ADDR_SIZE (4 * 1024 *1024)
#define RX_DESC_BASE (MAC_REG + GENET_RX_OFF)
#define TX_DESC_BASE (MAC_REG + GENET_TX_OFF)
#define RX_DESC_BASE
(MAC_REG + GENET_RX_OFF)
#define TX_DESC_BASE
(MAC_REG + GENET_TX_OFF)
#define MAX_ADDR_LEN (6)
#define MAX_ADDR_LEN (6)
#define upper_32_bits(n) ((rt_uint32_t)(((n) >> 16) >> 16))
#define lower_32_bits(n) ((rt_uint32_t)(n))
#define BIT(nr) (1UL << (nr))
static
rt_uint32_t
tx_index
=
0
;
static
rt_uint32_t
rx_index
=
0
;
...
...
@@ -50,28 +55,6 @@ struct rt_eth_dev
static
struct
rt_eth_dev
eth_dev
;
static
struct
rt_semaphore
sem_lock
;
#define upper_32_bits(n) ((rt_uint32_t)(((n) >> 16) >> 16))
#define lower_32_bits(n) ((rt_uint32_t)(n))
#define BIT(nr) (1UL << (nr))
#define roundup(x, y) ( \
{ \
const typeof(y) __y = y; \
(((x) + (__y - 1)) / __y) * __y; \
} \
)
#define rounddown(x, y) ( \
{ \
typeof(x) __x = (x); \
__x - (__x % (y)); \
} \
)
#define CLR(r,x) (r &= ~(1UL << x))
#define SET(r,y) (r |= (1UL << y))
static
inline
rt_uint32_t
read32
(
void
*
addr
)
{
return
(
*
((
volatile
unsigned
int
*
)(
addr
)));
...
...
@@ -214,7 +197,7 @@ static int bcmgenet_gmac_write_hwaddr(void)
return
0
;
}
int
get_ethernet_uid
(
void
)
static
int
get_ethernet_uid
(
void
)
{
rt_uint32_t
uid_high
=
0
;
rt_uint32_t
uid_low
=
0
;
...
...
@@ -308,7 +291,7 @@ static void rx_descs_init(void)
}
}
int
phy_startup
(
void
)
static
int
phy_startup
(
void
)
{
int
count
=
1000000
;
while
((
bcmgenet_mdio_read
(
1
,
BCM54213PE_MII_STATUS
)
&
MII_STATUS_LINK_UP
)
&&
(
--
count
))
...
...
@@ -344,7 +327,7 @@ int phy_startup(void)
return
0
;
}
int
bcmgenet_adjust_link
(
void
)
static
int
bcmgenet_adjust_link
(
void
)
{
rt_uint32_t
speed
;
rt_uint32_t
phy_dev_speed
=
SPEED_100
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录