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 6D8D5C54EE9 for ; Mon, 19 Sep 2022 10:39:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D299584C1D; Mon, 19 Sep 2022 12:39:29 +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="qX+r9h+m"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C52B684C16; Mon, 19 Sep 2022 12:39:17 +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 6710A84C04 for ; Mon, 19 Sep 2022 12:39:13 +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 1oaEBE-0006v5-A0; Mon, 19 Sep 2022 12:39:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=default; t=1663583952; 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=7naY/4ruYidbMb1xiqMZLg07xBi4qlse5ufdVxTbSrk=; b=qX+r9h+mHdhzElfMYWj6FRIii3vWCKq3xa4swvRsIvZ/xBmxCEWnJjlbq/6wZAsXt0qxXl rAGRc5sMSi8HXS4ttfhUFmuyVf81LpEtjMNF03Yn/e4lfmX2OtRs+XXv+TRNDTWtCG22y5 ZzsZfNvr5vUkDyWct6GXA+cLI06g/o8cAiErz7ZNP/boi+joUGweEKyFgqLKzRklBekVE0 MPoHZxO+3rWpL9yDqUsYayC5+WUwcz259SUrAiN65HXSB7pRCze2mnFYhVWeq2ZDe18OXo e+PMPFvxw25yd9iFgjHlZLRC9gqZajQh+XOYqRxvgUVm9LI3/p2Cj3h6H2TzbA== From: Alexander Dahl To: u-boot@lists.denx.de Cc: Michal Simek Subject: [PATCH 1/7] fpga: altera: Use logging feature instead of FPGA_DEBUG Date: Mon, 19 Sep 2022 12:39:06 +0200 Message-Id: <20220919103912.26554-2-ada@thorsis.com> In-Reply-To: <20220919103912.26554-1-ada@thorsis.com> References: <20220919103912.26554-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..5a8fee10a5 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_FS_FIRMWARE_LOADER + /* * 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