From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88F3CC6FA8E for ; Wed, 21 Sep 2022 13:23:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6421184CA9; Wed, 21 Sep 2022 15:22:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=thorsis.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=thorsis.com header.i=@thorsis.com header.b="bng9b1sG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B59C984C9D; Wed, 21 Sep 2022 15:22:31 +0200 (CEST) Received: from mail.thorsis.com (mail.thorsis.com [92.198.35.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A1CE684C99 for ; Wed, 21 Sep 2022 15:22:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=thorsis.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ada@thorsis.com Received: from adahl by ada.ifak-system.com with local (Exim 4.92) (envelope-from ) id 1oazgG-0001rN-Dw; Wed, 21 Sep 2022 15:22:24 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=default; t=1663766544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wYAuFToenkCYv07PikbMDdn1XhsWrH1dvRDF8slQLj0=; b=bng9b1sGaRBWCr4sFaPwldn+sbA1jcROZmYePDGePfnCsil6E+xkqp0TGPc/2e2yhG7QJ4 fAJJymwLHETMcTcz8rhgeHAEhij3VTJoeGLZoETxsrqHJFWRVV/IAFk6gxIvNNXzxI5/b+ F41Bq4VbJQAmTiGM9EezWrSYaIz4eHR9Ix6JaOwrjN6353sHY5Q3GbNEMEzQCTbH6FFevb lFOKiULNaB2kE7A2Sxd8ieYmX9Ln4KvZOdDvuita+IKCMPfNb7E3IcvElr+qAKFBgm0vTu IG8c6rygGlnQznON13sjIaBgw8Q7qFsN8xSrBRj7s/ip/EF4Kh0g3vj6Sybp0g== From: Alexander Dahl To: u-boot@lists.denx.de Cc: Michal Simek , Simon Glass Subject: [PATCH v2 2/8] fpga: altera: Use logging feature instead of FPGA_DEBUG Date: Wed, 21 Sep 2022 15:22:10 +0200 Message-Id: <20220921132216.7089-3-ada@thorsis.com> In-Reply-To: <20220921132216.7089-1-ada@thorsis.com> References: <20220921132216.7089-1-ada@thorsis.com> Content-Transfer-Encoding: 8bit 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.6 at phobos.denx.de X-Virus-Status: Clean Instead of using DEBUG or LOG_DEBUG the driver still had its own definition for debug output. Signed-off-by: Alexander Dahl --- drivers/fpga/altera.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/fpga/altera.c b/drivers/fpga/altera.c index 10c0475d25..e969d83de7 100644 --- a/drivers/fpga/altera.c +++ b/drivers/fpga/altera.c @@ -7,6 +7,8 @@ * Rich Ireland, Enterasys Networks, rireland@enterasys.com. */ +#define LOG_CATEGORY UCLASS_FPGA + /* * Altera FPGA support */ @@ -16,9 +18,6 @@ #include #include -/* Define FPGA_DEBUG to 1 to get debug printf's */ -#define FPGA_DEBUG 0 - static const struct altera_fpga { enum altera_family family; const char *name; @@ -106,8 +105,8 @@ int altera_load(Altera_desc *desc, const void *buf, size_t bsize) if (!fpga) return FPGA_FAIL; - debug_cond(FPGA_DEBUG, "%s: Launching the %s Loader...\n", - __func__, fpga->name); + log_debug("%s: Launching the %s Loader...\n", + __func__, fpga->name); if (fpga->load) return fpga->load(desc, buf, bsize); return 0; @@ -120,8 +119,8 @@ int altera_dump(Altera_desc *desc, const void *buf, size_t bsize) if (!fpga) return FPGA_FAIL; - debug_cond(FPGA_DEBUG, "%s: Launching the %s Reader...\n", - __func__, fpga->name); + log_debug("%s: Launching the %s Reader...\n", + __func__, fpga->name); if (fpga->dump) return fpga->dump(desc, buf, bsize); return 0; -- 2.30.2