From patchwork Thu Aug 15 20:25:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1972934 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=cReI0ORI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WlGvC6QdSz1yfB for ; Fri, 16 Aug 2024 06:29:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E1DB588BCD; Thu, 15 Aug 2024 22:26:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="cReI0ORI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E2C5588B99; Thu, 15 Aug 2024 22:26:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (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 3910988BA7 for ; Thu, 15 Aug 2024 22:26:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-39d210237feso2930865ab.1 for ; Thu, 15 Aug 2024 13:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1723753555; x=1724358355; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PABb61nryISNosF9k2x01u5rY9Rbyf4Y7MSr0lJDLQk=; b=cReI0ORI38lULIzEuM/5g3JvCgxdcz63qJOxtr+ta1LJp1cG6qdRHoz36wjnQkVWNN N9MdfrfRuCoaKz4ij4tWrEZkqg+vLYhKfX+XmxmjSoR258DipTulTLU2/63D+Eknrokg u/GIjhA1BA2LMQVLrK3yAkh2XO2o8pJ61EQ+A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723753555; x=1724358355; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PABb61nryISNosF9k2x01u5rY9Rbyf4Y7MSr0lJDLQk=; b=fDe95OmVvrAhIiYmrTEMpj9+LBB7u75VXCjl3is1j8AUuUohdlLadKMwW4V815zeVl pm6xJNbB1G0I5/dRoNDP9aILW5Tt7JDyT2cSxS4uUOgHOsjhBB6J3Co9AT/6v0E1n78q 5+j1CURHPAXgei3qphAP3Ibq2YQGjK/3gdbp4osPIuybf3uEK2SVLk5G7MAAORH6l7fH AstqjXXoyAeGr0IoN26KdSUO5/++cRYYwsIw+HugYze5flaeCHnn14wXFXBoY7pyX+mi 1mDMS17iJ3aIOc76N8/89F3uqtK990prkpLvGaCOJgfKwU3czJI/IWkI5Gl675SRLJal FxdQ== X-Gm-Message-State: AOJu0Ywn5CjG0TKXbj85msySwQLG3f4OLIRKk6RF3OCk+NHYIhGhjx5e J8MvokkuJNbEzIqERzqc1gWPol/I+Q4ZwSyiC5a9P5j151ksfe/+SIG8Z8T9vh6dF5cP4of3P55 eDQ== X-Google-Smtp-Source: AGHT+IGyDynSW0VRu3FTflL+elXEpspQ6Ymaf1zpqu5D7RxQHfY7d4IWpO4YEbLNcrgYuqSelnpHCA== X-Received: by 2002:a05:6e02:1648:b0:39b:968:85e4 with SMTP id e9e14a558f8ab-39d26cde81amr12999495ab.6.1723753554828; Thu, 15 Aug 2024 13:25:54 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39d1ed5db5bsm8014235ab.64.2024.08.15.13.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 13:25:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v3 16/24] sandbox: Add some debugging to pci_io Date: Thu, 15 Aug 2024 14:25:27 -0600 Message-Id: <20240815202535.767869-17-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240815202535.767869-1-sjg@chromium.org> References: <20240815202535.767869-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Add a little debugging to this driver. Convert the existing debugging to use logging. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/lib/pci_io.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/sandbox/lib/pci_io.c b/arch/sandbox/lib/pci_io.c index 6040eacb594..5eff7c7d65d 100644 --- a/arch/sandbox/lib/pci_io.c +++ b/arch/sandbox/lib/pci_io.c @@ -8,6 +8,8 @@ * IO space access commands. */ +#define LOG_CATEGORY UCLASS_PCI + #include #include #include @@ -31,10 +33,11 @@ int pci_map_physmem(phys_addr_t paddr, unsigned long *lenp, if (ret) continue; *devp = dev; + log_debug("addr=%lx, dev=%s\n", (ulong)paddr, dev->name); return 0; } - debug("%s: failed: addr=%pap\n", __func__, &paddr); + log_debug("%s: failed: addr=%pap\n", __func__, &paddr); return -ENOSYS; } @@ -66,7 +69,7 @@ static int pci_io_read(unsigned int addr, ulong *valuep, pci_size_t size) } } - debug("%s: failed: addr=%x\n", __func__, addr); + log_debug("%s: failed: addr=%x\n", __func__, addr); return -ENOSYS; } @@ -87,7 +90,7 @@ static int pci_io_write(unsigned int addr, ulong value, pci_size_t size) } } - debug("%s: failed: addr=%x, value=%lx\n", __func__, addr, value); + log_debug("%s: failed: addr=%x, value=%lx\n", __func__, addr, value); return -ENOSYS; }