From patchwork Wed May 31 15:00:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 9757441 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 B633C60390 for ; Wed, 31 May 2017 15:02:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7AB8284A4 for ; Wed, 31 May 2017 15:02:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A845284C0; Wed, 31 May 2017 15:02:17 +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 53D04284A4 for ; Wed, 31 May 2017 15:02:17 +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=zr1cHJ73Yqz3Icl+7mrELGHWhHBKv5AvYvPDl3YADHU=; b=sjZW7chVnOf4vG JTRuZxPxHFQVd0hRspsv5iUYUlphl2kj76em1bGXo7ymrE4tT4jMq8PhpI0qWrqhoVOYdrzrtybO5 5FxtFFpqYd2jwzvE8B9ANZbWFZydLul5RXNl4mruBt4+RxyRHuhmPucxxMS6xU7wYsy0RjHMU4MT6 hS23beO9QOZdOhtP7C9ikb1lypoliTUN8UQuMMZHZ9Zx74G1FVbE2otvyq/Ime6W3YVXFvw/rIh09 8kTZdM7OUVZ664bYIZ+O02pBtxf4SFawBAOBDYhbm2k7ZXQjo8h/iobt8F/2CfjETevOWnbGP/FXG yePGcxz7PU0gFAAlV9PA==; 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 1dG58Z-00027U-CX; Wed, 31 May 2017 15:02:15 +0000 Received: from fllnx209.ext.ti.com ([198.47.19.16]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dG57Y-0000lG-4U for linux-arm-kernel@lists.infradead.org; Wed, 31 May 2017 15:01:16 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v4VF0SOs022610; Wed, 31 May 2017 10:00:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1496242828; bh=RqMIEIMbj3FNc1z4s5snUva83XskVaS+rzgUsrLT594=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Mxy7ThVMgU+qdc2QFsSaMazCFjylJqhX/JesXGyUAFkbUKzNZl9zMPw/C2cspFjtx u3TfCTSmaghNC0VxH1lQb75bXcxHZe3pje/B5wcVKCXerY/jsDo0zIO8JEPb5ycSGF IUF2pagiT/nNWSz3J1L5LvDXCVMYST4ChsIIOESI= 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 v4VF0NSQ024930; Wed, 31 May 2017 10:00:23 -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; Wed, 31 May 2017 10:00:23 -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 v4VF0F9T007908; Wed, 31 May 2017 10:00:22 -0500 From: Tero Kristo To: , Subject: [PATCHv4 4/6] ARM: omap2+: clockdomain: add clkdm_xlate_address Date: Wed, 31 May 2017 18:00:01 +0300 Message-ID: <1496242803-6101-5-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496242803-6101-1-git-send-email-t-kristo@ti.com> References: <1496242803-6101-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-20170531_080112_613259_ABD8DA31 X-CRM114-Status: UNSURE ( 8.87 ) 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 new function can be used to get the physical address of a clockdomain. Required for mapping the clkctrl clocks under hwmod without modification to DT data. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/clockdomain.c | 8 ++++++++ arch/arm/mach-omap2/clockdomain.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index b79b1ca..5189264 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -1224,6 +1224,14 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) return 0; } +u32 clkdm_xlate_address(struct clockdomain *clkdm) +{ + if (arch_clkdm->clkdm_xlate_address) + return arch_clkdm->clkdm_xlate_address(clkdm); + + return 0; +} + /** * clkdm_hwmod_enable - add an enabled downstream hwmod to this clkdm * @clkdm: struct clockdomain * diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 24667a5..827f01e 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h @@ -175,6 +175,7 @@ struct clkdm_ops { void (*clkdm_deny_idle)(struct clockdomain *clkdm); int (*clkdm_clk_enable)(struct clockdomain *clkdm); int (*clkdm_clk_disable)(struct clockdomain *clkdm); + u32 (*clkdm_xlate_address)(struct clockdomain *clkdm); }; int clkdm_register_platform_funcs(struct clkdm_ops *co); @@ -213,6 +214,7 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh); int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh); +u32 clkdm_xlate_address(struct clockdomain *clkdm); extern void __init omap242x_clockdomains_init(void); extern void __init omap243x_clockdomains_init(void);