Skip to content
Snippets Groups Projects
Commit 7faeb997 authored by Nobuhiro Iwamatsu's avatar Nobuhiro Iwamatsu Committed by Wolfgang Denk
Browse files

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: default avatarNobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Ben Warren <biggerbadderben@gmail.com>
parent 5ed0eeca
No related branches found
No related tags found
No related merge requests found
...@@ -731,7 +731,11 @@ int tsi108_eth_initialize (bd_t * bis) ...@@ -731,7 +731,11 @@ int tsi108_eth_initialize (bd_t * bis)
for (index = 0; index < CONFIG_TSI108_ETH_NUM_PORTS; index++) { for (index = 0; index < CONFIG_TSI108_ETH_NUM_PORTS; index++) {
dev = (struct eth_device *)malloc(sizeof(struct eth_device)); 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); sprintf (dev->name, "TSI108_eth%d", index);
dev->iobase = ETH_BASE + (index * ETH_PORT_OFFSET); dev->iobase = ETH_BASE + (index * ETH_PORT_OFFSET);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment