Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751887AbbHRHTJ (ORCPT ); Tue, 18 Aug 2015 03:19:09 -0400 Received: from mail-bn1on0077.outbound.protection.outlook.com ([157.56.110.77]:41952 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750867AbbHRHTE convert rfc822-to-8bit (ORCPT ); Tue, 18 Aug 2015 03:19:04 -0400 X-Greylist: delayed 1983 seconds by postgrey-1.27 at vger.kernel.org; Tue, 18 Aug 2015 03:19:03 EDT Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; lists.infradead.org; dkim=none (message not signed) header.d=none; From: Anurag Kumar Vulisha To: Anurag Kumar Vulisha , "dan.j.williams@intel.com" , "vinod.koul@intel.com" , Michal Simek , Soren Brinkmann , "srikanth.thokala@xilinx.com" , "maxime.ripard@free-electrons.com" , "laurent.pinchart@ideasonboard.com" , Appana Durga Kedareswara Rao CC: "dmaengine@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Srikanth Vemula , Anirudha Sarangi Subject: RE: [PATCH] dmaengine: vdma: Add 64 bit addressing support to the driver Thread-Topic: [PATCH] dmaengine: vdma: Add 64 bit addressing support to the driver Thread-Index: AQHQz3SXQrB7LtrlOkerbFxW68pzd54RY95A Date: Tue, 18 Aug 2015 06:45:53 +0000 Message-ID: <3802E9A6666DF54886E2B9CBF743BA9801BF7EF1@XAP-PVEXMBX01.xlnx.xilinx.com> References: <1438775257-3511-1-git-send-email-anuragku@xilinx.com> In-Reply-To: <1438775257-3511-1-git-send-email-anuragku@xilinx.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.94.178] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21750.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD014;1:PhJPd+SScxuQooqIT2Imd3oFgb2nlAxdUBvn0A0IAO2Gu8T78eDa2kvYIkAKY4YxEagV+kDtSyeBe28XvaPZ8vLXR2vpTnJUu2JchXqqIbtnW5w7ly+KXy9f0RhjX321jLYiW4Sp0BLwxphr68USZQv2Ei4u/mqnGeTD89EPZXs7pO3PzrwSL7qOFDUVOg821lrWtTXoiUizQtGiAALmgW86imvHXz9yrkLUVxG7fkwUbhi4+wIJzUczRDvDBCj+mpgRfGwelWvAoURcv+mKqDHqXNjATfTJNf9XGfnY+ziJPJS4Lu50DOSGHOtMNdGJbxJpsPzuVRNbAzZrvL6gvI9pLZgWUKpo+W/zNGqCLrxWQ3f860xMBLoqLabuGstJ42wkH8Han68+PDuTgjFtsQ== X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(3050300001)(13464003)(189002)(199003)(377454003)(46102003)(87936001)(36386004)(5001860100001)(107886002)(19580395003)(54356999)(5001830100001)(76176999)(64706001)(47776003)(97756001)(55846006)(2201001)(2656002)(2950100001)(106466001)(575784001)(102836002)(5250100002)(86362001)(92566002)(4001450100002)(50986999)(2501003)(2920100001)(19580405001)(6806004)(5003600100002)(77156002)(5001770100001)(63266004)(5001960100002)(4001540100001)(50466002)(189998001)(23726002)(46406003)(33656002)(81156007)(2900100001)(106116001)(62966003)(107986001)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1AFFO11HUB022;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11HUB022;2:WkvhjcjBmMoW7LkayZTXwXUebn0+44m1ae3N3FrKi4CGvr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CbwBMnB7Y4j8pE4J4yQqnoPh/zY7OnV9zWUB+ZWkQYjF4A9XOqQhVV93go7ypFeuBMfc7LqvIarbsieWUhPFXe+yOzocEFFJ2WMTiRhZQcmxj3wzA+y5zj9d/RX1WigvzsNUOlJLk4ypmCF;4:sGTfRjdSL80h8neCrKB++7hSn56f9sB4niaxThweUfjPFOpYE6hkXBt9j2VjHlelrLDR2+42/0lLl3OxMAnAlwD/U/EAba+xhJ8g5Ql/bMq1VUQYFv/qzVIDPfTJOUJpQo0M2lTBEZa8dI1ol9LCev0MarB1lLGvP3A29htwwnyHUxApCZ2FbFEsOxz/xleQNMmwiUKEPFlYybHWIuBo8mS/BfTJvoo4Tl3hJ7NR/KNfVX2z3fCmxUNeUgezm0xTJGAzhaPfGwzPN/DQw5BYZ1UNJn3NpzjUCAyKxqg0KKaPfpic/V1Cc0FFcujZUBd7frw0BsZwr9yZEVMMyaMt4OpNu7CCCHaRRaIYfF9Z8bI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(8121501027)(5005006)(3002001);SRVR:BN1AFFO11HUB022;BCL:0;PCL:0;RULEID:;SRVR:BN1AFFO11HUB022; X-Forefront-PRVS: 067270ECAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1AFFO11HUB022;23:p+Tm3BKrZoCs+HmtXIip58zlt8opjH5Ue+5/DII?= =?us-ascii?Q?KOVInMeV0eRHJydkLI3gUFziMKPTdwFwZ96gJ0d3IbGcv2Px7vYi/dV44XDP?= =?us-ascii?Q?vzjizq05V15cNEahtVtgdUvUnX5h/o2UkjWWDBz1HoiEL7bIkcoUnOaq26md?= =?us-ascii?Q?X7t35WN/A/U+9aRwsEKs37bx/HB9yZSlqb80j9KYxbOAxpptylA8dSqGsUCE?= =?us-ascii?Q?kAsK95jlX8+XjFzxQYYYjwcdJdjpIcfgGE6ss67VvjZKlCSgZ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8HPbX1p/u3QuzW8Zs+xckaweQ93tFl/KuDabnNR?= =?us-ascii?Q?bdt1osMyUy7yKxDK2adwsTDycBGwu9QAN7P1Fv0D4JejXNex1wikjUtdnLgv?= =?us-ascii?Q?uH4uoSLLBC1nmvq4LHH8gNysGBPOolZ1+YvyWbNo9/6KSR1h/C0VTSHQQtdc?= =?us-ascii?Q?zKwNfRhVEJemaCzP3TEkmBE6Ihfkcz6MRA1bRaGe7aDqA6BxKp4KZt6mdrLU?= =?us-ascii?Q?lhMueKRDkISov2cIQ70She7/6C+eV4PgAfijwIE6NXq6CuroE?= X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11HUB022;5:NM/u6bebHiLBNkIe3RC4oiwXlqwitg0BbriwfEcvyTwqEpg9qj/k23aucO0eJzxmFKDBxc2juk+vXnI9mXsqLwV8ZiQHBoX7aR1qOUxZdDpheDLTzb5KiTA6WPzZSvQe4CNVTMCZSCJU4M0vYCp2aQ==;24:pRUI2Qi5ajC4yZoE9tv77D6HQL6vXpXV0x2SbjrdD2cVK6KPgGIFznMBv2KCQA/LZeWD7zqTtC1pECKTyBd8vPyJ1ZokUbum/DHphEEROgc= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Aug 2015 06:45:58.4231 (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: BN1AFFO11HUB022 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3999 Lines: 122 Ping? > -----Original Message----- > From: Anurag Kumar Vulisha [mailto:anurag.kumar.vulisha@xilinx.com] > Sent: Wednesday, August 05, 2015 5:18 PM > To: dan.j.williams@intel.com; vinod.koul@intel.com; Michal Simek; Soren > Brinkmann; srikanth.thokala@xilinx.com; maxime.ripard@free- > electrons.com; laurent.pinchart@ideasonboard.com; Appana Durga > Kedareswara Rao > Cc: dmaengine@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm- > kernel@lists.infradead.org; Anurag Kumar Vulisha > Subject: [PATCH] dmaengine: vdma: Add 64 bit addressing support to the > driver > > This patch adds the 64 bit addressing support to the vdma driver. > > Signed-off-by: Anurag Kumar Vulisha > --- > drivers/dma/Kconfig | 2 +- > drivers/dma/xilinx/xilinx_vdma.c | 36 > ++++++++++++++++++++++++++++++------ > 2 files changed, 31 insertions(+), 7 deletions(-) > > diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index > bda2cb0..a7cd0a8 100644 > --- a/drivers/dma/Kconfig > +++ b/drivers/dma/Kconfig > @@ -398,7 +398,7 @@ config FSL_EDMA > > config XILINX_VDMA > tristate "Xilinx AXI VDMA Engine" > - depends on (ARCH_ZYNQ || MICROBLAZE) > + depends on (ARCH_ZYNQ || MICROBLAZE || ARM64) > select DMA_ENGINE > help > Enable support for Xilinx AXI VDMA Soft IP. > diff --git a/drivers/dma/xilinx/xilinx_vdma.c > b/drivers/dma/xilinx/xilinx_vdma.c > index d8434d4..3dcbd29 100644 > --- a/drivers/dma/xilinx/xilinx_vdma.c > +++ b/drivers/dma/xilinx/xilinx_vdma.c > @@ -98,7 +98,11 @@ > #define XILINX_VDMA_FRMDLY_STRIDE_FRMDLY_SHIFT 24 > #define XILINX_VDMA_FRMDLY_STRIDE_STRIDE_SHIFT 0 > > +#if defined(CONFIG_PHYS_ADDR_T_64BIT) > +#define XILINX_VDMA_REG_START_ADDRESS(n) (0x000c + 8 * (n)) > +#else > #define XILINX_VDMA_REG_START_ADDRESS(n) (0x000c + 4 * (n)) > +#endif > > /* HW specific definitions */ > #define XILINX_VDMA_MAX_CHANS_PER_DEVICE 0x2 > @@ -143,16 +147,16 @@ > * @next_desc: Next Descriptor Pointer @0x00 > * @pad1: Reserved @0x04 > * @buf_addr: Buffer address @0x08 > - * @pad2: Reserved @0x0C > - * @vsize: Vertical Size @0x10 > - * @hsize: Horizontal Size @0x14 > + * @pad2: Reserved @0x10 > + * @vsize: Vertical Size @0x14 > + * @hsize: Horizontal Size @0x18 > * @stride: Number of bytes between the first > - * pixels of each horizontal line @0x18 > + * pixels of each horizontal line @0x1C > */ > struct xilinx_vdma_desc_hw { > u32 next_desc; > u32 pad1; > - u32 buf_addr; > + u64 buf_addr; > u32 pad2; > u32 vsize; > u32 hsize; > @@ -272,6 +276,20 @@ static inline void vdma_desc_write(struct > xilinx_vdma_chan *chan, u32 reg, > vdma_write(chan, chan->desc_offset + reg, value); } > > +#if defined(CONFIG_PHYS_ADDR_T_64BIT) > +static inline void vdma_desc_write_64(struct xilinx_vdma_chan *chan, u32 > reg, > + u64 value) > +{ > + /* Write the lsb 32 bits*/ > + writel(lower_32_bits(value), > + chan->xdev->regs + chan->desc_offset + reg); > + > + /* Write the msb 32 bits */ > + writel(upper_32_bits(value), > + chan->xdev->regs + chan->desc_offset + reg + 4); } > #endif > + > static inline u32 vdma_ctrl_read(struct xilinx_vdma_chan *chan, u32 reg) { > return vdma_read(chan, chan->ctrl_offset + reg); @@ -700,9 +718,15 > @@ static void xilinx_vdma_start_transfer(struct xilinx_vdma_chan *chan) > int i = 0; > > list_for_each_entry(segment, &desc->segments, node) { > - vdma_desc_write(chan, > +#if defined(CONFIG_PHYS_ADDR_T_64BIT) > + vdma_desc_write_64(chan, > > XILINX_VDMA_REG_START_ADDRESS(i++), > segment->hw.buf_addr); > +#else > + vdma_desc_write(chan, > + > XILINX_VDMA_REG_START_ADDRESS(i++), > + (u32)segment->hw.buf_addr); > +#endif > last = segment; > } > > -- > 1.7.4 -- 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/