From patchwork Wed Apr 5 17:17:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 9665053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C8EC260364 for ; Wed, 5 Apr 2017 17:18:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B75A827317 for ; Wed, 5 Apr 2017 17:18:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC35E28066; Wed, 5 Apr 2017 17:18:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBCC627317 for ; Wed, 5 Apr 2017 17:18:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933859AbdDERSs (ORCPT ); Wed, 5 Apr 2017 13:18:48 -0400 Received: from mail-wr0-f178.google.com ([209.85.128.178]:33952 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933425AbdDERSn (ORCPT ); Wed, 5 Apr 2017 13:18:43 -0400 Received: by mail-wr0-f178.google.com with SMTP id t20so24701544wra.1 for ; Wed, 05 Apr 2017 10:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=pu7e3jUpPteElqU8wxbhUtSp/1R1pJ7Yk+MO7vUm4mI=; b=OGXP4BEkRSe8F/Y17M8n7iY8awej2If+bh30Mk8LfuiJm5R9iSjxKcfyXf2lhbmJUf El5dAlmAbh7N+wB7r672kGqD06ouHf3DNNZYouYlO6nEwg2qp5IsQfT3pIz7XbN8k5ba rPxg4rhzM9sJj2dJZEynHYbF0MMoVZH3oVee5MW2Xhd9cNQ1hwqzhPeOBTpAuVQ2CMHk JUMp+B5JpOxQXoJb/nW0JcsKhGCKcRjQEOzyOw6vNX8kJzWQ5qUGcUwcrnOWMe9K+D+M URL81CMfr1m0qXmAXcTYMHO9Py2vKb+weUSSFo9bkTHfDc8+sWRbXxytqJJ4qcj+lOE/ GO6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pu7e3jUpPteElqU8wxbhUtSp/1R1pJ7Yk+MO7vUm4mI=; b=V8yvT6DZ8teazLUwKqgMZxgwHZL3pcGbHLy64hGtBzMFvgY2NahE4Y2fqxMZX29ByB 6TO1i8RUHdShlA7JywZ5IFylth2yBRGuy2hZIvMFOQep1x3XRsnbPaVxhz+F//WyHoMd YH8NVO/aoSMwYZz/BjHnGkjFj0/D/e3HHmMFBhgiFnkLb1idPvQxABjKmRkendZzAxsD KXhKItx9tKr6du9fJy2vyTZPS1/Zzbdy7kULYU8PErjtXcwY97JEc7cfJDZZpomnr+81 34AQV/SwuAmm+3Oyawa+tK/QUWGZdYvo9cD/45h2O7zOE7NebBeTIFmjcnvbsFlCqr1q bpww== X-Gm-Message-State: AFeK/H1gc4t4nWxUNWQiPdpxUH6YKK9isLyl51CWTbv389W0EluCFeeERu9avn5pPmu4+yIU X-Received: by 10.223.163.75 with SMTP id d11mr28286078wrb.127.1491412722126; Wed, 05 Apr 2017 10:18:42 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 198sm23154463wmn.30.2017.04.05.10.18.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Apr 2017 10:18:41 -0700 (PDT) From: Alexandre Bailon To: nsekhar@ti.com Cc: khilman@baylibre.com, ptitiano@baylibre.com, tony@atomide.com, linux-omap@vger.kernel.org, b-liu@ti.com, sergei.shtylyov@cogentembedded.com, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, grygorii.strashko@ti.com, Alexandre Bailon Subject: [PATCH v2] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine Date: Wed, 5 Apr 2017 19:17:50 +0200 Message-Id: <20170405171750.16821-1-abailon@baylibre.com> X-Mailer: git-send-email 2.10.2 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The CPPI 4.1 DMA is sharing its clock with the USB OTG, and most of the time, the clock will be enabled by USB. But during the init of the DMA, USB is not enabled (waiting for DMA), and then we must enable the clock before doing anything. Add the clock for the CPPI 4.1 DMA engine. Signed-off-by: Alexandre Bailon --- arch/arm/mach-davinci/da830.c | 6 ++++++ arch/arm/mach-davinci/da850.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 073c458..bd88470 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c @@ -304,6 +304,11 @@ static struct clk usb20_clk = { .gpsc = 1, }; +static struct clk cppi41_clk = { + .name = "cppi41", + .parent = &usb20_clk, +}; + static struct clk aemif_clk = { .name = "aemif", .parent = &pll0_sysclk3, @@ -413,6 +418,7 @@ static struct clk_lookup da830_clks[] = { CLK("davinci-mcasp.1", NULL, &mcasp1_clk), CLK("davinci-mcasp.2", NULL, &mcasp2_clk), CLK("musb-da8xx", "usb20", &usb20_clk), + CLK("cppi41-dmaengine", NULL, &cppi41_clk), CLK(NULL, "aemif", &aemif_clk), CLK(NULL, "aintc", &aintc_clk), CLK(NULL, "secu_mgr", &secu_mgr_clk), diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index ccad2f9..07d6f0e 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -401,6 +401,11 @@ static struct clk usb20_clk = { .gpsc = 1, }; +static struct clk cppi41_clk = { + .name = "cppi41", + .parent = &usb20_clk, +}; + static struct clk spi0_clk = { .name = "spi0", .parent = &pll0_sysclk2, @@ -560,6 +565,7 @@ static struct clk_lookup da850_clks[] = { CLK("davinci-nand.0", "aemif", &aemif_nand_clk), CLK("ohci-da8xx", "usb11", &usb11_clk), CLK("musb-da8xx", "usb20", &usb20_clk), + CLK("cppi41-dmaengine", NULL, &cppi41_clk), CLK("spi_davinci.0", NULL, &spi0_clk), CLK("spi_davinci.1", NULL, &spi1_clk), CLK("vpif", NULL, &vpif_clk),