From patchwork Fri Oct 21 01:28:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 684830 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-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t0Smm63hgz9s5g for ; Fri, 21 Oct 2016 12:30:48 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=uWVgMN1L; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxOeD-0006SS-8Q; Fri, 21 Oct 2016 01:29:25 +0000 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxOe9-0006Os-1y for linux-arm-kernel@lists.infradead.org; Fri, 21 Oct 2016 01:29:22 +0000 Received: by mail-qt0-x244.google.com with SMTP id m5so2632310qtb.0 for ; Thu, 20 Oct 2016 18:29: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; bh=ZKNJt5vWj0JwszbYU6hlZ2ETi0lMgeHXivRCrvifrvA=; b=uWVgMN1Lh+bNKp09qFKeVHyUexU50P2O34EftcP6SR85ZGZgRl5UDr0b/NuuZ89NGf jlUA1w5P7EbjPs/DbF2VJPTO4OMoF1z+093fqNKmLBGLAwwSdUcueoXRsdmWugZTKyAI 5pqp/lWf4cMvq2Eg+bqum5RjCjOijMC/PGUPgH4Jof7KQmgGjzPHcWqZwGkJCgqAnYgW vPAz5MDol5oaZNO35E2/7lzQlUkIYEaDqSPARlpbuiny12T+NJShVu1HqCu5Fb9Z7+NV gszxh7sceO6PaprNccmS7BQ/K58E5aMoTdZ5fMD1aQiJE1K8R1mCRiK8s6AKpQyw5lue IhfQ== 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; bh=ZKNJt5vWj0JwszbYU6hlZ2ETi0lMgeHXivRCrvifrvA=; b=NnUPnTRxH5UxWsJ2Rev9q5mMrjXtIH20V8+ucVeHA0621NxpYC6ea7zr2w+FPhahw5 63peyGD6TnPnkzmhKzjTPjjGF61N2IHgFZtnsWCFJf+hG7p3FoRo+A9K+3IQsD8E1fKZ VKZTr/fDcDjXMCDhJXdT8csNftYN0D4xq3E+U8zsqSF/CRh3pK9kpzvmExWEc0/TgiAR 7+c+bff/YMijSHAWFC7m9idkN62LfYtTILRUNv5iAT3yQO+Ks184Br613wukg2yF9JiE rZ+g1O0S64rPZ/phXEGQ1GD+Jl3w2EoT3ig36oCx9rAHgog+gpRfJetQ5uIzIwYJ+Owu Rdhg== X-Gm-Message-State: ABUngveySk3JRUBPcXlZ7HOMfSYL8b07+AGtSuqk82ab+U216nw8z2N0vpo6nU/RDhtCUg== X-Received: by 10.200.52.75 with SMTP id v11mr3082553qtb.137.1477013339528; Thu, 20 Oct 2016 18:28:59 -0700 (PDT) Received: from localhost.localdomain ([187.180.185.182]) by smtp.gmail.com with ESMTPSA id i32sm84628qta.43.2016.10.20.18.28.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Oct 2016 18:28:58 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH v2] ARM: imx: gpc: Initialize all power domains Date: Thu, 20 Oct 2016 23:28:29 -0200 Message-Id: <1477013309-2808-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161020_182921_248373_8DAAB538 X-CRM114-Status: GOOD ( 13.96 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400d:c0d:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ulf.hansson@linaro.org, rafael.j.wysocki@intel.com, linux@armlinux.org.uk, jonathanh@nvidia.com, kernel@pengutronix.de, Fabio Estevam , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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: Fabio Estevam Since commit 0159ec670763dd ("PM / Domains: Verify the PM domain is present when adding a provider") the following regression is observed on imx6: imx-gpc: probe of 20dc000.gpc failed with error -22 The imx-gpc driver probe failure causes several issues such as: - When booting a kernel built with multi_v7_defconfig a kernel crash is seen. - When booting a kernel built with imx_v6_v7_defconfig the Etnaviv GPU driver is not loaded due to the lack of power domains. The gpc probe fails because of_genpd_add_provider_onecell() now checks if all the domains are initialized via pm_genpd_present() function and it fails because not all the power domains are initialized. In order to fix this error, initialize all the power domains from imx_gpc_domains[], not only the imx6q_pu_domain.base one. Reported-by: Olof's autobooter Signed-off-by: Fabio Estevam --- arch/arm/mach-imx/gpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c index 0df062d..d0463e9 100644 --- a/arch/arm/mach-imx/gpc.c +++ b/arch/arm/mach-imx/gpc.c @@ -430,7 +430,8 @@ static int imx_gpc_genpd_init(struct device *dev, struct regulator *pu_reg) if (!IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) return 0; - pm_genpd_init(&imx6q_pu_domain.base, NULL, false); + for (i = 0; i < ARRAY_SIZE(imx_gpc_domains); i++) + pm_genpd_init(imx_gpc_domains[i], NULL, false); return of_genpd_add_provider_onecell(dev->of_node, &imx_gpc_onecell_data);