From 8314ce1ebf26dc8bd7221da18d32731904593229 Mon Sep 17 00:00:00 2001 From: edolomb Date: Sun, 1 Oct 2017 16:05:58 +0000 Subject: Minor changes in sama_xdmac driver git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10738 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.c | 1 + os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'os/hal') diff --git a/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.c b/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.c index 43e591440..d7d888fb7 100644 --- a/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.c +++ b/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.c @@ -287,6 +287,7 @@ sama_dma_channel_t* dmaChannelAllocate(uint32_t priority, /* Setting aic */ aicSetSourcePriority(id, priority); aicEnableInt(id); + /* Enabling DMA clocks required by the current channel set.*/ if (id == ID_XDMAC0) { pmcEnableXDMAC0(); diff --git a/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h b/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h index 609021e00..475627ef0 100644 --- a/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h +++ b/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h @@ -228,12 +228,12 @@ typedef struct { * * @special */ -#define dmaChannelDisable(dmachp) { \ - (dmachp)->xdmac->XDMAC_GD |= XDMAC_GD_DI0 << ((dmachp)->chid); \ - while (((dmachp)->xdmac->XDMAC_GS) & (XDMAC_GS_ST0 << (dmachp)->chid)) == 1) { \ - ; \ - } \ - dmaGetChannelInt(dmachp); \ +#define dmaChannelDisable(dmachp) { \ + (dmachp)->xdmac->XDMAC_GD |= XDMAC_GD_DI0 << ((dmachp)->chid); \ + while ((((dmachp)->xdmac->XDMAC_GS) & (XDMAC_GS_ST0 << (dmachp)->chid)) == 1) { \ + ; \ + } \ + dmaGetChannelInt(dmachp); \ } /** -- cgit v1.2.3