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 42514C6FD1F for ; Mon, 13 Mar 2023 00:33:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 858B38611A; Mon, 13 Mar 2023 01:33:07 +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="I7EzeigX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D57F886119; Mon, 13 Mar 2023 01:33:02 +0100 (CET) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (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 1CA6B8611E for ; Mon, 13 Mar 2023 01:32:59 +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-x532.google.com with SMTP id fd5so8391364edb.7 for ; Sun, 12 Mar 2023 17:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678667578; 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=I7EzeigX3MU3BbNYLFJKoxie1PSwPSGD5D67lfndeIre93TfKrXXCMyKhX3Lqjp6GO u31Tzf/AisNIfsVzCON6LgVV7hOEX363rTOlz3sC/wRy4dvyvpqsW/CHTuJd4M7aQ40n k++oPOv2CU1zcSp2OayGSdZKhrNnstRzN59Zwr/unx1F7nFPoebXeICJbJZsDOZ7EfVR cthc3FBOOFOgEngs94uJzLMPNRyH+zsRsyEleUomaYZRJGqHb0ZVF10piA1TkfnALgem 21P+F9P8cSdVFcu9uuzXhs45eUgT9ZqIFI7R9Qipt3nW5/SbnLV9Rn3WmCLg/iXHNscL vQ9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678667578; 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=WIg5mlLIThJ5pAlP1dH2DIywF7dbRXYsucXApk7RE2sTbTdR3OlXiBg+AVJs1SkFqP EMPJnZo4BvK4NjajHBZIRTt3+4IHhm7nvM7CcfpTT/PkAVcLKkVoQ61OxeYWIjyRYN9K mV0Db0hBu6rX2nTRAwqZhxYXEumhIBjqCmoh7+1SXy75tRfWX3+lFKejjOo6fKr6QC/9 99uoquu/4QBEU5I/O1cjpV3nX1WMbjY6CqiKa26gR1SU/Td+luQTTwnJ+zIjgw/P59N5 1Yi+y2KP6gMQ/bMzimPGmE/nUYPGRcAat1pI0FIthynxoaGqiXgBsEC5NckrOY3aHY/D kQag== X-Gm-Message-State: AO0yUKWEuNyHSf13JYKgWdF2CquXwKPwn1vOMpQdfRCGwMhW5mke08EK 0HmGKYTMUWabI05qI6tn4B4= X-Google-Smtp-Source: AK7set+qpzRPhyUfB1eNB9p56L93VyKvt0i2bE2GcmA/ZK96F2Zw9heidoO/91zXa6hF/HaonF0BCg== X-Received: by 2002:a17:907:841:b0:924:efbb:8a0a with SMTP id ww1-20020a170907084100b00924efbb8a0amr5318105ejb.48.1678667578647; Sun, 12 Mar 2023 17:32:58 -0700 (PDT) Received: from [192.168.2.2] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id x20-20020a170906805400b0091ee4923bb4sm2736259ejw.51.2023.03.12.17.32.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Mar 2023 17:32:58 -0700 (PDT) Message-ID: Date: Mon, 13 Mar 2023 01:32:57 +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 v8 22/24] 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: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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(-) 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; } -- 2.20.1