dmaengine: pl330: Fix dmac register write error

This is a workaround for dmac register write error by
read once before write to make paddr is stable, which
was caused by asynchronous between dmac_aclk and pclk.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I32e03204d6399db4fe4f40479050cc45e04ddb1f
This commit is contained in:
Sugar Zhang
2020-06-02 16:44:04 +08:00
committed by Tao Huang
parent c50583e2af
commit 3e1acca6b6

View File

@@ -37,6 +37,16 @@
#define PL330_QUIRK_BROKEN_NO_FLUSHP BIT(0)
#ifdef CONFIG_CPU_RV1126
#undef writel
#define writel(v, c) \
do { \
readl_relaxed(c); \
__iowmb(); \
writel_relaxed(v, c); \
} while (0)
#endif
enum pl330_cachectrl {
CCTRL0, /* Noncacheable and nonbufferable */
CCTRL1, /* Bufferable only */