Revision 8da3ff18 hw/etraxfs_eth.c
b/hw/etraxfs_eth.c | ||
---|---|---|
314 | 314 |
{ |
315 | 315 |
CPUState *env; |
316 | 316 |
qemu_irq *irq; |
317 |
target_phys_addr_t base; |
|
318 | 317 |
VLANClientState *vc; |
319 | 318 |
int ethregs; |
320 | 319 |
|
... | ... | |
375 | 374 |
struct fs_eth *eth = opaque; |
376 | 375 |
uint32_t r = 0; |
377 | 376 |
|
378 |
/* Make addr relative to this instances base. */ |
|
379 |
addr -= eth->base; |
|
380 | 377 |
switch (addr) { |
381 | 378 |
case R_STAT: |
382 | 379 |
/* Attach an MDIO/PHY abstraction. */ |
... | ... | |
428 | 425 |
{ |
429 | 426 |
struct fs_eth *eth = opaque; |
430 | 427 |
|
431 |
/* Make addr relative to this instances base. */ |
|
432 |
addr -= eth->base; |
|
433 | 428 |
switch (addr) |
434 | 429 |
{ |
435 | 430 |
case RW_MA0_LO: |
... | ... | |
589 | 584 |
dma[1].client.pull = NULL; |
590 | 585 |
|
591 | 586 |
eth->env = env; |
592 |
eth->base = base; |
|
593 | 587 |
eth->irq = irq; |
594 | 588 |
eth->dma_out = dma; |
595 | 589 |
eth->dma_in = dma + 1; |
Also available in: Unified diff