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: 9665245 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 F36B460365 for ; Wed, 5 Apr 2017 17:24:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E49E2204C1 for ; Wed, 5 Apr 2017 17:24:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D91DC285A1; Wed, 5 Apr 2017 17:24:43 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E5682848E for ; Wed, 5 Apr 2017 17:24:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=n4UrNHOOxpzc0Ps2G96o1KLtWaJipgQzfhTp1sJgdqo=; b=aQs 48Z7LC0IcgFNSbuMF4JT5oIwrsnT98dKbxbzWv9vyyVZ2bgopQs6Z8k+xdXQA+8cvPThKsyNj4vAT rNMqDXbHwOTMX+lz+npc7p5FDLPuD7tea5KeZZ7PEs4KO3B8hGF4fVAmeN1G09VuefsqDQ2T4NOq8 TKxJZMPjXrJ5rdMdPXgz39Q3S/Rg0ToBZ9e0vjwUs73EQdM2/ScJjf3OZOS2xuQln+clVMwgEEprm bK+/AMeHcDIuJz5eor3b1jEAckRzgE0MwITn+UtmxsPx+Nsft/qPLBGOEvULIIMG3dGLCze6yhIYB y4NQWqs+PtbrbdF5zGEzkruXhyyNeGQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cvofh-0005Zv-Ak; Wed, 05 Apr 2017 17:24:41 +0000 Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cvofd-0005Xl-86 for linux-arm-kernel@lists.infradead.org; Wed, 05 Apr 2017 17:24:39 +0000 Received: by mail-wr0-x234.google.com with SMTP id k6so24382695wre.2 for ; Wed, 05 Apr 2017 10:24:15 -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=GNqEK9u+xIZyExVECF55nRj3a5Gk4rX4Erfd1Edyav/ye7JnGboV53/7i+GoLhoVTg Qehc82XjtCYYgiTJ2xy4bOwHASnJ4Zvly6LxRQjuod1l/mQr0Zxn9e6/8BpnH6g58tw8 ae+iN3UY7D2DaJ/VbUTUaCvbly0DlBDashzqQVv2BSrxGZqr1oyT87WBRiopvEm7aRdN BspqV6GvjmDPKPA9xWp8MszXXPdyzhVMU6VRLBCwYR3KVnJdY6NXDGvPy0ZkT7mC8Wr/ ql2dkskCTe2Y/2+ysP1YTwN1vCVtvYcjkOu50JhoOaI8S66FtiWw+6eu5a6Ghf2zPndF duAA== X-Gm-Message-State: AFeK/H1DWmJuHZ7FA3uztYGUj5L0n342igEDe+ZZw11tqYZHIGJdhlk5Ih2EyBX+q9FLfPkQ 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170405_102437_438487_21053EAD X-CRM114-Status: GOOD ( 10.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: grygorii.strashko@ti.com, sergei.shtylyov@cogentembedded.com, tony@atomide.com, khilman@baylibre.com, linux-usb@vger.kernel.org, Alexandre Bailon , ptitiano@baylibre.com, linux-omap@vger.kernel.org, b-liu@ti.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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),