From patchwork Mon Sep 1 18:08:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 36397 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9CE4B2032B for ; Mon, 1 Sep 2014 18:09:58 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id c9sf19439280qcz.4 for ; Mon, 01 Sep 2014 11:09:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=CYkfA5HYydRfjjlhZTSICCB06ERVOXo9XCsXk235jLA=; b=GSgZGe4xBurKDCNdj9LUgQ6QO0LHiiqJbO/WVVhYbdP2K/KqAx6tneGYtQBFurswAx UGkEPxqjyI5ZbcFyvEm1mxHMb/EI2isKIPn8EL66uCbpuxVIKVsIvzzn5CSfQWRcuU5f C74GInVFkpQt6TyP+/mYdmIUmQth4ppdHHrRx1gOWfDg3XazbsUjSR4z9pzIw0j8Dd8Y EayyRLhTuIUi5zmN5PbfGpR2NRA/X551whV1kQKVzMjw9Op59U+Sw0V6y+SppKyfWK0a x1olbjJ+miEQIE/KfGn9rWcIICOn/nw2ZqBBkgVp4Ee/GKgNHAoc4pVYH/5Ni+AnKwFh k3XA== X-Gm-Message-State: ALoCoQklyZBtbb3m9U39cXcMDOw0/RN3yMIK3zBa9psrDCy38ILs08BzznjJmLfRIKTsHnKQjdYi X-Received: by 10.52.1.233 with SMTP id 9mr16475650vdp.5.1409594998449; Mon, 01 Sep 2014 11:09:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.245 with SMTP id d108ls1303623qgd.68.gmail; Mon, 01 Sep 2014 11:09:58 -0700 (PDT) X-Received: by 10.52.147.15 with SMTP id tg15mr1412848vdb.53.1409594998334; Mon, 01 Sep 2014 11:09:58 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id x11si1094343vdg.56.2014.09.01.11.09.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Sep 2014 11:09:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id la4so5858321vcb.37 for ; Mon, 01 Sep 2014 11:09:58 -0700 (PDT) X-Received: by 10.52.227.72 with SMTP id ry8mr1368980vdc.64.1409594998198; Mon, 01 Sep 2014 11:09:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp421312vcb; Mon, 1 Sep 2014 11:09:57 -0700 (PDT) X-Received: by 10.68.125.202 with SMTP id ms10mr41553751pbb.71.1409594997351; Mon, 01 Sep 2014 11:09:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tf5si2430384pab.88.2014.09.01.11.09.56 for ; Mon, 01 Sep 2014 11:09:57 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754616AbaIASJz (ORCPT + 5 others); Mon, 1 Sep 2014 14:09:55 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:44815 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754535AbaIASJu (ORCPT ); Mon, 1 Sep 2014 14:09:50 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s81I9VOA007320; Mon, 1 Sep 2014 13:09:31 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s81I9Vm4007996; Mon, 1 Sep 2014 13:09:31 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Mon, 1 Sep 2014 13:09:31 -0500 Received: from sokoban.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s81I9Jl4012145; Mon, 1 Sep 2014 13:09:29 -0500 From: Tero Kristo To: , , CC: Subject: [PATCH 05/26] ARM: OMAP4/AM33xx: add cm_init / cm_exit calls for AM33xx and OMAP4+ Date: Mon, 1 Sep 2014 21:08:54 +0300 Message-ID: <1409594955-1476-6-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1409594955-1476-1-git-send-email-t-kristo@ti.com> References: <1409594955-1476-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: t-kristo@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This is needed for expanding the generic CM driver API to include AM33xx and OMAP4 also. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/cm33xx.c | 13 +++++++++++++ arch/arm/mach-omap2/cm33xx.h | 1 + arch/arm/mach-omap2/cminst44xx.c | 13 +++++++++++++ arch/arm/mach-omap2/cminst44xx.h | 1 + arch/arm/mach-omap2/io.c | 6 ++++++ 5 files changed, 34 insertions(+) diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c index ef9e9018..e02988f 100644 --- a/arch/arm/mach-omap2/cm33xx.c +++ b/arch/arm/mach-omap2/cm33xx.c @@ -358,3 +358,16 @@ struct clkdm_ops am33xx_clkdm_operations = { .clkdm_clk_enable = am33xx_clkdm_clk_enable, .clkdm_clk_disable = am33xx_clkdm_clk_disable, }; + +static struct cm_ll_data am33xx_cm_ll_data; + +int __init am33xx_cm_init(void) +{ + return cm_register(&am33xx_cm_ll_data); +} + +static void __exit am33xx_cm_exit(void) +{ + cm_unregister(&am33xx_cm_ll_data); +} +__exitcall(am33xx_cm_exit); diff --git a/arch/arm/mach-omap2/cm33xx.h b/arch/arm/mach-omap2/cm33xx.h index 1771fc1..1d3cde7 100644 --- a/arch/arm/mach-omap2/cm33xx.h +++ b/arch/arm/mach-omap2/cm33xx.h @@ -379,6 +379,7 @@ void am33xx_cm_clkdm_enable_hwsup(u16 inst, u16 cdoffs); void am33xx_cm_clkdm_disable_hwsup(u16 inst, u16 cdoffs); void am33xx_cm_clkdm_force_sleep(u16 inst, u16 cdoffs); void am33xx_cm_clkdm_force_wakeup(u16 inst, u16 cdoffs); +int am33xx_cm_init(void); #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) int am33xx_cm_wait_module_idle(u16 inst, u16 clkctrl_offs); diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index 7e6970a..695e71e 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c @@ -505,3 +505,16 @@ struct clkdm_ops am43xx_clkdm_operations = { .clkdm_clk_enable = omap4_clkdm_clk_enable, .clkdm_clk_disable = omap4_clkdm_clk_disable, }; + +static struct cm_ll_data omap4xxx_cm_ll_data; + +int __init omap4_cm_init(void) +{ + return cm_register(&omap4xxx_cm_ll_data); +} + +static void __exit omap4_cm_exit(void) +{ + cm_unregister(&omap4xxx_cm_ll_data); +} +__exitcall(omap4_cm_exit); diff --git a/arch/arm/mach-omap2/cminst44xx.h b/arch/arm/mach-omap2/cminst44xx.h index 67a05f9..cc3c913 100644 --- a/arch/arm/mach-omap2/cminst44xx.h +++ b/arch/arm/mach-omap2/cminst44xx.h @@ -38,5 +38,6 @@ extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, u32 mask); extern void omap_cm_base_init(void); +int omap4_cm_init(void); #endif diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 5c2c71a..26055d9 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -45,6 +45,7 @@ #include "sram.h" #include "cm2xxx.h" #include "cm3xxx.h" +#include "cm33xx.h" #include "prm.h" #include "cm.h" #include "prcm_mpu44xx.h" @@ -582,6 +583,7 @@ void __init am33xx_init_early(void) omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL); omap3xxx_check_revision(); am33xx_check_features(); + am33xx_cm_init(); am33xx_powerdomains_init(); am33xx_clockdomains_init(); am33xx_hwmod_init(); @@ -609,6 +611,7 @@ void __init am43xx_init_early(void) omap3xxx_check_revision(); am33xx_check_features(); omap44xx_prm_init(); + omap4_cm_init(); am43xx_powerdomains_init(); am43xx_clockdomains_init(); am43xx_hwmod_init(); @@ -638,6 +641,7 @@ void __init omap4430_init_early(void) omap_cm_base_init(); omap4xxx_check_revision(); omap4xxx_check_features(); + omap4_cm_init(); omap4_pm_init_early(); omap44xx_prm_init(); omap44xx_voltagedomains_init(); @@ -672,6 +676,7 @@ void __init omap5_init_early(void) omap_cm_base_init(); omap44xx_prm_init(); omap5xxx_check_revision(); + omap4_cm_init(); omap54xx_voltagedomains_init(); omap54xx_powerdomains_init(); omap54xx_clockdomains_init(); @@ -700,6 +705,7 @@ void __init dra7xx_init_early(void) omap_cm_base_init(); omap44xx_prm_init(); dra7xxx_check_revision(); + omap4_cm_init(); dra7xx_powerdomains_init(); dra7xx_clockdomains_init(); dra7xx_hwmod_init();