ARM: OMAP2+: Configure sdma capabilities directly
authorTony Lindgren <tony@atomide.com>
Mon, 16 Dec 2019 22:41:53 +0000 (14:41 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 17 Dec 2019 16:06:35 +0000 (08:06 -0800)
Only earlier SoCs need to be checked for this, all SoCs starting with
omap3630 have CCDN register. This way we get closer to removing the need
to ioremap sdma registers in the platform code.

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Vinod Koul <vkoul@kernel.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/dma.c

index c138703aab9072cff1b40e8095b40f0c96112988..a380bf823197780a8bf0f351981753a95f2ee43d 100644 (file)
@@ -273,10 +273,10 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
                d->dev_caps |= HS_CHANNELS_RESERVED;
 
        /* Check the capabilities register for descriptor loading feature */
-       if (dma_read(CAPS_0, 0) & DMA_HAS_DESCRIPTOR_CAPS)
-               dma_common_ch_end = CCDN;
-       else
+       if (soc_is_omap24xx() || soc_is_omap34xx() || soc_is_am35xx())
                dma_common_ch_end = CCFN;
+       else
+               dma_common_ch_end = CCDN;
 
        return 0;
 }