summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2011-12-13 17:43:54 +0100
committerDaniel Hellstrom <daniel@gaisler.com>2012-03-27 15:20:14 +0200
commitd8326621d816c85eb9a5a9245c6cbff9f0d2b7cf (patch)
tree08c5236712cfd7adf80c17eaf4882955533754a8
parent735871ab86335cbead7a3010bc7a1f6ee282a5ea (diff)
LEON3: leon_greth cleanups
-rw-r--r--c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c b/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
index 3254b6043d..95a0c2b689 100644
--- a/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
+++ b/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
@@ -34,14 +34,14 @@ int rtems_leon_greth_driver_attach(
unsigned int base_addr = 0; /* avoid warnings */
unsigned int eth_irq = 0; /* avoid warnings */
struct ambapp_dev *adev;
- struct ambapp_common_info *apb;
+ struct ambapp_apb_info *apb;
/* Scan for MAC AHB slave interface */
- adev = ambapp_for_each(&ambapp_plb, (OPTIONS_ALL|OPTIONS_APB_SLVS),
+ adev = (void *)ambapp_for_each(&ambapp_plb, (OPTIONS_ALL|OPTIONS_APB_SLVS),
VENDOR_GAISLER, GAISLER_ETHMAC,
ambapp_find_by_idx, NULL);
if (adev) {
- apb = (struct ambapp_common_info *)adev->devinfo;
+ apb = DEV_TO_APB(adev);
base_addr = apb->start;
eth_irq = apb->irq;
@@ -50,7 +50,7 @@ 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.irq = eth_irq;
leon_greth_configuration.txd_count = TDA_COUNT;
leon_greth_configuration.rxd_count = RDA_COUNT;
if (rtems_greth_driver_attach( config, &leon_greth_configuration )) {