From patchwork Tue May 30 14:47:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 9754749 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 A72BB602BF for ; Tue, 30 May 2017 14:48:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98A1A274A3 for ; Tue, 30 May 2017 14:48:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C16127569; Tue, 30 May 2017 14:48:40 +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=ham 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 442C5274A3 for ; Tue, 30 May 2017 14:48:40 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=TcyITsb3Nt2K2xwZQPQFS/50/ZtWNFO51GHM46kUznY=; b=hl1YQFNgLbkHKq SJvUrRJyrLj6MUc0Fgvdb7Tv9HdqYgkqxAGMyfeW1d4RWHmgagiAvSMcOCyP5p8ao05kf5fa+ri4c M34bStQdjxTIe9RP60lQGvQq/6/YnnloGB5T2zZjf8LWZ/uA61edUCutI5P4qE/yAn3qhKxPQXm9K DYCxkGBaCSusVRfwXc5GjGjFbmSoZDfkyXMEzGrnoFDRR9mnN2dVVnfIRN4C8vTsf4HcY/sybgYhp qjXLIlqgoMetOTFdOVEP4xD/m+SizVJyVtu8rYkQt0ST8+MfNlQWY28a71imXwYmqw5Not8hCjq/R 7fi2PaAbw2XNP6EQUO3A==; 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 1dFiRr-0003aM-6Z; Tue, 30 May 2017 14:48:39 +0000 Received: from fllnx210.ext.ti.com ([198.47.19.17]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dFiRe-0003MY-6e for linux-arm-kernel@lists.infradead.org; Tue, 30 May 2017 14:48:27 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v4UEm6lM010469; Tue, 30 May 2017 09:48:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1496155686; bh=Z24msBC9GEhV9C8jKqOzuqCR2ADIdrKcQOJc3mPQNLc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kR4PslGxzjIpAKpihtJerEvoqd5xSFHWCCyVoM/8C8lHMLaBweK8bRyZtMFJl+Amu 3yFGxwFzs84w95SDXsn2/RhQTo9lF9HiOXJ8EFchue8/GJwr/FjtOLs7TAi/P4U+IS t2mDHHgLh+cK5QvvanYHfZxgFCI/X69csaMMoXY4= Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4UEm6vM021768; Tue, 30 May 2017 09:48:06 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Tue, 30 May 2017 09:48:05 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4UElwNn021626; Tue, 30 May 2017 09:48:05 -0500 From: Tero Kristo To: , Subject: [PATCHv3b 4/5] ARM: OMAP4: cminst: add support for clkdm_xlate_address Date: Tue, 30 May 2017 17:47:48 +0300 Message-ID: <1496155669-1677-5-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496155669-1677-1-git-send-email-t-kristo@ti.com> References: <1496155669-1677-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170530_074826_344622_5B45E455 X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. 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: linux-arm-kernel@lists.infradead.org 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 This function gets the physical base address of a clockdomain. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/cminst44xx.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index 2ab27ad..3df268e 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c @@ -31,6 +31,7 @@ #include "prm44xx.h" #include "prcm_mpu44xx.h" #include "prcm-common.h" +#include "iomap.h" #define OMAP4430_IDLEST_SHIFT 16 #define OMAP4430_IDLEST_MASK (0x3 << 16) @@ -475,6 +476,14 @@ static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) return 0; } +static u32 omap4_clkdm_xlate_address(struct clockdomain *clkdm) +{ + u32 addr = (u32)_cm_bases[clkdm->prcm_partition] - OMAP2_L4_IO_OFFSET + + clkdm->cm_inst + clkdm->clkdm_offs; + + return addr; +} + struct clkdm_ops omap4_clkdm_operations = { .clkdm_add_wkdep = omap4_clkdm_add_wkup_sleep_dep, .clkdm_del_wkdep = omap4_clkdm_del_wkup_sleep_dep, @@ -490,6 +499,7 @@ struct clkdm_ops omap4_clkdm_operations = { .clkdm_deny_idle = omap4_clkdm_deny_idle, .clkdm_clk_enable = omap4_clkdm_clk_enable, .clkdm_clk_disable = omap4_clkdm_clk_disable, + .clkdm_xlate_address = omap4_clkdm_xlate_address, }; struct clkdm_ops am43xx_clkdm_operations = { @@ -499,6 +509,7 @@ struct clkdm_ops am43xx_clkdm_operations = { .clkdm_deny_idle = omap4_clkdm_deny_idle, .clkdm_clk_enable = omap4_clkdm_clk_enable, .clkdm_clk_disable = omap4_clkdm_clk_disable, + .clkdm_xlate_address = omap4_clkdm_xlate_address, }; static struct cm_ll_data omap4xxx_cm_ll_data = {