Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 865bddfb authored by Michael Hennerich's avatar Michael Hennerich Committed by Mike Frysinger
Browse files

Blackfin: fix suspend/resume failure with some on-chip ROMs



Some Blackfin on-chip ROMs utilize some MDMA channels during the suspend
and resume process, but don't clean up after themselves.  So manually
clear all DMA channels when resuming since no DMA could have been running
at this point in time.  Now Linux should be able to work regardless of any
laziness on the part of the on-chip ROM or boot loader.

Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent a8a8a669
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -225,9 +225,14 @@ int blackfin_dma_suspend(void)
void blackfin_dma_resume(void)
{
	int i;
	for (i = 0; i < MAX_DMA_SUSPEND_CHANNELS; ++i)

	for (i = 0; i < MAX_DMA_CHANNELS; ++i) {
		dma_ch[i].regs->cfg = 0;

		if (i < MAX_DMA_SUSPEND_CHANNELS)
			dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map;
	}
}
#endif

/**