summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bsps/shared/grlib/spw/grspw.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bsps/shared/grlib/spw/grspw.c b/bsps/shared/grlib/spw/grspw.c
index 2e1e8e90e9..dd61b7a472 100644
--- a/bsps/shared/grlib/spw/grspw.c
+++ b/bsps/shared/grlib/spw/grspw.c
@@ -261,6 +261,7 @@ static void check_rx_errors(GRSPW_DEV *pDev, int ctrl);
static void grspw_rxnext(GRSPW_DEV *pDev);
static void grspw_interrupt(void *arg);
static int grspw_buffer_alloc(GRSPW_DEV *pDev);
+static int grspw_dmatables_alloc(GRSPW_DEV *pDev);
static rtems_device_driver grspw_initialize(
rtems_device_major_number major,
@@ -553,6 +554,8 @@ int grspw_device_init(GRSPW_DEV *pDev)
if (grspw_buffer_alloc(pDev))
return RTEMS_NO_MEMORY;
+ if (grspw_dmatables_alloc(pDev))
+ return RTEMS_NO_MEMORY;
/* Create semaphores */
rtems_semaphore_create(
@@ -678,7 +681,11 @@ static int grspw_buffer_alloc(GRSPW_DEV *pDev)
(void **)&pDev->ptr_txhbuf0_remote,
pDev->txhbufsize * pDev->txbufcnt);
}
+ return 0;
+}
+static int grspw_dmatables_alloc(GRSPW_DEV *pDev)
+{
/* DMA DESCRIPTOR TABLES */
if (pDev->bd_dma_area & 1) {
/* Address given in remote address */