Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752073AbcDOP7c (ORCPT ); Fri, 15 Apr 2016 11:59:32 -0400 Received: from mail.kernel.org ([198.145.29.136]:60625 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbcDOP7a (ORCPT ); Fri, 15 Apr 2016 11:59:30 -0400 MIME-Version: 1.0 In-Reply-To: <57110C70.9090007@codeaurora.org> References: <1460570393-19838-1-git-send-email-timur@codeaurora.org> <570EC541.6080603@gmail.com> <570FFB6B.5060305@codeaurora.org> <57100962.40404@gmail.com> <571012E6.6050303@codeaurora.org> <57102920.7000104@codeaurora.org> <57110C70.9090007@codeaurora.org> From: Rob Herring Date: Fri, 15 Apr 2016 10:59:07 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] [v4] net: emac: emac gigabit ethernet controller driver To: Timur Tabi Cc: Vikram Sethi , Florian Fainelli , netdev , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , linux-arm-msm , Sagar Dharia , Shanker Donthineni , Greg Kroah-Hartman , Christopher Covington , Gilad Avidov , Andrew Lunn , Bjorn Andersson , Mark Langsdorf , Jon Masters , Andy Gross , "David S. Miller" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 986 Lines: 31 On Fri, Apr 15, 2016 at 10:44 AM, Timur Tabi wrote: > Rob Herring wrote: >>> >>> > >>> > dma-mask = <0 0xffffffff>; >>> > >>> >or >>> > >>> > dma-mask = <0xffffffff 0xffffffff>; >> >> No. See dma-ranges. > > > How exactly should I use dma-ranges? I can't find any other drivers that > queries that property and uses the result to call dma_set_mask. I thought > the dma-ranges property is intended to specify address translation. I don't > need to translate any address, I just need to know a single number. You may only care about the size, but the binding has to handle the more complex case. Here's an example <0x0 0x2 0x0 0x1 0x0> dma address 0 (cell 0) maps to cpu (parent) address 0x2_00000000 (cell 1-2) and the range/size is 4G (cell 3-4). If you have the same base address, then use the same address. The core will calculate the mask based on the size. IIRC, we also handle ~0 as a special case to support 4G for #size-cell=1. Rob