GRETH: use shared-irq service instead of BSP specific set_vec()

The ISR code is updated to use argument instead of global greth
structure, now that the greth private is available in the ISR.

The shared-irq routines will unmask the IRQ, so the forced LEON3
BSP unmask/clear IRQ is removed.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
This commit is contained in:
Daniel Hellstrom
2012-04-05 10:23:17 -05:00
committed by Joel Sherrill
parent 0f04edd9cc
commit 7499b84f41
3 changed files with 17 additions and 28 deletions

View File

@@ -48,13 +48,10 @@ int rtems_leon_greth_driver_attach(
*(volatile int *) base_addr = GRETH_CTRL_RST;
*(volatile int *) base_addr = 0;
leon_greth_configuration.base_address = base_addr;
leon_greth_configuration.vector = eth_irq + 0x10;
leon_greth_configuration.vector = eth_irq; /* on LEON vector is IRQ no. */
leon_greth_configuration.txd_count = TDA_COUNT;
leon_greth_configuration.rxd_count = RDA_COUNT;
if (rtems_greth_driver_attach( config, &leon_greth_configuration )) {
LEON_Clear_interrupt(eth_irq);
LEON_Unmask_interrupt(eth_irq);
}
rtems_greth_driver_attach(config, &leon_greth_configuration);
}
return 0;
}