From patchwork Fri Mar 10 16:46:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 1755392 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=hI7jrb9P; dkim-atps=neutral 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 (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PYBm734Qzz2472 for ; Sat, 11 Mar 2023 03:47:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C30585F75; Fri, 10 Mar 2023 17:46:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="hI7jrb9P"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8A59E85F7F; Fri, 10 Mar 2023 17:46:53 +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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 26FD785ED7 for ; Fri, 10 Mar 2023 17:46:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jbx6244@gmail.com Received: by mail-ed1-x52c.google.com with SMTP id x3so22862891edb.10 for ; Fri, 10 Mar 2023 08:46:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678466809; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=twnJGZP2oR+N7gVpIStX/Xm0uMAVsZKzJfGq8d0mwSU=; b=hI7jrb9PVggU/QKL8dC4ZaHeWYcbAhT+nBPSbCJISbga9XSj/O597TQ5jgt7RmaO7v emmYhKjdd4Ust9eAutRMWrfxO/YMOUTnnTwBngOd2jZDI0yTmgajVqVg++Di55F+R+A3 J6pr9JA7EHv/If8dhAVUSZxeYzBdzWRz2jnDzYoNuUCfpLUXIL82daE823cLUWlCi9xh DQ8bD5PcztJmB74hF0i78dTAKCWhceQc1NpLavCHhUtTBOirI++agniPHslHHjidxcXJ hxEPnvioe2Pz1eaCf4dDW7ptF4mKbHDHGNPVzdGwn8ANn4ecQr8p/P7MLLnFaMzHOxv2 E+hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678466809; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=twnJGZP2oR+N7gVpIStX/Xm0uMAVsZKzJfGq8d0mwSU=; b=0fJs2qU82vCeOhWmsSXdHGHdWDlHHjJ7slbc+6Z2FRc+26LagaCS6K4dFJHsuE6fyc aAFHShE9h3fZv1SHZ5lUl6MBcEwgk947cb+s7BF8frMcf8JTmzFUJOl79sCb9lMPCqe3 zydZpG2rV44WT3OcwPcB0/44R6xT3huFnPXEZmGvBvChWaOBg0RpUuaZ3aI2eP/Smpvh ekix1if+sW3gdHsF9e4f1B8xZRu919aNVE8bLhjG3bMpy9u1Ik0TSduQaKX5chYlDl4q dXfCecwv7qkyoRs61avwVZb2y4bcJu2YkCHHoBnW4ChTL/5M7nkiXgENuMjlANvSpyog t56Q== X-Gm-Message-State: AO0yUKWIatfuP8RMacI/yUuTS/ddHtjA+GgYNY9cuECuLE2Ry2hK3K7n qKfNJ4pYKuJnznEE0+CdUpw= X-Google-Smtp-Source: AK7set/Hbi4bn/vxsVBXA2gFAIhjCgsg8fFolS2GE17mstP1GMClRXg6fvNbpoZKcqmpvP2RlamvPQ== X-Received: by 2002:a17:906:9c86:b0:914:4277:f3e1 with SMTP id fj6-20020a1709069c8600b009144277f3e1mr16146105ejc.53.1678466809685; Fri, 10 Mar 2023 08:46:49 -0800 (PST) Received: from [192.168.2.2] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id w16-20020a170906385000b008df7d2e122dsm86689ejc.45.2023.03.10.08.46.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Mar 2023 08:46:49 -0800 (PST) Message-ID: <47ab3a99-07e8-29d4-a910-f6b15d53ec21@gmail.com> Date: Fri, 10 Mar 2023 17:46:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 From: Johan Jonker Subject: [PATCH v7 21/23] drivers: fix debug string with fdt_addr_t input To: dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com Cc: u-boot@lists.denx.de, yifeng.zhao@rock-chips.com References: <4caa17bc-6d32-5b07-68f3-f5ced40bfcbb@gmail.com> Content-Language: en-US In-Reply-To: <4caa17bc-6d32-5b07-68f3-f5ced40bfcbb@gmail.com> 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 The fdt_addr_t and phys_addr_t size have been decoupled. A 32bit CPU can expect 64-bit data from the device tree parser, so fix some debug strings with fdt_addr_t to be able to handle both sizes. Signed-off-by: Johan Jonker Reviewed-by: Simon Glass --- Changed V5: new patch --- arch/arm/mach-mvebu/cpu.c | 2 +- drivers/clk/ti/clk-ctrl.c | 9 +++++---- drivers/phy/phy-stm32-usbphyc.c | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) -- 2.20.1 diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index 329d1369..f58689e1 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -631,7 +631,7 @@ int board_xhci_enable(fdt_addr_t base) { const struct mbus_dram_target_info *dram; - printf("MVEBU XHCI INIT controller @ 0x%lx\n", base); + printf("MVEBU XHCI INIT controller @ 0x%llx\n", (fdt64_t)base); dram = mvebu_mbus_dram_info(); xhci_mvebu_mbus_config((void __iomem *)base, dram); diff --git a/drivers/clk/ti/clk-ctrl.c b/drivers/clk/ti/clk-ctrl.c index 6cc02d2e..8926e57e 100644 --- a/drivers/clk/ti/clk-ctrl.c +++ b/drivers/clk/ti/clk-ctrl.c @@ -44,7 +44,7 @@ static int clk_ti_ctrl_disable(struct clk *clk) offs = priv->offs[0].start + clk->id; err = clk_ti_ctrl_check_offs(clk, offs); if (err) { - dev_err(clk->dev, "invalid offset: 0x%lx\n", offs); + dev_err(clk->dev, "invalid offset: 0x%llx\n", (fdt64_t)offs); return err; } @@ -64,7 +64,7 @@ static int clk_ti_ctrl_enable(struct clk *clk) offs = priv->offs[0].start + clk->id; err = clk_ti_ctrl_check_offs(clk, offs); if (err) { - dev_err(clk->dev, "invalid offset: 0x%lx\n", offs); + dev_err(clk->dev, "invalid offset: 0x%llx\n", (fdt64_t)offs); return err; } @@ -125,8 +125,9 @@ static int clk_ti_ctrl_of_to_plat(struct udevice *dev) } priv->offs[i].end = priv->offs[i].start + fdt_size; - dev_dbg(dev, "start=0x%08lx, end=0x%08lx\n", - priv->offs[i].start, priv->offs[i].end); + dev_dbg(dev, "start=0x%016llx, end=0x%016llx\n", + (fdt64_t)priv->offs[i].start, + (fdt64_t)priv->offs[i].end); } return 0; diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c index dcf2194e..15bd60ca 100644 --- a/drivers/phy/phy-stm32-usbphyc.c +++ b/drivers/phy/phy-stm32-usbphyc.c @@ -583,8 +583,8 @@ static int stm32_usbphyc_probe(struct udevice *dev) phy_id = ofnode_read_u32_default(node, "reg", FDT_ADDR_T_NONE); if (phy_id >= MAX_PHYS) { - dev_err(dev, "invalid reg value %lx for %s\n", - phy_id, ofnode_get_name(node)); + dev_err(dev, "invalid reg value %llx for %s\n", + (fdt64_t)phy_id, ofnode_get_name(node)); return -ENOENT; }