Fix SAM bug: Parmaters reversed in DMA function call

This commit is contained in:
Gregory Nutt 2013-08-06 15:47:09 -06:00
parent b0e8231fa3
commit bfaf64e54e
5 changed files with 12 additions and 9 deletions

View File

@ -5323,3 +5323,6 @@
correct some bad register address and some bad assertions that caused correct some bad register address and some bad assertions that caused
false alarms. These latter were backported to the SAM34 DMAC driver false alarms. These latter were backported to the SAM34 DMAC driver
as well (2013-8-6). as well (2013-8-6).
* arch/arm/src/sama5/sam_dmac.c and sam34/sam34_dmac.c: Correct
some parameters reversed in function call (2013-8-6).

View File

@ -903,7 +903,7 @@ static int sam_rxbuffer(struct sam_dma_s *dmach, uint32_t paddr,
ctrlb = sam_rxctrlb(dmach); ctrlb = sam_rxctrlb(dmach);
} }
ctrla = sam_rxctrla(dmach, regval, nbytes); ctrla = sam_rxctrla(dmach, nbytes, regval);
/* Add the new link list entry */ /* Add the new link list entry */
@ -1159,7 +1159,7 @@ static int sam_dmainterrupt(int irq, void *context)
void weak_function up_dmainitialize(void) void weak_function up_dmainitialize(void)
{ {
dmallvdbg("Iinitialize DMAC0\n"); dmallvdbg("Initialize DMAC0\n");
/* Enable peripheral clock */ /* Enable peripheral clock */

View File

@ -1108,7 +1108,7 @@ static int sam_interrupt(int irq, void *context)
/* Handle in progress, interrupt driven data transfers ****************/ /* Handle in progress, interrupt driven data transfers ****************/
/* Do any of these interrupts signal the end a data transfer? */ /* Do any of these interrupts signal the end a data transfer? */
pending = enabled & priv->xfrmask; pending = enabled & priv->xfrmask;
if (pending != 0) if (pending != 0)
{ {
/* Yes.. the transfer is complete. Did it complete with an error? */ /* Yes.. the transfer is complete. Did it complete with an error? */
@ -1142,7 +1142,7 @@ static int sam_interrupt(int irq, void *context)
/* Handle wait events *************************************************/ /* Handle wait events *************************************************/
/* Do any of these interrupts signal wakeup event? */ /* Do any of these interrupts signal wakeup event? */
pending = enabled & priv->waitmask; pending = enabled & priv->waitmask;
if (pending != 0) if (pending != 0)
{ {
sdio_eventset_t wkupevent = 0; sdio_eventset_t wkupevent = 0;

View File

@ -1158,7 +1158,7 @@ static int sam_rxbuffer(struct sam_dmach_s *dmach, uint32_t paddr,
ctrlb = sam_rxctrlb(dmach); ctrlb = sam_rxctrlb(dmach);
} }
ctrla = sam_rxctrla(dmach, regval, nbytes); ctrla = sam_rxctrla(dmach, nbytes, regval);
/* Add the new link list entry */ /* Add the new link list entry */
@ -1480,7 +1480,7 @@ void sam_dmainitialize(struct sam_dmac_s *dmac)
void weak_function up_dmainitialize(void) void weak_function up_dmainitialize(void)
{ {
#ifdef CONFIG_SAMA5_DMAC0 #ifdef CONFIG_SAMA5_DMAC0
dmallvdbg("Iinitialize DMAC0\n"); dmallvdbg("Initialize DMAC0\n");
/* Enable peripheral clock */ /* Enable peripheral clock */
@ -1500,7 +1500,7 @@ void weak_function up_dmainitialize(void)
#endif #endif
#ifdef CONFIG_SAMA5_DMAC1 #ifdef CONFIG_SAMA5_DMAC1
dmallvdbg("Iinitialize DMAC1\n"); dmallvdbg("Initialize DMAC1\n");
/* Enable peripheral clock */ /* Enable peripheral clock */

View File

@ -1339,7 +1339,7 @@ static int sam_hsmci_interrupt(struct sam_dev_s *priv)
/* Handle in progress, interrupt driven data transfers ****************/ /* Handle in progress, interrupt driven data transfers ****************/
/* Do any of these interrupts signal the end a data transfer? */ /* Do any of these interrupts signal the end a data transfer? */
pending = enabled & priv->xfrmask; pending = enabled & priv->xfrmask;
if (pending != 0) if (pending != 0)
{ {
/* Yes.. the transfer is complete. Did it complete with an error? */ /* Yes.. the transfer is complete. Did it complete with an error? */
@ -1373,7 +1373,7 @@ static int sam_hsmci_interrupt(struct sam_dev_s *priv)
/* Handle wait events *************************************************/ /* Handle wait events *************************************************/
/* Do any of these interrupts signal wakeup event? */ /* Do any of these interrupts signal wakeup event? */
pending = enabled & priv->waitmask; pending = enabled & priv->waitmask;
if (pending != 0) if (pending != 0)
{ {
sdio_eventset_t wkupevent = 0; sdio_eventset_t wkupevent = 0;