From patchwork Tue Feb 3 15:51:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: grygorii.strashko@linaro.org X-Patchwork-Id: 435963 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44A59140185 for ; Wed, 4 Feb 2015 02:54:06 +1100 (AEDT) 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 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.182 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.217.182 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org 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, }, }, };