9
0
Fork 0

net: dm9k: Fix resource sizes in add_dm9000_device

The dm9000 needs a resource for an index register and one for
the data register. Both should have a size of the access width,
and not two times the access width. The current code is probably
a leftover when the dm9000 had only one resource.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-12-12 10:29:33 +01:00
parent 135d77b491
commit 1c9668a3cc
1 changed files with 4 additions and 4 deletions

View File

@ -110,14 +110,14 @@ struct device_d *add_dm9000_device(int id, resource_size_t base,
switch (flags) {
case IORESOURCE_MEM_32BIT:
size = 8;
break;
case IORESOURCE_MEM_16BIT:
size = 4;
break;
case IORESOURCE_MEM_8BIT:
case IORESOURCE_MEM_16BIT:
size = 2;
break;
case IORESOURCE_MEM_8BIT:
size = 1;
break;
default:
printf("dm9000: memory width flag missing\n");
return NULL;