mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
net: tsi108_eth: Add initialized eth_device structure
tsi108_eth driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> CC: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
5ed0eeca38
commit
7faeb9976a
1 changed files with 5 additions and 1 deletions
|
@ -731,7 +731,11 @@ int tsi108_eth_initialize (bd_t * bis)
|
|||
|
||||
for (index = 0; index < CONFIG_TSI108_ETH_NUM_PORTS; index++) {
|
||||
dev = (struct eth_device *)malloc(sizeof(struct eth_device));
|
||||
|
||||
if (!dev) {
|
||||
printf("tsi108: Can not allocate memory\n");
|
||||
break;
|
||||
}
|
||||
memset(dev, 0, sizeof(*dev));
|
||||
sprintf (dev->name, "TSI108_eth%d", index);
|
||||
|
||||
dev->iobase = ETH_BASE + (index * ETH_PORT_OFFSET);
|
||||
|
|
Loading…
Add table
Reference in a new issue