From patchwork Fri Jan 14 12:25:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1580016 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=79zLvj+j; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Jb0s92FZ8z9sSs for ; Fri, 14 Jan 2022 23:26:21 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6E54783457; Fri, 14 Jan 2022 13:25:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.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=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="79zLvj+j"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 845B0833B4; Fri, 14 Jan 2022 13:25:48 +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=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 DEA6F83420 for ; Fri, 14 Jan 2022 13:25:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ed1-x52b.google.com with SMTP id z22so34343138edd.12 for ; Fri, 14 Jan 2022 04:25:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8BEQ2XFFVbTI6xL4f0/y9ihzg+yE/9+iW21oM/umNjk=; b=79zLvj+jr58qZo8c4Qk7iC0jayeLyMj6tcal+3oL0ut3fa6bM5CGw9qqlG+EuBgQs+ pRh8r5dyPbEHZUgUVRB82uQRdAEyvcQL4SGaa1cq5omkNzQUsIYkMEdAiqYrT+uvtnpU wD1iJoqR8KsVrcHHLOkGlUxzCH/p3M+HBDzE8xU9JBsLehjIO/IfhI3T+OOYtohUBRvd 2Bec8mB8F8H/m9TG86JpWbeVr5V4TStPb8ZpymErLsLNpKlGeEE55Q6Feq/RxRLoBP+y uaZ6/5wOsZAyKYYLaqeiX5zgOBpkRcXtAyNQaYoMsVQRBBnJJJ+NgCaQOP0esTRODUD2 dBBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8BEQ2XFFVbTI6xL4f0/y9ihzg+yE/9+iW21oM/umNjk=; b=sVPYzFhzzOOQt6QEVKctcs9sSazCDLyUTGKmmyNcCUcoBWXKycMHqezOh+06UVshjq LD8G9Gp7v9Futi+b2QjhHU2IGuVGas5ErPEqOahliL1nZhtP3N8BU8LctdbXQh03q2jD hRvDJ/YeSla3QV2uWIq8IyrdRX/ssTeb8TlDbvyW+U777TkZl00cn5PmzJJ6uniFP5qq GcylUMXQ0pXHbH3xMbYodXpUXXyGJFK8G7vYJiUa2Y1FTl9tbXMdEsKGlyx38N5sovJo aXPdbQIPNTcd+ceSJfXYRVoKPoKpcttZN5EJC97CEGAsDOm18gKyAqyl9RIDHkVEXHPE ThPg== X-Gm-Message-State: AOAM5324VJ4gkplQiKW9vuJhnOw+XCgWj5Oq2sxaOblPp+FsgP3MT6Jl fN305rKkiJueDpb/MAVzKs3HID5tw4VAmVjd X-Google-Smtp-Source: ABdhPJxdJuAbY4uE6T/3bF8jM5GzqI03pKo2ocsbGxl5lZotuRwup0+HOJ6LYlrUhBS6PMemjQ4yTQ== X-Received: by 2002:a05:6402:34c3:: with SMTP id w3mr8933055edc.149.1642163144389; Fri, 14 Jan 2022 04:25:44 -0800 (PST) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id k22sm2356229edv.22.2022.01.14.04.25.43 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Jan 2022 04:25:44 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Adrian Fiergolski Subject: [PATCH 3/4] firmware: zynqmp: Do not report error if node is already configured Date: Fri, 14 Jan 2022 13:25:37 +0100 Message-Id: <8c15ef0b68cf191f693d3d010f70ac24cfd8171f.1642163135.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Power domain driver sends PM fragment to PMUFW. It is sent for every node which is listed in DT. But some nodes could be already enabled but driver is not capable to find it out. That's why it blinly sents request for every listed IP. When PMUFW response by XST_PM_ALREADY_CONFIGURED error code there is no need to show any error message because node is already enabled. That's why cover this case with message when DEBUG is enabled. Signed-off-by: Michal Simek --- drivers/firmware/firmware-zynqmp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c index d6dd5a394ee9..a80e73307982 100644 --- a/drivers/firmware/firmware-zynqmp.c +++ b/drivers/firmware/firmware-zynqmp.c @@ -21,6 +21,7 @@ #define PMUFW_PAYLOAD_ARG_CNT 8 #define XST_PM_NO_ACCESS 2002L +#define XST_PM_ALREADY_CONFIGURED 2009L struct zynqmp_power { struct mbox_chan tx_chan; @@ -143,6 +144,11 @@ void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size) return; } + if (err == XST_PM_ALREADY_CONFIGURED) { + debug("PMUFW Node is already configured\n"); + return; + } + if (err) printf("Cannot load PMUFW configuration object (%d)\n", err);