From patchwork Tue Feb 3 15:51:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 5769841 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3D097BF440 for ; Tue, 3 Feb 2015 15:53:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57171201F5 for ; Tue, 3 Feb 2015 15:53:49 +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 695C9201BB for ; Tue, 3 Feb 2015 15:53:48 +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 1YIfla-0000QK-Ib; Tue, 03 Feb 2015 15:51:54 +0000 Received: from mail-lb0-f182.google.com ([209.85.217.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YIflY-0000Ex-1a for linux-arm-kernel@lists.infradead.org; Tue, 03 Feb 2015 15:51:52 +0000 Received: by mail-lb0-f182.google.com with SMTP id l4so39334553lbv.13 for ; Tue, 03 Feb 2015 07:51:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=wFQZYzRsumKid1CqhNP12mgN74Pq6wqSs5ICNU5cvxA=; b=lD6oD0Esn0PvTYXwRLcObzmH7unVIyymqk6CY5UGDVIEOTgg/tXb7s4RIrC/8wpcXz nRhuBXnMy3BpBLvIBJWZiYnVZRrf34I9D+XVLC6MvfsNIobppy65VdrYZPqoSAbNl51L EojawLEkx4PXJbRmnuUa/RCLS214adSl3PiTgFl5kQNL5xv/rIjFWcNNJQWugEs4E+NA 0PQViz2ozipSkTE4wJUqX3+MeDiZR4195BAB6umxs8h4s8vcfQ8VJOT9S1LSJ8WBPrf7 UAyB7Hji1u0nNgQtgyxxs9Yv1eyiGt2Dt2p9dv1yekd8vBZO9RayEjl+MWxgHR/ZWxHK 9yXA== X-Gm-Message-State: ALoCoQmoahsIXINa8wVG+lutZzUP88xIcktPrepkjwAgzArO15pN5wb7WngMIdQcwlUlDlJQQ1M/ X-Received: by 10.112.162.226 with SMTP id yd2mr25390174lbb.1.1422978689638; Tue, 03 Feb 2015 07:51:29 -0800 (PST) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id s3sm671998lag.10.2015.02.03.07.51.28 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 07:51:29 -0800 (PST) From: To: Tony Lindgren , Paul Walmsley , linux-omap@vger.kernel.org Subject: [PATCH] ARM: dra7xx: hwmod: drop .modulemode from pcie1/2 hwmods Date: Tue, 3 Feb 2015 17:51:24 +0200 Message-Id: <1422978684-4826-1-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150203_075152_281007_2AAFA4FB X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Nishanth Menon , Grygorii Strashko , sumit.semwal@linaro.org, linux-arm-kernel@lists.infradead.org, kishon@ti.com 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Grygorii Strashko Now DRA7xx pcie1/2 hwmods define PRCM configuration as following: .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, .rstctrl_offs = DRA7XX_RM_L3INIT_RSTCTRL_OFFSET, .modulemode = MODULEMODE_SWCTRL, which is completely wrong because DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET is clockdomain ctrl register and NOT module ctrl register. And they have diffrent allowed values for bits[0,1]: CLKTRCTRL?????????MODULEMODE?????????????????????????????????? 0x0:?NO_SLEEP?????0x0:?Module?is?disabled?by?SW.?????????????? 0x1:?SW_SLEEP?????0x1:?Module?is?managed?automatically?by?HW?? 0x2:?SW_WKUP??????0x2:?Module?is?explicitly?enabled.?????????? 0x3:?HW_AUTO??????0x3:?Reserved?? As result, following message can be seen during suspend: "omap_hwmod: pcie1: _wait_target_disable failed" Fix it by removing .modulemode from pcie1/2 hwmods and, in that way, prevent clockdomain ctrl register writing from HWMOD core. Signed-off-by: Grygorii Strashko Acked-by: Kishon Vijay Abraham I --- More over, it looks like pcie1/2 hwmods are fake and have to be dropped at all. The real HWMODs are PCIESS1/2. Unfortunatelly, not all information on PCIE is public, so I could be wrong here. --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index ffd6604..a428b2d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -1478,7 +1478,6 @@ static struct omap_hwmod dra7xx_pcie1_hwmod = { .prcm = { .omap4 = { .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, - .modulemode = MODULEMODE_SWCTRL, }, }, }; @@ -1492,7 +1491,6 @@ static struct omap_hwmod dra7xx_pcie2_hwmod = { .prcm = { .omap4 = { .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, - .modulemode = MODULEMODE_SWCTRL, }, }, };