From patchwork Fri Aug 22 14:02:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 35839 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 14EB62057E for ; Fri, 22 Aug 2014 14:03:12 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wn1sf62225281obc.6 for ; Fri, 22 Aug 2014 07:03:11 -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=JKfdPE1Dnsv0f9ED7fmc14FF99tROC35fnkvb/iZKDk=; b=PCnV+uC1P6n+5AciypXJW/IcfoypWIkIvF7wHyfwKFg9GeRNFUNA6AM187teg0n61r cogk2SvwWl2b5Xax3EDtPfCTlQveaLxYDpHgGHpPupgLeoSwWILCtOsYx3wR9h6fZqy2 3WI03Mggfgu4iQ5nyiu9fq1bmiYlsf/RQRgHiABwYtIyQqj6kSYNSFrDCegXKk8GSimL szq8PxI6lxyXY/pdmr0DhvR391qltb/3l4FIYeLGFVZfQgDNOdaLcOo1Y6aZh+8voE1D V1/tj4zfuWVJ1v0zEr91mYYAoYRNu8iqldv0yFaX2HTFitSAWxaQQsqrOnn6GMPau8Eq NdgQ== X-Gm-Message-State: ALoCoQmcPmmmv0jeyqc0CQZ3vujU5jk8R0hZRk44A+hDMfgomuKECc3L9iyG6gtBnftSJIRCB8uY X-Received: by 10.42.10.66 with SMTP id p2mr6867645icp.28.1408716191692; Fri, 22 Aug 2014 07:03:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.80 with SMTP id 74ls1157667qgs.63.gmail; Fri, 22 Aug 2014 07:03:11 -0700 (PDT) X-Received: by 10.52.164.80 with SMTP id yo16mr326660vdb.44.1408716191587; Fri, 22 Aug 2014 07:03:11 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id wc6si13626761vdb.42.2014.08.22.07.03.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Aug 2014 07:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id ij19so12054494vcb.25 for ; Fri, 22 Aug 2014 07:03:11 -0700 (PDT) X-Received: by 10.52.245.101 with SMTP id xn5mr3493724vdc.32.1408716191471; Fri, 22 Aug 2014 07:03:11 -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 uj3csp19444vcb; Fri, 22 Aug 2014 07:03:10 -0700 (PDT) X-Received: by 10.70.88.140 with SMTP id bg12mr6749708pdb.106.1408716190517; Fri, 22 Aug 2014 07:03:10 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ob8si41002755pdb.249.2014.08.22.07.03.09 for ; Fri, 22 Aug 2014 07:03:10 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S932479AbaHVODF (ORCPT + 21 others); Fri, 22 Aug 2014 10:03:05 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:43958 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756522AbaHVOC7 (ORCPT ); Fri, 22 Aug 2014 10:02:59 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s7ME2ZsI012942; Fri, 22 Aug 2014 09:02:35 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7ME2ZIU016843; Fri, 22 Aug 2014 09:02:35 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Fri, 22 Aug 2014 09:02:35 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7ME2ZKX026064; Fri, 22 Aug 2014 09:02:35 -0500 From: Nishanth Menon To: Santosh Shilimkar , Tony Lindgren , Tero Kristo , Paul Walmsley CC: Kevin Hilman , , , , Keerthy , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Nishanth Menon Subject: [PATCH 02/10] ARM: OMAP5 / DRA7: PM: Set MPUSS-EMIF clock-domain static dependency Date: Fri, 22 Aug 2014 09:02:26 -0500 Message-ID: <1408716154-26101-3-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1408716154-26101-1-git-send-email-nm@ti.com> References: <1408716154-26101-1-git-send-email-nm@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nm@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.180 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: , From: Santosh Shilimkar With EMIF clock-domain put under hardware supervised control, memory corruption and untraceable crashes are observed on OMAP5. Further investigation revealed that there is a weakness in the PRCM on this specific dynamic depedency. The recommendation is to set MPUSS static dependency towards EMIF clock-domain to avoid issues. This recommendation holds good for DRA7 family of devices as well. Signed-off-by: Santosh Shilimkar [rnayak@ti.com: DRA7] Signed-off-by: Rajendra Nayak [nm@ti.com: conflict resolution, dra7] Signed-off-by: Nishanth Menon --- arch/arm/mach-omap2/pm44xx.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 0dda6cf..b6f243d 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -203,6 +203,32 @@ static inline int omap4_init_static_deps(void) } /** + * omap5_dra7_init_static_deps - Init static clkdm dependencies on OMAP5 and + * DRA7 + * + * The dynamic dependency between MPUSS -> EMIF is broken and has + * not worked as expected. The hardware recommendation is to + * enable static dependencies for these to avoid system + * lock ups or random crashes. + */ +static inline int omap5_dra7_init_static_deps(void) +{ + struct clockdomain *mpuss_clkdm, *emif_clkdm; + int ret; + + mpuss_clkdm = clkdm_lookup("mpu_clkdm"); + emif_clkdm = clkdm_lookup("emif_clkdm"); + if (!mpuss_clkdm || !emif_clkdm) + return -EINVAL; + + ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm); + if (ret) + pr_err("Failed to add MPUSS -> EMIF wakeup dependency\n"); + + return ret; +} + +/** * omap4_pm_init_early - Does early initialization necessary for OMAP4+ devices * * Initializes basic stuff for power management functionality. @@ -239,10 +265,14 @@ int __init omap4_pm_init(void) goto err2; } - if (cpu_is_omap44xx()) { + if (cpu_is_omap44xx()) ret = omap4_init_static_deps(); - if (ret) - goto err2; + else if (soc_is_omap54xx() || soc_is_dra7xx()) + ret = omap5_dra7_init_static_deps(); + + if (ret) { + pr_err("Failed to initialise static dependencies.\n"); + goto err2; } ret = omap4_mpuss_init();