Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752628AbbF3Uua (ORCPT ); Tue, 30 Jun 2015 16:50:30 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:55281 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751324AbbF3UuV (ORCPT ); Tue, 30 Jun 2015 16:50:21 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Paul Osmialowski , Greg Kroah-Hartman , Ian Campbell , Jiri Slaby , Kumar Gala , Linus Walleij , Mark Rutland , Michael Turquette , Pawel Moll , Rob Herring , Russell King , Stephen Boyd , Vinod Koul , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, Nicolas Pitre , Sergei Poselenov , Paul Bolle , Jingchang Lu , Yuri Tikhonov , Rob Herring , Geert Uytterhoeven , Uwe Kleine-Koenig , Alexander Potashev , Frank Li , Thomas Gleixner , Anson Huang Subject: Re: [PATCH v2 7/9] arm: twr-k70f120m: use Freescale eDMA driver with Kinetis SoC Date: Tue, 30 Jun 2015 22:49:11 +0200 Message-ID: <1650263.FfdEQKm1Bu@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1435667250-28299-8-git-send-email-pawelo@king.net.pl> References: <1435667250-28299-1-git-send-email-pawelo@king.net.pl> <1435667250-28299-8-git-send-email-pawelo@king.net.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:aDZBz/xxAZWhe5xSlLwDsMhme8zABtesJcV+F0Kg8Sh+kRqfSft LgBP7HEA1G52T87iPQEgq4AU7SH/Kty0GUa3+PWJE1qo9IH7F2TofRB66DwmpuuXRhqW7fS fySBOrdMGEVbdMAsgbBT4Or2MA/y5B19j8UkhCs4Y+xJmetZp+B5acNSCkbG/D/5jWeH/Bx Hdn6YCRnD0EdEol9X9+Cg== X-UI-Out-Filterresults: notjunk:1;V01:K0:xmdNNIR6FCI=:8KyGp9Jg8TeWz4cbJItIMb wr6ERwqFrXaYe0vfDAEJZuP/giCtRZUY9m9AiB9dDWKOoRJqM7WSm0cOD66ADwT1TTknVdEu/ Ey4pOrGeu+lySKZhjAF+3UPGNJXhzL9pZr6gEHB9MOHi3UJECDpvW/eCGf0fNsJgsLf9iwpsQ pIWqyyzlKcH4WJ+XIeg8seb/6dE1cRsbVKykVemZFsZXz7Z4zCmt9MfCrapGpzNAX5mPOG9fc fLkVh7BP/lijbnamUNS0eziH+EZRnl4yrB4pweRbAItxZIDxzqHdraeBHemj+6FTtvumgAsoI 9uNYGnJ+0vVJHaDQWec3A1ycr3XWDiegRt5WAxXZlqnbTqmfKJeHNtHYQ1Tn4nVzHAisVzWh8 nVwusf2eLKk3WkgmU8aI9VrhYqq3cEGKOBXY+slBmNwlvjMcGwwY6iIPCtvIcXocaoMJfxe6U nrkPsyOWS8Zi5+UwkHYQzhntH6+0LGvPsicvp9pZX52FtmvI2j+CYwO3gyPTsVEeBUKc14nuB sznXLPfeupuoYr5DbQU0zjVJEnhBwG8wofjeLiaD7PDL1l6PIDoXpKZIlynFDhx/MhTlQ5I30 JaorSNNr1wbDrKQX8INnb8/2/lHyQZB0eAkWAy/+AE64GYcACqYoO4IbE+3gS1j6bE9x3b89e S5nOpp4I4h7b6lQq+XN8XZUuNa4pMCQjPRr17usf865TgWg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1932 Lines: 59 On Tuesday 30 June 2015 14:27:28 Paul Osmialowski wrote: > Note that is needed (which is denoted by > CONFIG_NEED_MACH_MEMORY_H) as it provides macros required for proper > operation of DMA allocation functions. You can't do this, it breaks compilation when multiple platforms are enabled. > Signed-off-by: Paul Osmialowski > --- > arch/arm/Kconfig | 4 ++ > arch/arm/boot/dts/kinetis.dtsi | 34 ++++++++++++++++ > arch/arm/mach-kinetis/include/mach/memory.h | 61 +++++++++++++++++++++++++++++ > 3 files changed, 99 insertions(+) > create mode 100644 arch/arm/mach-kinetis/include/mach/memory.h > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index b21592b..8ccffee 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -971,6 +971,10 @@ config ARCH_KINETIS > select CLKSRC_KINETIS > select PINCTRL > select PINCTRL_KINETIS > + select DMADEVICES > + select FSL_EDMA > + select DMA_OF > + select NEED_MACH_MEMORY_H I think DMA_OF is implied by dmaengine support in combination with CONFIG_OF > + > +#ifndef _MACH_KINETIS_MEMORY_H > +#define _MACH_KINETIS_MEMORY_H > + > +#ifndef __ASSEMBLY__ > + > +/* > + * On Kinetis K70, consistent DMA memory resides in a special > + * DDRAM alias region (non-cacheable DDRAM at 0x80000000). > + * > + */ > +#define KINETIS_PHYS_DMA_OFFSET UL(0x80000000) > + > +/* > + * Mask of the field used to distinguish DDRAM aliases > + */ > +#define KINETIS_DRAM_ALIAS_MASK UL(0xf8000000) This should be expressed using the 'dma-ranges' properties in the bus nodes above any DMA master, the normal DMA mapping code will then do the right thing. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/