From patchwork Mon Sep 1 18:09:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 36404 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6C93C2032B for ; Mon, 1 Sep 2014 18:10:10 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id va2sf33440549obc.11 for ; Mon, 01 Sep 2014 11:10:10 -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=7Ab5nXYSAaGxVS39nnrv0bXzWajGMzrIL8vuWEOXGt4=; b=fULInZ0HGsHz/9NBadvSa5gP5wnk3wx8hJzmdpt3fL7mQr95fwa6bdwBvqvVdCmTsP qsr+FwU/e4rVh2c2JweqrnLEcP1kOl3cuT3d6iB+jdTtpvqK0HG6stXsb93w0XKRlBnc nwrNYm05LpK4ROcXQSLUnQBf2LLjiybYc31UZjAuCxlQ8QMvBl3sruUjdpJhFov8mNEd 7xNVUOXxNMgDV08oYzniEu4FrNXkVoBbrPuKdOQ+ukaMPpOMoqYKOSWkSkzZwFfCq6c1 i30/fwxXF/vC5qvZRfDk+ePxtKEWINeTHr1pY/QRa/m2NxjUQ6ZJvOQHkgjJmp7XZ/v6 rO2Q== X-Gm-Message-State: ALoCoQlpqhxG610LHldMK8fi50zFI/ENDp4g7gluGkmEioSTWiq5Lnd5Vh8+BwGKX3UxCroF4Ud7 X-Received: by 10.182.241.1 with SMTP id we1mr15551198obc.37.1409595010069; Mon, 01 Sep 2014 11:10:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.228 with SMTP id h91ls2203010qgd.77.gmail; Mon, 01 Sep 2014 11:10:10 -0700 (PDT) X-Received: by 10.52.4.69 with SMTP id i5mr20980066vdi.35.1409595009975; Mon, 01 Sep 2014 11:10:09 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id l20si1079864vdf.100.2014.09.01.11.10.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Sep 2014 11:10:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id hy4so5901079vcb.33 for ; Mon, 01 Sep 2014 11:10:09 -0700 (PDT) X-Received: by 10.220.167.9 with SMTP id o9mr26715284vcy.8.1409595009895; Mon, 01 Sep 2014 11:10:09 -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 uj3csp421336vcb; Mon, 1 Sep 2014 11:10:09 -0700 (PDT) X-Received: by 10.66.243.208 with SMTP id xa16mr40115427pac.41.1409595009088; Mon, 01 Sep 2014 11:10:09 -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.10.08 for ; Mon, 01 Sep 2014 11:10:09 -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 S1754661AbaIASKD (ORCPT + 5 others); Mon, 1 Sep 2014 14:10:03 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:44821 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754627AbaIASKA (ORCPT ); Mon, 1 Sep 2014 14:10:00 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s81I9fu8007333; Mon, 1 Sep 2014 13:09:41 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s81I9fa1009851; Mon, 1 Sep 2014 13:09:41 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Mon, 1 Sep 2014 13:09:41 -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 s81I9JlA012145; Mon, 1 Sep 2014 13:09:40 -0500 From: Tero Kristo To: , , CC: Subject: [PATCH 11/26] ARM: AM33xx: hwmod: remove am33xx specific module SoC opts Date: Mon, 1 Sep 2014 21:09:00 +0300 Message-ID: <1409594955-1476-12-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.174 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: , These are now identical with the OMAP4 implementations, so use the OMAP4 versions and remove the AM33xx ones. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/omap_hwmod.c | 104 ++------------------------------------ 1 file changed, 3 insertions(+), 101 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index a47cd17..0267af5 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -984,25 +984,6 @@ static void _omap4_enable_module(struct omap_hwmod *oh) } /** - * _am33xx_enable_module - enable CLKCTRL modulemode on AM33XX - * @oh: struct omap_hwmod * - * - * Enables the PRCM module mode related to the hwmod @oh. - * No return value. - */ -static void _am33xx_enable_module(struct omap_hwmod *oh) -{ - if (!oh->clkdm || !oh->prcm.omap4.modulemode) - return; - - pr_debug("omap_hwmod: %s: %s: %d\n", - oh->name, __func__, oh->prcm.omap4.modulemode); - - cm_module_enable(oh->prcm.omap4.modulemode, 0, oh->clkdm->cm_inst, - oh->prcm.omap4.clkctrl_offs); -} - -/** * _omap4_wait_target_disable - wait for a module to be disabled on OMAP4 * @oh: struct omap_hwmod * * @@ -1028,30 +1009,6 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh) } /** - * _am33xx_wait_target_disable - wait for a module to be disabled on AM33XX - * @oh: struct omap_hwmod * - * - * Wait for a module @oh to enter slave idle. Returns 0 if the module - * does not have an IDLEST bit or if the module successfully enters - * slave idle; otherwise, pass along the return value of the - * appropriate *_cm*_wait_module_idle() function. - */ -static int _am33xx_wait_target_disable(struct omap_hwmod *oh) -{ - if (!oh) - return -EINVAL; - - if (oh->_int_flags & _HWMOD_NO_MPU_PORT) - return 0; - - if (oh->flags & HWMOD_NO_IDLEST) - return 0; - - return cm_wait_module_idle(0, oh->clkdm->cm_inst, - oh->prcm.omap4.clkctrl_offs, 0); -} - -/** * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh * @oh: struct omap_hwmod *oh * @@ -1865,35 +1822,6 @@ static int _omap4_disable_module(struct omap_hwmod *oh) } /** - * _am33xx_disable_module - enable CLKCTRL modulemode on AM33XX - * @oh: struct omap_hwmod * - * - * Disable the PRCM module mode related to the hwmod @oh. - * Return EINVAL if the modulemode is not supported and 0 in case of success. - */ -static int _am33xx_disable_module(struct omap_hwmod *oh) -{ - int v; - - if (!oh->clkdm || !oh->prcm.omap4.modulemode) - return -EINVAL; - - pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); - - if (_are_any_hardreset_lines_asserted(oh)) - return 0; - - cm_module_disable(0, oh->clkdm->cm_inst, oh->prcm.omap4.clkctrl_offs); - - v = _am33xx_wait_target_disable(oh); - if (v) - pr_warn("omap_hwmod: %s: _wait_target_disable failed\n", - oh->name); - - return 0; -} - -/** * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit * @oh: struct omap_hwmod * * @@ -2968,32 +2896,6 @@ static int _omap4_wait_target_ready(struct omap_hwmod *oh) } /** - * _am33xx_wait_target_ready - wait for a module to leave slave idle - * @oh: struct omap_hwmod * - * - * Wait for a module @oh to leave slave idle. Returns 0 if the module - * does not have an IDLEST bit or if the module successfully leaves - * slave idle; otherwise, pass along the return value of the - * appropriate *_cm*_wait_module_ready() function. - */ -static int _am33xx_wait_target_ready(struct omap_hwmod *oh) -{ - if (!oh || !oh->clkdm) - return -EINVAL; - - if (oh->flags & HWMOD_NO_IDLEST) - return 0; - - if (!_find_mpu_rt_port(oh)) - return 0; - - /* XXX check module SIDLEMODE, hardreset status */ - - return cm_wait_module_ready(0, oh->clkdm->cm_inst, - oh->prcm.omap4.clkctrl_offs, 0); -} - -/** * _omap2_assert_hardreset - call OMAP2 PRM hardreset fn with hwmod args * @oh: struct omap_hwmod * to assert hardreset * @ohri: hardreset line data @@ -4218,9 +4120,9 @@ void __init omap_hwmod_init(void) soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted; soc_ops.init_clkdm = _init_clkdm; } else if (soc_is_am33xx()) { - soc_ops.enable_module = _am33xx_enable_module; - soc_ops.disable_module = _am33xx_disable_module; - soc_ops.wait_target_ready = _am33xx_wait_target_ready; + soc_ops.enable_module = _omap4_enable_module; + soc_ops.disable_module = _omap4_disable_module; + soc_ops.wait_target_ready = _omap4_wait_target_ready; soc_ops.assert_hardreset = _am33xx_assert_hardreset; soc_ops.deassert_hardreset = _am33xx_deassert_hardreset; soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted;