Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754620AbcDVQsz (ORCPT ); Fri, 22 Apr 2016 12:48:55 -0400 Received: from mail-bl2nam02on0086.outbound.protection.outlook.com ([104.47.38.86]:35616 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932259AbcDVQsv (ORCPT ); Fri, 22 Apr 2016 12:48:51 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; From: Appana Durga Kedareswara Rao To: Rob Herring CC: "pawel.moll@arm.com" , "mark.rutland@arm.com" , "ijc+devicetree@hellion.org.uk" , "galak@codeaurora.org" , Michal Simek , Soren Brinkmann , "vinod.koul@intel.com" , "dan.j.williams@intel.com" , "moritz.fischer@ettus.com" , "laurent.pinchart@ideasonboard.com" , "luis@debethencourt.com" , Anirudha Sarangi , Punnaiah Choudary Kalluri , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "dmaengine@vger.kernel.org" Subject: RE: [PATCH v6 1/2] Documentation: DT: dma: Add Xilinx zynqmp dma device tree binding documentation Thread-Topic: [PATCH v6 1/2] Documentation: DT: dma: Add Xilinx zynqmp dma device tree binding documentation Thread-Index: AQHRlvQ80Cr24Duih0qtBb+tdgcoyp+T80IAgAGLKACAADE5gIAAj2ag Date: Fri, 22 Apr 2016 16:48:42 +0000 Message-ID: References: <1460710374-25077-1-git-send-email-appanad@xilinx.com> <20160421134226.GA10399@rob-hp-laptop> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.228.212] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22276.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(377454003)(51914003)(13464003)(24454002)(199003)(189002)(50466002)(63266004)(2906002)(4326007)(23676002)(15975445007)(93886004)(2900100001)(2920100001)(1720100001)(2950100001)(5003600100002)(11100500001)(76176999)(50986999)(5250100002)(586003)(86362001)(54356999)(33656002)(575784001)(92566002)(1096002)(5004730100002)(5008740100001)(19580405001)(19580395003)(106466001)(110136002)(6806005)(87936001)(102836003)(81166005)(47776003)(55846006)(189998001)(106116001)(1220700001)(3846002)(6116002)(107986001)(422495003);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2NAM02HT030;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-MS-Office365-Filtering-Correlation-Id: a1691393-0583-4e05-303f-08d36acdf9b8 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:BL2NAM02HT030; X-Microsoft-Antispam-PRVS: <8b202f8a0f0f464aaec4c1a98f79c240@BL2NAM02HT030.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521056)(601004)(2401047)(13017025)(5005006)(13018025)(13023025)(13024025)(13015025)(8121501046)(10201501046)(3002001);SRVR:BL2NAM02HT030;BCL:0;PCL:0;RULEID:;SRVR:BL2NAM02HT030; X-Forefront-PRVS: 0920602B08 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2016 16:48:47.6684 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT030 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u3MGn4Br018908 Content-Length: 5874 Lines: 134 Hi Rob, > -----Original Message----- > From: dmaengine-owner@vger.kernel.org [mailto:dmaengine- > owner@vger.kernel.org] On Behalf Of Rob Herring > Sent: Friday, April 22, 2016 9:43 PM > To: Appana Durga Kedareswara Rao > Cc: pawel.moll@arm.com; mark.rutland@arm.com; > ijc+devicetree@hellion.org.uk; galak@codeaurora.org; Michal Simek > ; Soren Brinkmann ; > vinod.koul@intel.com; dan.j.williams@intel.com; moritz.fischer@ettus.com; > laurent.pinchart@ideasonboard.com; luis@debethencourt.com; Anirudha > Sarangi ; Punnaiah Choudary Kalluri > ; devicetree@vger.kernel.org; linux-arm- > kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > dmaengine@vger.kernel.org > Subject: Re: [PATCH v6 1/2] Documentation: DT: dma: Add Xilinx zynqmp dma > device tree binding documentation > > On Fri, Apr 22, 2016 at 12:36 AM, Appana Durga Kedareswara Rao > wrote: > > Hi Rob, > > > > Thanks for the review... > > > >> -----Original Message----- > >> From: Rob Herring [mailto:robh@kernel.org] > >> Sent: Thursday, April 21, 2016 7:12 PM > >> To: Appana Durga Kedareswara Rao > >> Cc: pawel.moll@arm.com; mark.rutland@arm.com; > >> ijc+devicetree@hellion.org.uk; galak@codeaurora.org; Michal Simek > >> ; Soren Brinkmann ; > >> vinod.koul@intel.com; dan.j.williams@intel.com; Appana Durga > >> Kedareswara Rao ; moritz.fischer@ettus.com; > >> laurent.pinchart@ideasonboard.com; luis@debethencourt.com; Anirudha > >> Sarangi ; Punnaiah Choudary Kalluri > >> ; devicetree@vger.kernel.org; linux-arm- > >> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > >> dmaengine@vger.kernel.org > >> Subject: Re: [PATCH v6 1/2] Documentation: DT: dma: Add Xilinx zynqmp > >> dma device tree binding documentation > >> > >> On Fri, Apr 15, 2016 at 02:22:53PM +0530, Kedareswara rao Appana wrote: > >> > Device-tree binding documentation for Xilinx zynqmp dma engine used > >> > in Zynq UltraScale+ MPSoC. > >> > > >> > Signed-off-by: Punnaiah Choudary Kalluri > >> > Signed-off-by: Kedareswara rao Appana > >> > --- > >> > Changes in v6: > >> > - Removed desc-axi-cache/dst-axi-cache/src-axi-cache properties > >> > from the binding doc as it allow broken combinations when dma-coherent > >> > is set as suggested by Rob. > >> > - Fixed minor comments given by Rob related coding(lower case DT > >> > node > >> name). > >> > Changes in v5: > >> > - Use dma-coherent flag for coherent transfers as suggested by rob. > >> > - Removed unnecessary properties from binding doc as suggested by Rob. > >> > Changes in v4: > >> > - None > >> > Changes in v3: > >> > - None > >> > Changes in v2: > >> > - None. > >> > > >> > .../devicetree/bindings/dma/xilinx/zynqmp_dma.txt | 44 > >> ++++++++++++++++++++++ > >> > 1 file changed, 44 insertions(+) > >> > create mode 100644 > >> Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt > >> > > >> > diff --git > >> > a/Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt > >> b/Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt > >> > new file mode 100644 > >> > index 0000000..f0f0b54 > >> > --- /dev/null > >> > +++ b/Documentation/devicetree/bindings/dma/xilinx/zynqmp_dma.txt > >> > @@ -0,0 +1,44 @@ > >> > +Xilinx ZynqMP DMA engine, it does support memory to memory > >> > +transfers, memory to device and device to memory transfers. It > >> > +also has flow control and rate control support for slave/peripheral dma > access. > >> > + > >> > +Required properties: > >> > +- compatible : Should be "xlnx,zynqmp-dma-1.0" > >> > +- reg : Memory map for gdma/adma module access. > >> > +- interrupt-parent : Interrupt controller the interrupt is routed through > >> > +- interrupts : Should contain DMA channel interrupt. > >> > +- xlnx,bus-width : Axi buswidth in bits. Should contain 128 or 64 > >> > >> I think how this is getting used by the driver is wrong. > >> {src,dst}_addr_widths are supposed to be a bitmask of supported slave > >> device register widths. You aren't doing a bitmask and you are also > >> saying you only support slaves with 8 or 16 byte data registers which > >> is somewhat rare. It may happen to work because 128/8 == BIT(4). > >> However, the documentation for the field is contradictory in that it > >> says 1,2,4 or 8 byte widths are supported, but the enum has more sizes. > > > > > > The DMA supports an AXI bus width of 128/64 bits only. > > Please refer IP data sheet. > http://www.xilinx.com/support/documentation/user_guides/ug1085-zynq- > ultrascale-trm.pdf Page No: 359(DMA Over fetch section). > > I understand that. That should not really matter if the AXI master properly sets > byte lane strobes other than defining max burst length which you already have > defined elsewhere. > > > That's why during probe we are making the dma_device supported source and > destination address widths accordingly based on the DT property. > > > > Snap shot of driver code from the probe: > > struct dma_device *p; > > p->dst_addr_widths = zdev->chan->bus_width / 8; > > p->src_addr_widths = zdev->chan->bus_width / 8; > > Read what I wrote before and read the documentation for these fields. > They are bitmasks. I misunderstood the question that you asked yesterday. Now I got clarified. Will fix it in the next version of the patch... Thanks for the detailed explanation. Regards, Kedar. > > Rob > -- > To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body > of a message to majordomo@vger.kernel.org More majordomo info at > http://vger.kernel.org/majordomo-info.html