From patchwork Tue Mar 4 16:19:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 25695 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3E5CD2066C for ; Tue, 4 Mar 2014 16:20:20 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wn1sf12096918obc.1 for ; Tue, 04 Mar 2014 08:20:19 -0800 (PST) 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=8O6PpQn8qAYw7/s5/Zr3DhgdJ4WeSbZCK42Ce/IQT9o=; b=muRYU65BMNS/fjC3qIctKRTgcmER3X98FKnAmxOj1EndFftdDfTpJCQ5m8GNENtcyI MQbR8MePsvhoKo9zOFfLQFyrA4v6AFQg4ZETXAb2FKxFzbTQKWYEtZnELB0D0yfrgosc rj9auqqXv69pkBazku3mTjN9uc7JIDxu6iggGUZOZ2+hRC1rN99qmE34ounl5p6jAJeU 4HY14clAoSWM11ZAfMOoKjywxX7sDCNtIWdhOpD43aKEq1pL1vYNaP2lyFQABmY4N27i m+QnW+ii6X6d2fq61J4zheXRKtjb4ol9Ug6ZPed2ewWgPqBIRmPPJWeTxGbF4OMnZ2j7 1kCw== X-Gm-Message-State: ALoCoQlVPse+bbs2F5rXsULweDyoGHomnAdRCfrz9tZixeWr33oPW2wGlcvkfwUOCJ1LyYWd1nSd X-Received: by 10.43.161.202 with SMTP id mh10mr148215icc.23.1393950019675; Tue, 04 Mar 2014 08:20:19 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.42.138 with SMTP id c10ls2518818qga.63.gmail; Tue, 04 Mar 2014 08:20:19 -0800 (PST) X-Received: by 10.52.3.42 with SMTP id 10mr173460vdz.78.1393950019522; Tue, 04 Mar 2014 08:20:19 -0800 (PST) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id si7si4677439vdc.141.2014.03.04.08.20.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 08:20:19 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id oz11so4982678veb.5 for ; Tue, 04 Mar 2014 08:20:19 -0800 (PST) X-Received: by 10.58.37.232 with SMTP id b8mr164928vek.27.1393950019440; Tue, 04 Mar 2014 08:20:19 -0800 (PST) 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.220.130.193 with SMTP id u1csp138052vcs; Tue, 4 Mar 2014 08:20:18 -0800 (PST) X-Received: by 10.67.3.97 with SMTP id bv1mr551228pad.54.1393950018558; Tue, 04 Mar 2014 08:20:18 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wq4si14758274pbc.137.2014.03.04.08.20.17; Tue, 04 Mar 2014 08:20:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754355AbaCDQUQ (ORCPT + 5 others); Tue, 4 Mar 2014 11:20:16 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:45099 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754311AbaCDQUP (ORCPT ); Tue, 4 Mar 2014 11:20:15 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s24GJrNt022596; Tue, 4 Mar 2014 10:19:53 -0600 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 s24GJroq032399; Tue, 4 Mar 2014 10:19:53 -0600 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.174.1; Tue, 4 Mar 2014 10:19:53 -0600 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s24GJdR5017797; Tue, 4 Mar 2014 10:19:51 -0600 From: Tero Kristo To: , , , CC: Subject: [PATCH 06/18] ARM: OMAP3: PRM: move modem reset to PRM driver Date: Tue, 4 Mar 2014 18:19:06 +0200 Message-ID: <1393949958-816-7-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1393949958-816-1-git-send-email-t-kristo@ti.com> References: <1393949958-816-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=neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 a more proper isolation of the code. Done in preparation of making PRM an individual driver. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/pm34xx.c | 5 +---- arch/arm/mach-omap2/prm3xxx.c | 15 +++++++++++++++ arch/arm/mach-omap2/prm3xxx.h | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index a42f9ea..0eecf6f 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -368,10 +368,7 @@ static void __init omap3_d2d_idle(void) omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK); /* reset modem */ - omap2_prm_write_mod_reg(OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK | - OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK, - CORE_MOD, OMAP2_RM_RSTCTRL); - omap2_prm_write_mod_reg(0, CORE_MOD, OMAP2_RM_RSTCTRL); + omap3_prm_reset_modem(); } static void __init prcm_setup_regs(void) diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c index 78ea9a5..92ab46a 100644 --- a/arch/arm/mach-omap2/prm3xxx.c +++ b/arch/arm/mach-omap2/prm3xxx.c @@ -259,6 +259,21 @@ int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits) } /** + * omap3_prm_reset_modem - toggle reset signal for modem + * + * Toggles the reset signal to modem IP block. Required to allow + * OMAP3430 without stacked modem to idle properly. + */ +void __init omap3_prm_reset_modem(void) +{ + omap2_prm_write_mod_reg( + OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK | + OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK, + CORE_MOD, OMAP2_RM_RSTCTRL); + omap2_prm_write_mod_reg(0, CORE_MOD, OMAP2_RM_RSTCTRL); +} + +/** * omap3xxx_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain * * Clear any previously-latched I/O wakeup events and ensure that the diff --git a/arch/arm/mach-omap2/prm3xxx.h b/arch/arm/mach-omap2/prm3xxx.h index 543eb63..2a0f089 100644 --- a/arch/arm/mach-omap2/prm3xxx.h +++ b/arch/arm/mach-omap2/prm3xxx.h @@ -164,6 +164,7 @@ extern int __init omap3xxx_prm_init(void); extern u32 omap3xxx_prm_get_reset_sources(void); int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits); void omap3xxx_prm_iva_idle(void); +void omap3_prm_reset_modem(void); #endif /* __ASSEMBLER */