From patchwork Tue Dec 17 12:14:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1211325 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Rrei4uXb"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47ccXC2Lg4z9sRM for ; Tue, 17 Dec 2019 23:14:51 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06554816EE; Tue, 17 Dec 2019 13:14:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Rrei4uXb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6484E81701; Tue, 17 Dec 2019 13:14:44 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A7BB3816A5 for ; Tue, 17 Dec 2019 13:14:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-wm1-x344.google.com with SMTP id u2so2886221wmc.3 for ; Tue, 17 Dec 2019 04:14:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WGfnM65XWL5aveVYXb4AFQ1uWFZnslyEVgqGsp9LmS0=; b=Rrei4uXb1xD0wjWBD8wxoOOKMC0XCDli/ZSwqa64do+TBpySlM3uAz8f0FbqZneVJS +Ckk3Dsj39nNHra3C9m2MafoKCbWS/ZJ61vjjXfCbQbSAIqdLAeZxTdvH2gobPDGfVZZ R6zqneYMi0qBRL6GK0m8wWAo3k5YZM3IOgmF/g7AmND4h+6K8NuVSJhpe8gQV4kQ5B4a O8S8tgSbtmVaqSlzCkMtmua5dnM/d/krDwLIldst3a/A8dxsH5qGc17QyY3HoN9bHA9O 13szFrXX6EidAj1RphvcZxkduD00hcemb+j0SsEUjtQsVG4SRSwiYQCDnWKEJrm/d6UF a3zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WGfnM65XWL5aveVYXb4AFQ1uWFZnslyEVgqGsp9LmS0=; b=evgdNuxqJQN922WSDBCAKGMGFhZgQCPvat2zNKCF36tAgr6kJr/cpdwBNC4FOPp5lC +JVxyr4WhR+jgiiWWuT+ypIUUgQPhn3Dth26tGvxOrHPv0ijPLmulnNl1c/r80Rtox7W 55DZuG8TCQAn60jSZEiz7wtmp2YnNehIjSrxjk03p4qQNbC2fAj3EmvbHpj0H4OfN4ao n8K/DQyRa6QW7asZlK/ffVEVCkc0Q+485761fhNX1DWqmXX6QJp526RmkwB/SrD0wJKi whkppBLhHzdf+XNyAlBEc08CiGXDIsyic/GRVRqNxYtJ2ydAvm1gjoAse/jEDcTMDptC iGrw== X-Gm-Message-State: APjAAAVAeNjBvsYM8e5dXl6Vlv1RlUx34fXKAsbdpw00iApjOcf5QwIC z6U0gPCjEr7JgAZupqcgSTITZzosy94= X-Google-Smtp-Source: APXvYqyjYOocE16FMbe4z4rw0t8vXYMvj3YI5UIfGk18SwWX4GCsrcwkVKVbJvcNcMow+sFrsEKfyg== X-Received: by 2002:a7b:c934:: with SMTP id h20mr5066051wml.103.1576584880635; Tue, 17 Dec 2019 04:14:40 -0800 (PST) Received: from localhost ([194.105.145.90]) by smtp.gmail.com with ESMTPSA id n14sm2743187wmi.26.2019.12.17.04.14.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2019 04:14:40 -0800 (PST) From: Igor Opaniuk To: u-boot@lists.denx.de Subject: [PATCH v1] Revert "core: device: use dev_power_domain_on" Date: Tue, 17 Dec 2019 14:14:31 +0200 Message-Id: <20191217121431.28819-1-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcel Ziswiler , Igor Opaniuk , Max Krummenacher , Oliver Graute Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean From: Igor Opaniuk This reverts commit f0cc4eae9a1702a768817ea25d9f23cece69d021 This was previously reported that f0cc4eae9a ("core: device: use dev_power_domain_on") breaks initial boot on Colibri iMX8X and IMX8 QM ROM 7720a1 board. Revert it until the problem is properly fixed. Signed-off-by: Igor Opaniuk Reviewed-by: Oleksandr Suvorov Reviewed-by: Fabio Estevam --- drivers/core/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/core/device.c b/drivers/core/device.c index 4e037083a6..c5b232c259 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -313,6 +313,7 @@ static void *alloc_priv(int size, uint flags) int device_probe(struct udevice *dev) { + struct power_domain pd; const struct driver *drv; int size = 0; int ret; @@ -396,9 +397,8 @@ int device_probe(struct udevice *dev) if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent && (device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) && !(drv->flags & DM_FLAG_DEFAULT_PD_CTRL_OFF)) { - ret = dev_power_domain_on(dev); - if (ret) - goto fail; + if (!power_domain_get(dev, &pd)) + power_domain_on(&pd); } ret = uclass_pre_probe_device(dev);