From patchwork Sun Jun 29 16:21:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Heider X-Patchwork-Id: 4444741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 64949BEEAA for ; Sun, 29 Jun 2014 16:25:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6ECA120353 for ; Sun, 29 Jun 2014 16:25:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3A9620328 for ; Sun, 29 Jun 2014 16:25:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1Hsn-0003ga-DQ; Sun, 29 Jun 2014 16:23:13 +0000 Received: from mail-wg0-x232.google.com ([2a00:1450:400c:c00::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1Hrx-0003OI-Md for linux-arm-kernel@lists.infradead.org; Sun, 29 Jun 2014 16:22:22 +0000 Received: by mail-wg0-f50.google.com with SMTP id m15so6928946wgh.21 for ; Sun, 29 Jun 2014 09:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8HTzkdretqI4tekvuGrZFtchDRfbawMfJoNBKo99m4E=; b=Iap4QJjrGT1MKkKosC/d1A216V/ICRU6v6xlv5SgPZztFdx4d5VYWqoRnKBBD8P+He Zslx9N663coS65vvVmTOMHtzzuaos93aJIpoZcQOqI9RYH9k0HeueAV1ADgSeWLoCPL6 xkT7+Mv1W9PuRvcg//M73uCPpu2osBdy2UIQtaGa6cczw9jy1F3GkPvMzbaRIvW3HbqN DxsnRYYpxC3sg03vFHVXA6HrWEN382Evfh2ds283/sBzSQH3hBmZL7Yrx0GHM4GZbLrp zWykCI6/hVla/A+67BdXBKYK40D8/EFyQN7YBYO0j0s2xBTgEy4pGrAjl3YTf3Bwu4r8 oTzQ== X-Received: by 10.180.83.225 with SMTP id t1mr24571949wiy.28.1404058920380; Sun, 29 Jun 2014 09:22:00 -0700 (PDT) Received: from mamamia.internal (a89-182-10-130.net-htp.de. [89.182.10.130]) by mx.google.com with ESMTPSA id gh16sm21137573wic.3.2014.06.29.09.21.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Jun 2014 09:21:59 -0700 (PDT) From: Andre Heider To: linux-omap@vger.kernel.org Subject: [PATCH 05/13] ARM: OMAP2+: hwmod: Introduce a flag to deassert the HW reset line Date: Sun, 29 Jun 2014 18:21:39 +0200 Message-Id: <1404058907-21112-6-git-send-email-a.heider@gmail.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1404058907-21112-1-git-send-email-a.heider@gmail.com> References: <1404058907-21112-1-git-send-email-a.heider@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140629_092221_954465_B3287191 X-CRM114-Status: GOOD ( 13.03 ) X-Spam-Score: -0.8 (/) Cc: devicetree@vger.kernel.org, Paul Walmsley , Tony Lindgren , Greg Kroah-Hartman , Matt Porter , "Hans J . Koch" , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP hwmod's hardreset lines are not deasserted after a reset. Add the HWMOD_INIT_DEASSERT_HARD_RESET flag to deassert those after a successful reset. This is required to get the PRU-ICSS in a usable state on am33xx SoCs. Signed-off-by: Andre Heider --- arch/arm/mach-omap2/omap_hwmod.c | 2 ++ arch/arm/mach-omap2/omap_hwmod.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index f7bb435..1e56b65 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -2622,6 +2622,8 @@ static int __init _setup_reset(struct omap_hwmod *oh) if (!(oh->flags & HWMOD_INIT_NO_RESET)) r = _reset(oh); + if (!r && oh->flags & HWMOD_INIT_DEASSERT_HARD_RESET) + r = _deassert_hardreset(oh, oh->name); return r; } diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h index 0f97d63..c41d44d 100644 --- a/arch/arm/mach-omap2/omap_hwmod.h +++ b/arch/arm/mach-omap2/omap_hwmod.h @@ -514,6 +514,7 @@ struct omap_hwmod_omap4_prcm { * HWMOD_SWSUP_SIDLE_ACT: omap_hwmod code should manually bring the module * out of idle, but rely on smart-idle to the put it back in idle, * so the wakeups are still functional (Only known case for now is UART) + * HWMOD_INIT_DEASSERT_HARD_RESET: deassert the HW reset line at boot */ #define HWMOD_SWSUP_SIDLE (1 << 0) #define HWMOD_SWSUP_MSTANDBY (1 << 1) @@ -528,6 +529,7 @@ struct omap_hwmod_omap4_prcm { #define HWMOD_BLOCK_WFI (1 << 10) #define HWMOD_FORCE_MSTANDBY (1 << 11) #define HWMOD_SWSUP_SIDLE_ACT (1 << 12) +#define HWMOD_INIT_DEASSERT_HARD_RESET (1 << 13) /* * omap_hwmod._int_flags definitions