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 C453DC32771 for ; Wed, 21 Sep 2022 13:23:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CA65D84CB2; Wed, 21 Sep 2022 15:22:53 +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="rsNwKFQT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5A0D084C9A; 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 114B884CA2 for ; Wed, 21 Sep 2022 15:22:26 +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-0001rQ-F2; 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=Z4kcbKDFWGCeav5bee2iA3r6SKqH0GcloxdLW64cWqo=; b=rsNwKFQTl1APgSEaO3u1ZQCM1uXZ656F/1qLs2Q4ooIPfzbVmRWfDrF2roIhb5q/REQBPy rOo7w4FZqtyWWfruqvSAkr74s8SHdF8JyqOhYzT8UGp61N36M45PwFVyXJsbnjxX+J4Nxl FXVZaYOfpFEYJtc9krW95wRb34bu5tD4EdOuzjmeb/yp7neMucb221l0+1wN9kRlpVBv5c 9skvFyXdm74vqF7dSWVGbP8cA/vJjJcLcJgg0hzh4/k0gtCnBGnW4DtS7l/v9T1msnxk2O +WbVrp5/i93PT4wX96OseWXY+vE2BdQk5xhuhkHlRQzhUnUrsmWrnzCUcviVxQ== From: Alexander Dahl To: u-boot@lists.denx.de Cc: Michal Simek , Simon Glass Subject: [PATCH v2 3/8] fpga: cyclon2: Use logging feature instead of FPGA_DEBUG Date: Wed, 21 Sep 2022 15:22:11 +0200 Message-Id: <20220921132216.7089-4-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/cyclon2.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/fpga/cyclon2.c b/drivers/fpga/cyclon2.c index 3b008facb8..7dc241b269 100644 --- a/drivers/fpga/cyclon2.c +++ b/drivers/fpga/cyclon2.c @@ -5,18 +5,14 @@ * Based on ACE1XK.c */ +#define LOG_CATEGORY UCLASS_FPGA + #include /* core U-Boot definitions */ +#include #include #include /* ACEX device family */ #include -/* Define FPGA_DEBUG to get debug printf's */ -#ifdef FPGA_DEBUG -#define PRINTF(fmt, args...) printf(fmt, ##args) -#else -#define PRINTF(fmt, args...) -#endif - /* Note: The assumption is that we cannot possibly run fast enough to * overrun the device (the Slave Parallel mode can free run at 50MHz). * If there is a need to operate slower, define CONFIG_FPGA_DELAY in @@ -42,7 +38,7 @@ int CYC2_load(Altera_desc *desc, const void *buf, size_t bsize) switch (desc->iface) { case passive_serial: - PRINTF("%s: Launching Passive Serial Loader\n", __func__); + log_debug("%s: Launching Passive Serial Loader\n", __func__); ret_val = CYC2_ps_load(desc, buf, bsize); break; @@ -51,8 +47,8 @@ int CYC2_load(Altera_desc *desc, const void *buf, size_t bsize) * done in the write() callback. Use the existing PS load * function for FPP, too. */ - PRINTF("%s: Launching Fast Passive Parallel Loader\n", - __func__); + log_debug("%s: Launching Fast Passive Parallel Loader\n", + __func__); ret_val = CYC2_ps_load(desc, buf, bsize); break; @@ -72,7 +68,7 @@ int CYC2_dump(Altera_desc *desc, const void *buf, size_t bsize) switch (desc->iface) { case passive_serial: - PRINTF("%s: Launching Passive Serial Dump\n", __func__); + log_debug("%s: Launching Passive Serial Dump\n", __func__); ret_val = CYC2_ps_dump(desc, buf, bsize); break; @@ -99,14 +95,14 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize) Altera_CYC2_Passive_Serial_fns *fn = desc->iface_fns; int ret = 0; - PRINTF("%s: start with interface functions @ 0x%p\n", - __func__, fn); + log_debug("%s: start with interface functions @ 0x%p\n", + __func__, fn); if (fn) { int cookie = desc->cookie; /* make a local copy */ unsigned long ts; /* timestamp */ - PRINTF("%s: Function Table:\n" + log_debug("%s: Function Table:\n" "ptr:\t0x%p\n" "struct: 0x%p\n" "config:\t0x%p\n" -- 2.30.2