Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
1e104ac6
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,发现更多精彩内容 >>
提交
1e104ac6
编写于
12月 22, 2019
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab.denx.de/u-boot/custodians/u-boot-net
- Fix phy_connect() call in two drivers - fw_setenv bugfix
上级
643366bc
c62e6142
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
21 addition
and
3 deletion
+21
-3
drivers/net/bcm-sf2-eth.c
drivers/net/bcm-sf2-eth.c
+1
-1
drivers/net/dwc_eth_qos.c
drivers/net/dwc_eth_qos.c
+1
-1
tools/env/fw_env.c
tools/env/fw_env.c
+19
-1
未找到文件。
drivers/net/bcm-sf2-eth.c
浏览文件 @
1e104ac6
...
@@ -50,7 +50,7 @@ static int bcm_sf2_eth_init(struct eth_device *dev)
...
@@ -50,7 +50,7 @@ static int bcm_sf2_eth_init(struct eth_device *dev)
eth
->
port_num
=
0
;
eth
->
port_num
=
0
;
debug
(
"Connecting PHY 0...
\n
"
);
debug
(
"Connecting PHY 0...
\n
"
);
phydev
=
phy_connect
(
miiphy_get_dev_by_name
(
dev
->
name
),
phydev
=
phy_connect
(
miiphy_get_dev_by_name
(
dev
->
name
),
0
,
dev
,
eth
->
phy_interface
);
-
1
,
dev
,
eth
->
phy_interface
);
if
(
phydev
!=
NULL
)
{
if
(
phydev
!=
NULL
)
{
eth
->
port
[
0
]
=
phydev
;
eth
->
port
[
0
]
=
phydev
;
eth
->
port_num
+=
1
;
eth
->
port_num
+=
1
;
...
...
drivers/net/dwc_eth_qos.c
浏览文件 @
1e104ac6
...
@@ -1045,7 +1045,7 @@ static int eqos_start(struct udevice *dev)
...
@@ -1045,7 +1045,7 @@ static int eqos_start(struct udevice *dev)
* don't need to reconnect/reconfigure again
* don't need to reconnect/reconfigure again
*/
*/
if
(
!
eqos
->
phy
)
{
if
(
!
eqos
->
phy
)
{
eqos
->
phy
=
phy_connect
(
eqos
->
mii
,
0
,
dev
,
eqos
->
phy
=
phy_connect
(
eqos
->
mii
,
-
1
,
dev
,
eqos
->
config
->
interface
(
dev
));
eqos
->
config
->
interface
(
dev
));
if
(
!
eqos
->
phy
)
{
if
(
!
eqos
->
phy
)
{
pr_err
(
"phy_connect() failed"
);
pr_err
(
"phy_connect() failed"
);
...
...
tools/env/fw_env.c
浏览文件 @
1e104ac6
...
@@ -112,6 +112,7 @@ struct environment {
...
@@ -112,6 +112,7 @@ struct environment {
unsigned
char
*
flags
;
unsigned
char
*
flags
;
char
*
data
;
char
*
data
;
enum
flag_scheme
flag_scheme
;
enum
flag_scheme
flag_scheme
;
int
dirty
;
};
};
static
struct
environment
environment
=
{
static
struct
environment
environment
=
{
...
@@ -506,6 +507,9 @@ int fw_env_flush(struct env_opts *opts)
...
@@ -506,6 +507,9 @@ int fw_env_flush(struct env_opts *opts)
if
(
!
opts
)
if
(
!
opts
)
opts
=
&
default_opts
;
opts
=
&
default_opts
;
if
(
!
environment
.
dirty
)
return
0
;
/*
/*
* Update CRC
* Update CRC
*/
*/
...
@@ -551,7 +555,8 @@ int fw_env_write(char *name, char *value)
...
@@ -551,7 +555,8 @@ int fw_env_write(char *name, char *value)
deleting
=
(
oldval
&&
!
(
value
&&
strlen
(
value
)));
deleting
=
(
oldval
&&
!
(
value
&&
strlen
(
value
)));
creating
=
(
!
oldval
&&
(
value
&&
strlen
(
value
)));
creating
=
(
!
oldval
&&
(
value
&&
strlen
(
value
)));
overwriting
=
(
oldval
&&
(
value
&&
strlen
(
value
)));
overwriting
=
(
oldval
&&
(
value
&&
strlen
(
value
)
&&
strcmp
(
oldval
,
value
)));
/* check for permission */
/* check for permission */
if
(
deleting
)
{
if
(
deleting
)
{
...
@@ -591,6 +596,7 @@ int fw_env_write(char *name, char *value)
...
@@ -591,6 +596,7 @@ int fw_env_write(char *name, char *value)
/* Nothing to do */
/* Nothing to do */
return
0
;
return
0
;
environment
.
dirty
=
1
;
if
(
deleting
||
overwriting
)
{
if
(
deleting
||
overwriting
)
{
if
(
*++
nxt
==
'\0'
)
{
if
(
*++
nxt
==
'\0'
)
{
*
env
=
'\0'
;
*
env
=
'\0'
;
...
@@ -1440,6 +1446,7 @@ int fw_env_open(struct env_opts *opts)
...
@@ -1440,6 +1446,7 @@ int fw_env_open(struct env_opts *opts)
"Warning: Bad CRC, using default environment
\n
"
);
"Warning: Bad CRC, using default environment
\n
"
);
memcpy
(
environment
.
data
,
default_environment
,
memcpy
(
environment
.
data
,
default_environment
,
sizeof
(
default_environment
));
sizeof
(
default_environment
));
environment
.
dirty
=
1
;
}
}
}
else
{
}
else
{
flag0
=
*
environment
.
flags
;
flag0
=
*
environment
.
flags
;
...
@@ -1493,6 +1500,16 @@ int fw_env_open(struct env_opts *opts)
...
@@ -1493,6 +1500,16 @@ int fw_env_open(struct env_opts *opts)
crc1_ok
=
(
crc1
==
redundant
->
crc
);
crc1_ok
=
(
crc1
==
redundant
->
crc
);
flag1
=
redundant
->
flags
;
flag1
=
redundant
->
flags
;
/*
* environment.data still points to ((struct
* env_image_redundant *)addr0)->data. If the two
* environments differ, or one has bad crc, force a
* write-out by marking the environment dirty.
*/
if
(
memcmp
(
environment
.
data
,
redundant
->
data
,
ENV_SIZE
)
||
!
crc0_ok
||
!
crc1_ok
)
environment
.
dirty
=
1
;
if
(
crc0_ok
&&
!
crc1_ok
)
{
if
(
crc0_ok
&&
!
crc1_ok
)
{
dev_current
=
0
;
dev_current
=
0
;
}
else
if
(
!
crc0_ok
&&
crc1_ok
)
{
}
else
if
(
!
crc0_ok
&&
crc1_ok
)
{
...
@@ -1502,6 +1519,7 @@ int fw_env_open(struct env_opts *opts)
...
@@ -1502,6 +1519,7 @@ int fw_env_open(struct env_opts *opts)
"Warning: Bad CRC, using default environment
\n
"
);
"Warning: Bad CRC, using default environment
\n
"
);
memcpy
(
environment
.
data
,
default_environment
,
memcpy
(
environment
.
data
,
default_environment
,
sizeof
(
default_environment
));
sizeof
(
default_environment
));
environment
.
dirty
=
1
;
dev_current
=
0
;
dev_current
=
0
;
}
else
{
}
else
{
switch
(
environment
.
flag_scheme
)
{
switch
(
environment
.
flag_scheme
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录