Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
df13a443
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,发现更多精彩内容 >>
提交
df13a443
编写于
4月 15, 2018
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge
git://git.denx.de/u-boot-net
上级
6d0409f2
16879cd2
变更
33
隐藏空白更改
内联
并排
Showing
33 changed file
with
221 addition
and
118 deletion
+221
-118
Kconfig
Kconfig
+3
-9
cmd/Kconfig
cmd/Kconfig
+107
-20
cmd/bootefi.c
cmd/bootefi.c
+2
-2
cmd/net.c
cmd/net.c
+4
-0
configs/am335x_baltos_defconfig
configs/am335x_baltos_defconfig
+1
-0
configs/am335x_shc_defconfig
configs/am335x_shc_defconfig
+1
-0
configs/am335x_shc_ict_defconfig
configs/am335x_shc_ict_defconfig
+1
-0
configs/am335x_shc_netboot_defconfig
configs/am335x_shc_netboot_defconfig
+1
-0
configs/am335x_shc_prompt_defconfig
configs/am335x_shc_prompt_defconfig
+1
-0
configs/am335x_shc_sdboot_defconfig
configs/am335x_shc_sdboot_defconfig
+1
-0
configs/am335x_shc_sdboot_prompt_defconfig
configs/am335x_shc_sdboot_prompt_defconfig
+1
-0
configs/devkit3250_defconfig
configs/devkit3250_defconfig
+1
-0
configs/ds414_defconfig
configs/ds414_defconfig
+1
-0
configs/khadas-vim_defconfig
configs/khadas-vim_defconfig
+1
-0
configs/libretech-cc_defconfig
configs/libretech-cc_defconfig
+1
-0
configs/p212_defconfig
configs/p212_defconfig
+1
-0
configs/pepper_defconfig
configs/pepper_defconfig
+1
-0
configs/work_92105_defconfig
configs/work_92105_defconfig
+1
-0
configs/x600_defconfig
configs/x600_defconfig
+1
-0
drivers/net/Kconfig
drivers/net/Kconfig
+12
-1
drivers/net/fec_mxc.c
drivers/net/fec_mxc.c
+37
-18
drivers/net/mvneta.c
drivers/net/mvneta.c
+10
-0
drivers/net/phy/Kconfig
drivers/net/phy/Kconfig
+8
-0
drivers/net/zynq_gem.c
drivers/net/zynq_gem.c
+9
-0
include/configs/mx28evk.h
include/configs/mx28evk.h
+1
-0
include/configs/socfpga_common.h
include/configs/socfpga_common.h
+1
-1
include/configs/xilinx_zynqmp.h
include/configs/xilinx_zynqmp.h
+1
-1
include/configs/zynq-common.h
include/configs/zynq-common.h
+1
-1
include/netdev.h
include/netdev.h
+1
-5
lib/efi_loader/Makefile
lib/efi_loader/Makefile
+1
-1
lib/efi_loader/efi_device_path.c
lib/efi_loader/efi_device_path.c
+1
-1
net/Kconfig
net/Kconfig
+0
-51
net/Makefile
net/Makefile
+7
-7
未找到文件。
Kconfig
浏览文件 @
df13a443
...
...
@@ -76,22 +76,16 @@ config DISTRO_DEFAULTS
imply USE_BOOTCOMMAND
select CMD_BOOTZ if ARM && !ARM64
select CMD_BOOTI if ARM64
select CMD_DHCP if NET && CMD_NET
select CMD_PXE if NET && CMD_NET
select CMD_DHCP if CMD_NET
select CMD_PING if CMD_NET
select CMD_PXE if NET
select CMD_EXT2
select CMD_EXT4
select CMD_FAT
select CMD_FS_GENERIC
imply CMD_MII if NET
select CMD_PING if NET
select CMD_PART if PARTITIONS
select HUSH_PARSER
select BOOTP_BOOTPATH if NET && CMD_NET
select BOOTP_DNS if NET && CMD_NET
select BOOTP_GATEWAY if NET && CMD_NET
select BOOTP_HOSTNAME if NET && CMD_NET
select BOOTP_PXE if NET && CMD_NET
select BOOTP_SUBNETMASK if NET && CMD_NET
select CMDLINE_EDITING
select AUTO_COMPLETE
select SYS_LONGHELP
...
...
cmd/Kconfig
浏览文件 @
df13a443
...
...
@@ -1021,46 +1021,127 @@ config CMD_SETEXPR
endmenu
menu "Network commands"
if NET
config CMD_NET
bool "bootp, tftpboot"
menuconfig CMD_NET
bool "Network commands"
default y
if CMD_NET
config CMD_BOOTP
bool "bootp"
default y
help
Network commands.
bootp - boot image via network using BOOTP/TFTP protocol
config CMD_DHCP
bool "dhcp"
depends on CMD_BOOTP
help
Boot image via network using DHCP/TFTP protocol
config BOOTP_BOOTPATH
bool "Request & store 'rootpath' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP
help
Even though the config is called BOOTP_BOOTPATH, it stores the
path in the variable 'rootpath'.
config BOOTP_DNS
bool "Request & store 'dnsip' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP
help
The primary DNS server is stored as 'dnsip'. If two servers are
returned, you must set BOOTP_DNS2 to store that second server IP
also.
config BOOTP_DNS2
bool "Store 'dnsip2' from BOOTP/DHCP server"
depends on BOOTP_DNS
help
If a DHCP client requests the DNS server IP from a DHCP server,
it is possible that more than one DNS serverip is offered to the
client. If CONFIG_BOOTP_DNS2 is enabled, the secondary DNS
server IP will be stored in the additional environment
variable "dnsip2". The first DNS serverip is always
stored in the variable "dnsip", when BOOTP_DNS is defined.
config BOOTP_GATEWAY
bool "Request & store 'gatewayip' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP
config BOOTP_HOSTNAME
bool "Request & store 'hostname' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP
help
The name may or may not be qualified with the local domain name.
config BOOTP_SUBNETMASK
bool "Request & store 'netmask' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP
config BOOTP_PXE
bool "Send PXE client arch to BOOTP/DHCP server"
default y
depends on CMD_BOOTP && CMD_PXE
help
Supported for ARM, ARM64, and x86 for now.
config BOOTP_PXE_CLIENTARCH
hex
depends on BOOTP_PXE
default 0x16 if ARM64
default 0x15 if ARM
default 0 if X86
config BOOTP_VCI_STRING
string
depends on CMD_BOOTP
default "U-Boot.armv7" if CPU_V7 || CPU_V7M
default "U-Boot.armv8" if ARM64
default "U-Boot.arm" if ARM
default "U-Boot"
config CMD_TFTPBOOT
bool "tftpboot"
default y
help
tftpboot - boot image via network using TFTP protocol
config CMD_TFTPPUT
bool "tftp put"
depends on CMD_TFTPBOOT
help
TFTP put command, for uploading files to a server
config CMD_TFTPSRV
bool "tftpsrv"
depends on CMD_TFTPBOOT
help
Act as a TFTP server and boot the first received file
config NET_TFTP_VARS
bool "Control TFTP timeout and count through environment"
depends on CMD_TFTPBOOT
default y
help
If set, allows controlling the TFTP timeout through the
environment variable tftptimeout, and the TFTP maximum
timeout count through the variable tftptimeoutcountmax.
If unset, timeout and maximum are hard-defined as 1 second
and 10 timouts per TFTP transfer.
config CMD_RARP
bool "rarpboot"
help
Boot image via network using RARP/TFTP protocol
config CMD_DHCP
bool "dhcp"
depends on CMD_NET
help
Boot image via network using DHCP/TFTP protocol
config CMD_PXE
bool "pxe"
depends on CMD_NET
select MENU
help
Boot image via network using PXE protocol
config CMD_NFS
bool "nfs"
default y
...
...
@@ -1097,6 +1178,8 @@ config CMD_LINK_LOCAL
help
Acquire a network IP address using the link-local protocol
endif
config CMD_ETHSW
bool "ethsw"
help
...
...
@@ -1105,9 +1188,13 @@ config CMD_ETHSW
operations such as enabling / disabling a port and
viewing/maintaining the filtering database (FDB)
endif
config CMD_PXE
bool "pxe"
select MENU
help
Boot image via network using PXE protocol
end
menu
end
if
menu "Misc commands"
...
...
cmd/bootefi.c
浏览文件 @
df13a443
...
...
@@ -56,7 +56,7 @@ efi_status_t efi_init_obj_list(void)
if
(
ret
!=
EFI_SUCCESS
)
goto
out
;
#endif
#ifdef CONFIG_
CMD_
NET
#ifdef CONFIG_NET
ret
=
efi_net_register
();
if
(
ret
!=
EFI_SUCCESS
)
goto
out
;
...
...
@@ -511,7 +511,7 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path)
bootefi_device_path
=
efi_dp_from_part
(
desc
,
part
);
}
else
{
#ifdef CONFIG_
CMD_
NET
#ifdef CONFIG_NET
bootefi_device_path
=
efi_dp_from_eth
();
#endif
}
...
...
cmd/net.c
浏览文件 @
df13a443
...
...
@@ -14,6 +14,7 @@
static
int
netboot_common
(
enum
proto_t
,
cmd_tbl_t
*
,
int
,
char
*
const
[]);
#ifdef CONFIG_CMD_BOOTP
static
int
do_bootp
(
cmd_tbl_t
*
cmdtp
,
int
flag
,
int
argc
,
char
*
const
argv
[])
{
return
netboot_common
(
BOOTP
,
cmdtp
,
argc
,
argv
);
...
...
@@ -24,7 +25,9 @@ U_BOOT_CMD(
"boot image via network using BOOTP/TFTP protocol"
,
"[loadAddress] [[hostIPaddr:]bootfilename]"
);
#endif
#ifdef CONFIG_CMD_TFTPBOOT
int
do_tftpb
(
cmd_tbl_t
*
cmdtp
,
int
flag
,
int
argc
,
char
*
const
argv
[])
{
int
ret
;
...
...
@@ -40,6 +43,7 @@ U_BOOT_CMD(
"boot image via network using TFTP protocol"
,
"[loadAddress] [[hostIPaddr:]bootfilename]"
);
#endif
#ifdef CONFIG_CMD_TFTPPUT
static
int
do_tftpput
(
cmd_tbl_t
*
cmdtp
,
int
flag
,
int
argc
,
char
*
const
argv
[])
...
...
configs/am335x_baltos_defconfig
浏览文件 @
df13a443
...
...
@@ -44,6 +44,7 @@ CONFIG_SYS_OMAP24_I2C_SPEED=1000
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
...
...
configs/am335x_shc_defconfig
浏览文件 @
df13a443
...
...
@@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
...
...
configs/am335x_shc_ict_defconfig
浏览文件 @
df13a443
...
...
@@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
...
...
configs/am335x_shc_netboot_defconfig
浏览文件 @
df13a443
...
...
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
...
...
configs/am335x_shc_prompt_defconfig
浏览文件 @
df13a443
...
...
@@ -37,6 +37,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
...
...
configs/am335x_shc_sdboot_defconfig
浏览文件 @
df13a443
...
...
@@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
...
...
configs/am335x_shc_sdboot_prompt_defconfig
浏览文件 @
df13a443
...
...
@@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
...
...
configs/devkit3250_defconfig
浏览文件 @
df13a443
...
...
@@ -36,6 +36,7 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NAND=y
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_PHYLIB=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=31
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
...
...
configs/ds414_defconfig
浏览文件 @
df13a443
...
...
@@ -41,6 +41,7 @@ CONFIG_SPL_OF_TRANSLATE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_GIGE=y
CONFIG_MVNETA=y
CONFIG_PCI=y
...
...
configs/khadas-vim_defconfig
浏览文件 @
df13a443
...
...
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=8
CONFIG_PHY_MESON_GXL=y
CONFIG_DM_ETH=y
...
...
configs/libretech-cc_defconfig
浏览文件 @
df13a443
...
...
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=8
CONFIG_PHY_MESON_GXL=y
CONFIG_DM_ETH=y
...
...
configs/p212_defconfig
浏览文件 @
df13a443
...
...
@@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=8
CONFIG_PHY_MESON_GXL=y
CONFIG_DM_ETH=y
...
...
configs/pepper_defconfig
浏览文件 @
df13a443
...
...
@@ -33,6 +33,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_NETDEVICES=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
...
...
configs/work_92105_defconfig
浏览文件 @
df13a443
...
...
@@ -36,6 +36,7 @@ CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
# CONFIG_MMC is not set
CONFIG_PHYLIB=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
CONFIG_LPC32XX_SSP=y
configs/x600_defconfig
浏览文件 @
df13a443
...
...
@@ -44,6 +44,7 @@ CONFIG_FPGA_SPARTAN3=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
...
...
drivers/net/Kconfig
浏览文件 @
df13a443
...
...
@@ -155,9 +155,20 @@ config ETHOC
help
This MAC is present in OpenRISC and Xtensa XTFPGA boards.
config FEC_MXC_SHARE_MDIO
bool "Share the MDIO bus for FEC controller"
depends on FEC_MXC
config FEC_MXC_MDIO_BASE
hex "MDIO base address for the FEC controller"
depends on FEC_MXC_SHARE_MDIO
help
This specifies the MDIO registers base address. It is used when
two FEC controllers share MDIO bus.
config FEC_MXC
bool "FEC Ethernet controller"
depends on MX5 || MX6
depends on MX5 || MX6
|| MX7
help
This driver supports the 10/100 Fast Ethernet controller for
NXP i.MX processors.
...
...
drivers/net/fec_mxc.c
浏览文件 @
df13a443
...
...
@@ -807,7 +807,16 @@ static int fec_recv(struct eth_device *dev)
uint16_t
bd_status
;
ulong
addr
,
size
,
end
;
int
i
;
#ifdef CONFIG_DM_ETH
*
packetp
=
memalign
(
ARCH_DMA_MINALIGN
,
FEC_MAX_PKT_SIZE
);
if
(
*
packetp
==
0
)
{
printf
(
"%s: error allocating packetp
\n
"
,
__func__
);
return
-
ENOMEM
;
}
#else
ALLOC_CACHE_ALIGN_BUFFER
(
uchar
,
buff
,
FEC_MAX_PKT_SIZE
);
#endif
/* Check if any critical events have happened */
ievent
=
readl
(
&
fec
->
eth
->
ievent
);
...
...
@@ -883,8 +892,13 @@ static int fec_recv(struct eth_device *dev)
#ifdef CONFIG_FEC_MXC_SWAP_PACKET
swap_packet
((
uint32_t
*
)
addr
,
frame_length
);
#endif
#ifdef CONFIG_DM_ETH
memcpy
(
*
packetp
,
(
char
*
)
addr
,
frame_length
);
#else
memcpy
(
buff
,
(
char
*
)
addr
,
frame_length
);
net_process_received_packet
(
buff
,
frame_length
);
#endif
len
=
frame_length
;
}
else
{
if
(
bd_status
&
FEC_RBD_ERR
)
...
...
@@ -998,18 +1012,9 @@ static void fec_free_descs(struct fec_priv *fec)
free
(
fec
->
tbd_base
);
}
#ifdef CONFIG_DM_ETH
struct
mii_dev
*
fec_get_miibus
(
struct
udevice
*
dev
,
int
dev_id
)
#else
struct
mii_dev
*
fec_get_miibus
(
uint32_t
base_addr
,
int
dev_id
)
#endif
struct
mii_dev
*
fec_get_miibus
(
ulong
base_addr
,
int
dev_id
)
{
#ifdef CONFIG_DM_ETH
struct
fec_priv
*
priv
=
dev_get_priv
(
dev
);
struct
ethernet_regs
*
eth
=
priv
->
eth
;
#else
struct
ethernet_regs
*
eth
=
(
struct
ethernet_regs
*
)(
ulong
)
base_addr
;
#endif
struct
ethernet_regs
*
eth
=
(
struct
ethernet_regs
*
)
base_addr
;
struct
mii_dev
*
bus
;
int
ret
;
...
...
@@ -1141,12 +1146,12 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)
#endif
int
ret
;
#ifdef CONFIG_
MX28
#ifdef CONFIG_
FEC_MXC_MDIO_BASE
/*
* The i.MX28 has two ethernet interfaces, but they are not equal.
* Only the first one can access the MDIO bus.
*/
base_mii
=
MXS_ENET0
_BASE
;
base_mii
=
CONFIG_FEC_MXC_MDIO
_BASE
;
#else
base_mii
=
addr
;
#endif
...
...
@@ -1202,10 +1207,19 @@ static int fecmxc_read_rom_hwaddr(struct udevice *dev)
return
fec_get_hwaddr
(
priv
->
dev_id
,
pdata
->
enetaddr
);
}
static
int
fecmxc_free_pkt
(
struct
udevice
*
dev
,
uchar
*
packet
,
int
length
)
{
if
(
packet
)
free
(
packet
);
return
0
;
}
static
const
struct
eth_ops
fecmxc_ops
=
{
.
start
=
fecmxc_init
,
.
send
=
fecmxc_send
,
.
recv
=
fecmxc_recv
,
.
free_pkt
=
fecmxc_free_pkt
,
.
stop
=
fecmxc_halt
,
.
write_hwaddr
=
fecmxc_set_hwaddr
,
.
read_rom_hwaddr
=
fecmxc_read_rom_hwaddr
,
...
...
@@ -1237,7 +1251,6 @@ static int fecmxc_probe(struct udevice *dev)
struct
eth_pdata
*
pdata
=
dev_get_platdata
(
dev
);
struct
fec_priv
*
priv
=
dev_get_priv
(
dev
);
struct
mii_dev
*
bus
=
NULL
;
int
dev_id
=
-
1
;
uint32_t
start
;
int
ret
;
...
...
@@ -1258,9 +1271,13 @@ static int fecmxc_probe(struct udevice *dev)
}
fec_reg_setup
(
priv
);
priv
->
dev_id
=
(
dev_id
==
-
1
)
?
0
:
dev_id
;
bus
=
fec_get_miibus
(
dev
,
dev_id
);
priv
->
dev_id
=
dev
->
seq
;
#ifdef CONFIG_FEC_MXC_MDIO_BASE
bus
=
fec_get_miibus
((
ulong
)
CONFIG_FEC_MXC_MDIO_BASE
,
dev
->
seq
);
#else
bus
=
fec_get_miibus
((
ulong
)
priv
->
eth
,
dev
->
seq
);
#endif
if
(
!
bus
)
{
ret
=
-
ENOMEM
;
goto
err_mii
;
...
...
@@ -1275,12 +1292,11 @@ static int fecmxc_probe(struct udevice *dev)
return
0
;
err_timeout:
free
(
priv
->
phydev
);
err_phy:
mdio_unregister
(
bus
);
free
(
bus
);
err_mii:
err_timeout:
fec_free_descs
(
priv
);
return
ret
;
}
...
...
@@ -1326,6 +1342,9 @@ static int fecmxc_ofdata_to_platdata(struct udevice *dev)
static
const
struct
udevice_id
fecmxc_ids
[]
=
{
{
.
compatible
=
"fsl,imx6q-fec"
},
{
.
compatible
=
"fsl,imx6sl-fec"
},
{
.
compatible
=
"fsl,imx6sx-fec"
},
{
.
compatible
=
"fsl,imx6ul-fec"
},
{
}
};
...
...
drivers/net/mvneta.c
浏览文件 @
df13a443
...
...
@@ -890,6 +890,15 @@ static void mvneta_mac_addr_set(struct mvneta_port *pp, unsigned char *addr,
mvneta_set_ucast_addr
(
pp
,
addr
[
5
],
queue
);
}
static
int
mvneta_write_hwaddr
(
struct
udevice
*
dev
)
{
mvneta_mac_addr_set
(
dev_get_priv
(
dev
),
((
struct
eth_pdata
*
)
dev_get_platdata
(
dev
))
->
enetaddr
,
rxq_def
);
return
0
;
}
/* Handle rx descriptor fill by setting buf_cookie and buf_phys_addr */
static
void
mvneta_rx_desc_fill
(
struct
mvneta_rx_desc
*
rx_desc
,
u32
phys_addr
,
u32
cookie
)
...
...
@@ -1753,6 +1762,7 @@ static const struct eth_ops mvneta_ops = {
.
send
=
mvneta_send
,
.
recv
=
mvneta_recv
,
.
stop
=
mvneta_stop
,
.
write_hwaddr
=
mvneta_write_hwaddr
,
};
static
int
mvneta_ofdata_to_platdata
(
struct
udevice
*
dev
)
...
...
drivers/net/phy/Kconfig
浏览文件 @
df13a443
...
...
@@ -13,12 +13,20 @@ menuconfig PHYLIB
if PHYLIB
config PHY_ADDR_ENABLE
bool "Limit phy address"
default y if ARCH_SUNXI
help
Select this if you want to control which phy address is used
if PHY_ADDR_ENABLE
config PHY_ADDR
int "PHY address"
default 1 if ARCH_SUNXI
default 0
help
The address of PHY on MII bus. Usually in range of 0 to 31.
endif
config B53_SWITCH
bool "Broadcom BCM53xx (RoboSwitch) Ethernet switch PHY support."
...
...
drivers/net/zynq_gem.c
浏览文件 @
df13a443
...
...
@@ -182,6 +182,7 @@ struct zynq_gem_priv {
int
phy_of_handle
;
struct
mii_dev
*
bus
;
struct
clk
clk
;
u32
max_speed
;
bool
int_pcs
;
};
...
...
@@ -341,6 +342,12 @@ static int zynq_phy_init(struct udevice *dev)
priv
->
phydev
->
supported
&=
supported
|
ADVERTISED_Pause
|
ADVERTISED_Asym_Pause
;
if
(
priv
->
max_speed
)
{
ret
=
phy_set_supported
(
priv
->
phydev
,
priv
->
max_speed
);
if
(
ret
)
return
ret
;
}
priv
->
phydev
->
advertising
=
priv
->
phydev
->
supported
;
if
(
priv
->
phy_of_handle
>
0
)
...
...
@@ -704,6 +711,8 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
}
priv
->
interface
=
pdata
->
phy_interface
;
priv
->
max_speed
=
fdtdec_get_uint
(
gd
->
fdt_blob
,
priv
->
phy_of_handle
,
"max-speed"
,
SPEED_1000
);
priv
->
int_pcs
=
fdtdec_get_bool
(
gd
->
fdt_blob
,
node
,
"is-internal-pcspma"
);
...
...
include/configs/mx28evk.h
浏览文件 @
df13a443
...
...
@@ -65,6 +65,7 @@
/* FEC Ethernet on SoC */
#ifdef CONFIG_CMD_NET
#define CONFIG_FEC_MXC
#define CONFIG_FEC_MXC_MDIO_BASE MXS_ENET0_BASE
#define CONFIG_MX28_FEC_MAC_IN_OCOTP
#endif
...
...
include/configs/socfpga_common.h
浏览文件 @
df13a443
...
...
@@ -292,7 +292,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
#define BOOT_TARGET_DEVICES_DHCP(func)
#endif
#if
def CONFIG_CMD_PXE
#if
defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP)
#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
#else
#define BOOT_TARGET_DEVICES_PXE(func)
...
...
include/configs/xilinx_zynqmp.h
浏览文件 @
df13a443
...
...
@@ -172,7 +172,7 @@
# define BOOT_TARGET_DEVICES_USB(func)
#endif
#if defined(CONFIG_CMD_PXE)
#if defined(CONFIG_CMD_PXE)
&& defined(CONFIG_CMD_DHCP)
# define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
#else
# define BOOT_TARGET_DEVICES_PXE(func)
...
...
include/configs/zynq-common.h
浏览文件 @
df13a443
...
...
@@ -162,7 +162,7 @@
#define BOOT_TARGET_DEVICES_USB(func)
#endif
#if defined(CONFIG_CMD_PXE)
#if defined(CONFIG_CMD_PXE)
&& defined(CONFIG_CMD_DHCP)
#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
#else
#define BOOT_TARGET_DEVICES_PXE(func)
...
...
include/netdev.h
浏览文件 @
df13a443
...
...
@@ -117,11 +117,7 @@ static inline int pci_eth_init(bd_t *bis)
return
num
;
}
#ifdef CONFIG_DM_ETH
struct
mii_dev
*
fec_get_miibus
(
struct
udevice
*
dev
,
int
dev_id
);
#else
struct
mii_dev
*
fec_get_miibus
(
uint32_t
base_addr
,
int
dev_id
);
#endif
struct
mii_dev
*
fec_get_miibus
(
ulong
base_addr
,
int
dev_id
);
#ifdef CONFIG_PHYLIB
struct
phy_device
;
...
...
lib/efi_loader/Makefile
浏览文件 @
df13a443
...
...
@@ -22,5 +22,5 @@ obj-y += efi_watchdog.o
obj-$(CONFIG_LCD)
+=
efi_gop.o
obj-$(CONFIG_DM_VIDEO)
+=
efi_gop.o
obj-$(CONFIG_PARTITIONS)
+=
efi_disk.o
obj-$(CONFIG_
CMD_
NET)
+=
efi_net.o
obj-$(CONFIG_NET)
+=
efi_net.o
obj-$(CONFIG_GENERATE_SMBIOS_TABLE)
+=
efi_smbios.o
lib/efi_loader/efi_device_path.c
浏览文件 @
df13a443
...
...
@@ -747,7 +747,7 @@ struct efi_device_path *efi_dp_from_file(struct blk_desc *desc, int part,
return
start
;
}
#ifdef CONFIG_
CMD_
NET
#ifdef CONFIG_NET
struct
efi_device_path
*
efi_dp_from_eth
(
void
)
{
#ifndef CONFIG_DM_ETH
...
...
net/Kconfig
浏览文件 @
df13a443
...
...
@@ -22,55 +22,4 @@ config NETCONSOLE
Support the 'nc' input/output device for networked console.
See README.NetConsole for details.
config NET_TFTP_VARS
bool "Control TFTP timeout and count through environment"
depends on CMD_NET
default y
help
If set, allows controlling the TFTP timeout through the
environment variable tftptimeout, and the TFTP maximum
timeout count through the variable tftptimeoutcountmax.
If unset, timeout and maximum are hard-defined as 1 second
and 10 timouts per TFTP transfer.
config BOOTP_BOOTPATH
bool "Enable BOOTP BOOTPATH"
depends on CMD_NET
config BOOTP_DNS
bool "Enable bootp DNS"
depends on CMD_NET
config BOOTP_GATEWAY
bool "Enable BOOTP gateway"
depends on CMD_NET
config BOOTP_HOSTNAME
bool "Enable BOOTP hostname"
depends on CMD_NET
config BOOTP_PXE
bool "Enable BOOTP PXE"
depends on CMD_NET
config BOOTP_SUBNETMASK
bool "Enable BOOTP subnetmask"
depends on CMD_NET
depends on CMD_NET
config BOOTP_PXE_CLIENTARCH
hex
depends on CMD_NET
default 0x16 if ARM64
default 0x15 if ARM
default 0 if X86
config BOOTP_VCI_STRING
string
depends on CMD_NET
default "U-Boot.armv7" if CPU_V7 || CPU_V7M
default "U-Boot.armv8" if ARM64
default "U-Boot.arm" if ARM
default "U-Boot"
endif # if NET
net/Makefile
浏览文件 @
df13a443
...
...
@@ -8,23 +8,23 @@
#ccflags-y += -DDEBUG
obj-y
+=
checksum.o
obj-$(CONFIG_
CMD_NET)
+=
arp.o
obj-$(CONFIG_CMD_
NET)
+=
bootp.o
obj-$(CONFIG_
NET)
+=
arp.o
obj-$(CONFIG_CMD_
BOOTP)
+=
bootp.o
obj-$(CONFIG_CMD_CDP)
+=
cdp.o
obj-$(CONFIG_CMD_DNS)
+=
dns.o
ifdef
CONFIG_DM_ETH
obj-$(CONFIG_
CMD_NET)
+=
eth-uclass.o
obj-$(CONFIG_
NET)
+=
eth-uclass.o
else
obj-$(CONFIG_
CMD_NET)
+=
eth_legacy.o
obj-$(CONFIG_
NET)
+=
eth_legacy.o
endif
obj-$(CONFIG_
CMD_NET)
+=
eth_common.o
obj-$(CONFIG_
NET)
+=
eth_common.o
obj-$(CONFIG_CMD_LINK_LOCAL)
+=
link_local.o
obj-$(CONFIG_
CMD_NET)
+=
net.o
obj-$(CONFIG_
NET)
+=
net.o
obj-$(CONFIG_CMD_NFS)
+=
nfs.o
obj-$(CONFIG_CMD_PING)
+=
ping.o
obj-$(CONFIG_CMD_RARP)
+=
rarp.o
obj-$(CONFIG_CMD_SNTP)
+=
sntp.o
obj-$(CONFIG_CMD_
NET)
+=
tftp.o
obj-$(CONFIG_CMD_
TFTPBOOT)
+=
tftp.o
# Disable this warning as it is triggered by:
# sprintf(buf, index ? "foo%d" : "foo", index)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录