From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] dma: of-dma: return error when 'dma-cells' not found Date: Tue, 05 Mar 2013 11:15:41 +0100 Message-ID: <1859273.NY466Orvuh@wuerfel> References: <1362475531-32260-1-git-send-email-padma.v@samsung.com> <5135BE58.4040105@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5135BE58.4040105-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, boojin.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, sbkim73-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Padmavathi Venna , vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org List-Id: devicetree@vger.kernel.org On Tuesday 05 March 2013 03:43:52 Rob Herring wrote: > On 03/05/2013 03:25 AM, Padmavathi Venna wrote: > > This patch returns error when 'dma-cells' property not found > > in the corresponding device node. With out this change there > > is a crash in the generic dma incompatible platforms. > > > > Signed-off-by: Padmavathi Venna > > NAK. > > #dma-cells should be optional. It is not needed for platforms supporting > memory to memory transfers only and should therefore be optional. You > cannot assume the dtb can be updated and kernel changes need to work > with old dtbs. I've submitted patches to address this and fix the crash: > > https://lists.ozlabs.org/pipermail/devicetree-discuss/2013-February/028769.html Why would you call of_dma_controller_register() for a dma engine that does not support slave channels, when that is the only purpose of that interface? Note that the binding defines #dma-cells as required, and it does not make any sense otherwise. Arnd