From patchwork Mon Sep 1 18:08:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 36395 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0B8A120C7F for ; Mon, 1 Sep 2014 18:09:56 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf33663340oag.8 for ; Mon, 01 Sep 2014 11:09:55 -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=PExl+uIBjdu/clHFtNAvLZ+0qxGBTRwqff/3d8Ylv2c=; b=NubC9Be/NYgB+zCaonc1fymzf8b2Qo7kTpIjl7858aSNbDfi8JiLT1D3UeGffJRSKo TMdfnmRdfX8AlssJlryxnTszJ05UZ7VIYCtNHzNyME2oIHMv2Ubqq+veOdoeVOIpq/yk uhhBs5iwXZk4V4aMtduS4xEGwGY8ijIN/I3CXJlsELzt5pDBYhheSK8ljW4IrwSWW0Mz 2jaw+zSc0B0TrMr+vRlDPHRaSjgVTOb4O13HjkCm+pIm7wMdz3TuGp0pj0vlv6XV66pB 2ryXyQBqhswBn48EyRvxGd3+h4ajIXhUqcD3X7laLnfaRyu9UzOM4PO54WQCat/SUKad 1hNQ== X-Gm-Message-State: ALoCoQnSydHQxKQyolrQyB94Pefzn2ANugHO/Zy4OepgtHWoE7wAJlp812xALI1OK84SZswNtMlr X-Received: by 10.182.129.37 with SMTP id nt5mr16215522obb.8.1409594995667; Mon, 01 Sep 2014 11:09:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.210 with SMTP id u76ls2091384qge.62.gmail; Mon, 01 Sep 2014 11:09:55 -0700 (PDT) X-Received: by 10.220.192.196 with SMTP id dr4mr1511257vcb.70.1409594995578; Mon, 01 Sep 2014 11:09:55 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id f2si1103712vcy.28.2014.09.01.11.09.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Sep 2014 11:09:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id lf12so5829925vcb.34 for ; Mon, 01 Sep 2014 11:09:55 -0700 (PDT) X-Received: by 10.52.156.100 with SMTP id wd4mr1605608vdb.39.1409594995485; Mon, 01 Sep 2014 11:09:55 -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 uj3csp421305vcb; Mon, 1 Sep 2014 11:09:55 -0700 (PDT) X-Received: by 10.66.165.34 with SMTP id yv2mr41159464pab.27.1409594994603; Mon, 01 Sep 2014 11:09:54 -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.54 for ; Mon, 01 Sep 2014 11:09:54 -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 S1754603AbaIASJw (ORCPT + 5 others); Mon, 1 Sep 2014 14:09:52 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:44813 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754277AbaIASJu (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 s81I9RxC007316; Mon, 1 Sep 2014 13:09:28 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s81I9RVk007977; Mon, 1 Sep 2014 13:09:27 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Mon, 1 Sep 2014 13:09:27 -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 s81I9Jl2012145; Mon, 1 Sep 2014 13:09:26 -0500 From: Tero Kristo To: , , CC: Subject: [PATCH 03/26] ARM: OMAP2/3: hwmod: merge wait_target_ready functions for omap2/3 Date: Mon, 1 Sep 2014 21:08:52 +0300 Message-ID: <1409594955-1476-4-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.175 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: , The implementation on these is identical, so no need to have them separate. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/omap_hwmod.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 6c074f3..1bb6d07 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -2923,7 +2923,7 @@ static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois) /* Static functions intended only for use in soc_ops field function pointers */ /** - * _omap2xxx_wait_target_ready - wait for a module to leave slave idle + * _omap2xxx_3xxx_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 @@ -2931,7 +2931,7 @@ static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois) * slave idle; otherwise, pass along the return value of the * appropriate *_cm*_wait_module_ready() function. */ -static int _omap2xxx_wait_target_ready(struct omap_hwmod *oh) +static int _omap2xxx_3xxx_wait_target_ready(struct omap_hwmod *oh) { if (!oh) return -EINVAL; @@ -2950,33 +2950,6 @@ static int _omap2xxx_wait_target_ready(struct omap_hwmod *oh) } /** - * _omap3xxx_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 _omap3xxx_wait_target_ready(struct omap_hwmod *oh) -{ - if (!oh) - return -EINVAL; - - if (oh->flags & HWMOD_NO_IDLEST) - return 0; - - if (!_find_mpu_rt_port(oh)) - return 0; - - /* XXX check module SIDLEMODE, hardreset status, enabled clocks */ - - return omap3xxx_cm_wait_module_ready(oh->prcm.omap2.module_offs, - oh->prcm.omap2.idlest_reg_id, - oh->prcm.omap2.idlest_idle_bit); -} - -/** * _omap4_wait_target_ready - wait for a module to leave slave idle * @oh: struct omap_hwmod * * @@ -4227,12 +4200,12 @@ int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx) void __init omap_hwmod_init(void) { if (cpu_is_omap24xx()) { - soc_ops.wait_target_ready = _omap2xxx_wait_target_ready; + soc_ops.wait_target_ready = _omap2xxx_3xxx_wait_target_ready; soc_ops.assert_hardreset = _omap2_assert_hardreset; soc_ops.deassert_hardreset = _omap2_deassert_hardreset; soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted; } else if (cpu_is_omap34xx()) { - soc_ops.wait_target_ready = _omap3xxx_wait_target_ready; + soc_ops.wait_target_ready = _omap2xxx_3xxx_wait_target_ready; soc_ops.assert_hardreset = _omap2_assert_hardreset; soc_ops.deassert_hardreset = _omap2_deassert_hardreset; soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted;