From patchwork Fri Oct 13 10:21:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 115729 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp560058qgn; Fri, 13 Oct 2017 03:27:28 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBysG7FbJB2weVwwEOOnI78W6kwhqH8iB18WZe0jzVY4LnJUhQ/PrgHvSzNW6RzJa7O+o2V X-Received: by 10.80.221.197 with SMTP id x5mr1580161edk.180.1507890447970; Fri, 13 Oct 2017 03:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507890447; cv=none; d=google.com; s=arc-20160816; b=CJAC66bAtwvMhS8s/6G/QYJ3v048RRO7pJMDLw34rApfdiemmbGo1oCKWm+DzguaxB Q+YlXGL4TKwNCqUXc80AYVa9aFvp+AXV7cyoILza7lQObKmB8uQr5kJL+Ewr6If4kz7P s+dOGQKe3JNdq8bxSp8soDqFk1NAknluxzRFLoFwcnRAopoM3eUH+0VP2rR7E8lJQcVS 8mdkvcozfD6KsiE+P3FkOJfBJMJC0edC37HSuBavEkhJhPLfOLvFd9zIUix6v3xKlv8J +DzDg+WpBlJ0Ibc3Iy7DPCA4J0ynBqBvnSA/MyaFO+PPXyJNFr524OW9aUPdIHJ6vPI3 mV/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=45bg38WgcwxjOBijpagusVExPK7UsamezyQc7gkRYxk=; b=v+B8nCQQr02im6usF3uiHIzW4d5gZsJ2iP8ZM3M9JDgLR6ESOVZApcFmpOrjHquttp rGDhWHbOKBvnajORrbjcyd8sh/5/VI19dKHSVdFxTnADk9m+v3HUKRu9QUdc3mYK0cmv gU3c2KPAq7ktJFzFOMBZBBLUXeZszoGwsJwTBY5mYCNhKW0CAyiE/VHpzoqofMpqQIyp 8eV8p65aN2Rjys76VOic2OwVFmT5GTKx0PE1nE2sZguoZFSyB5Gjtv4GzQSma+uBOaFu OS3slMFjjoPLHdK8Jv+CNb/XeFySNukfZB9tQK7PpFnvd+j93F50wtssrd/GzgPts/RV qu1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=RPYQ2haw; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id k10si509717edh.532.2017.10.13.03.27.27; Fri, 13 Oct 2017 03:27:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=RPYQ2haw; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 6ED10C21C46; Fri, 13 Oct 2017 10:26:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 229ABC21FFE; Fri, 13 Oct 2017 10:22:50 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7DBE2C21E6F; Fri, 13 Oct 2017 10:22:40 +0000 (UTC) Received: from conuserg-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by lists.denx.de (Postfix) with ESMTPS id 9FF04C21F06 for ; Fri, 13 Oct 2017 10:22:39 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id v9DAMGx9009903; Fri, 13 Oct 2017 19:22:19 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com v9DAMGx9009903 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1507890140; bh=Q2vW/gsUgUbPiYbTLDWHFmIo+kFR7ZlE4ZbzIp2RMx8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RPYQ2hawGnRt3aj8HUpgo8eNa6v0rNq0M1Ap/jQ9fPgaNgjG60iMMo33fH0QX94uc oGBBdLNSllSOs40T/Zvgotxu2kQ3UhaEmFam92eymWu62x8Vtb7ipmG10RgvKvd7oy 9ISje0pBGB4xlV1PQsrHN9NNWbBv5XV9eMmpUMSVAyc/E/toxwHJrlTd21NZRdysT6 IZqytNyAVyo82NireJmKouNt/slnP9/TbjVh0/V+FSqPMQm/bN5U789AiGq+tCkeZm VaqibRIeBaDCy4JGBQaJnkLaKkCYzCTd+mjjhDUn5dhmtanFsQRHZSneY8hsT0Y/hn A/Uf5UG/FLkhw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 13 Oct 2017 19:21:55 +0900 Message-Id: <1507890129-1543-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507890129-1543-1-git-send-email-yamada.masahiro@socionext.com> References: <1507890129-1543-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 06/20] ARM: uniphier: use pr_() instead of printf() where appropriate X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Replace printf() with pr_() to specify proper loglevel. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/arm32/psci.c | 4 +++- arch/arm/mach-uniphier/board_late_init.c | 4 +++- arch/arm/mach-uniphier/boot-device/boot-device.c | 1 + arch/arm/mach-uniphier/cpu-info.c | 7 ++++--- arch/arm/mach-uniphier/dram/cmd_ddrmphy.c | 4 +++- arch/arm/mach-uniphier/dram/cmd_ddrphy.c | 4 +++- arch/arm/mach-uniphier/dram/ddrphy-ld4.c | 5 +++-- arch/arm/mach-uniphier/dram/umc-pxs2.c | 18 ++++++++++-------- arch/arm/mach-uniphier/dram_init.c | 7 +++++-- 9 files changed, 35 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-uniphier/arm32/psci.c index 3ab101a..efe7419 100644 --- a/arch/arm/mach-uniphier/arm32/psci.c +++ b/arch/arm/mach-uniphier/arm32/psci.c @@ -7,8 +7,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -91,7 +93,7 @@ static void uniphier_smp_kick_all_cpus(void) } if (!timeout) - printf("warning: some of secondary CPUs may not boot\n"); + pr_warn("warning: some of secondary CPUs may not boot\n"); uniphier_cache_disable(); } diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index b9a2cbe..6849b3d 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -10,7 +10,9 @@ #include #include #include +#include #include +#include #include <../drivers/mtd/nand/denali.h> #include "init.h" @@ -92,7 +94,7 @@ int board_late_init(void) printf("\n"); if (uniphier_set_fdt_file()) - printf("fdt_file environment was not set correctly\n"); + pr_warn("fdt_file environment was not set correctly\n"); return 0; } diff --git a/arch/arm/mach-uniphier/boot-device/boot-device.c b/arch/arm/mach-uniphier/boot-device/boot-device.c index 0f93926..2818b50 100644 --- a/arch/arm/mach-uniphier/boot-device/boot-device.c +++ b/arch/arm/mach-uniphier/boot-device/boot-device.c @@ -7,6 +7,7 @@ #include #include +#include #include #include "../init.h" diff --git a/arch/arm/mach-uniphier/cpu-info.c b/arch/arm/mach-uniphier/cpu-info.c index 90ef411..bf41d05 100644 --- a/arch/arm/mach-uniphier/cpu-info.c +++ b/arch/arm/mach-uniphier/cpu-info.c @@ -6,9 +6,10 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include +#include #include #include +#include #include "soc-info.h" @@ -59,11 +60,11 @@ int print_cpuinfo(void) printf(" (model %d, revision %d)\n", model, rev); if (model < required_model) { - printf("Only model %d or newer is supported.\n", + pr_err("Only model %d or newer is supported.\n", required_model); return -ENOTSUPP; } else if (rev < required_rev) { - printf("Only revision %d or newer is supported.\n", + pr_err("Only revision %d or newer is supported.\n", required_rev); return -ENOTSUPP; } diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c index 873dad2..50f0dde 100644 --- a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c +++ b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c @@ -6,7 +6,9 @@ */ #include +#include #include +#include #include #include "../soc-info.h" @@ -297,7 +299,7 @@ static int do_ddrm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) param = uniphier_get_ddrmphy_param(); if (!param) { - printf("unsupported SoC\n"); + pr_err("unsupported SoC\n"); return CMD_RET_FAILURE; } diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c index a71f704..0283eda 100644 --- a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c +++ b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c @@ -7,7 +7,9 @@ */ #include +#include #include +#include #include #include "../soc-info.h" @@ -267,7 +269,7 @@ static int do_ddr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) param = uniphier_get_ddrphy_param(); if (!param) { - printf("unsupported SoC\n"); + pr_err("unsupported SoC\n"); return CMD_RET_FAILURE; } diff --git a/arch/arm/mach-uniphier/dram/ddrphy-ld4.c b/arch/arm/mach-uniphier/dram/ddrphy-ld4.c index c20730d..ba3d314 100644 --- a/arch/arm/mach-uniphier/dram/ddrphy-ld4.c +++ b/arch/arm/mach-uniphier/dram/ddrphy-ld4.c @@ -5,9 +5,10 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include +#include #include #include +#include #include "ddrphy-init.h" #include "ddrphy-regs.h" @@ -41,7 +42,7 @@ int uniphier_ld4_ddrphy_init(void __iomem *phy_base, int freq, bool ddr3plus) freq_e = DRAM_FREQ_1600M; break; default: - printf("unsupported DRAM frequency %d MHz\n", freq); + pr_err("unsupported DRAM frequency %d MHz\n", freq); return -EINVAL; } diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c index 8068ef1..fccdb98 100644 --- a/arch/arm/mach-uniphier/dram/umc-pxs2.c +++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c @@ -8,11 +8,13 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include +#include #include #include +#include #include #include +#include #include "../init.h" #include "../soc-info.h" @@ -134,7 +136,7 @@ static int ddrphy_get_system_latency(void __iomem *phy_base, int width) } if (dgsl_min != dgsl_max) - printf("DQS Gateing System Latencies are not all leveled.\n"); + pr_warn("DQS Gateing System Latencies are not all leveled.\n"); return dgsl_max; } @@ -149,7 +151,7 @@ static void ddrphy_init(void __iomem *phy_base, enum dram_freq freq, int width, nr_dx = width / 8; - writel(MPHY_PIR_ZCALBYP, phy_base + MPHY_PIR); + writel(MPHY_PIR_ZCALBYP, phy_base + MPHY_PIR); /* * Disable RGLVT bit (Read DQS Gating LCDL Delay VT Compensation) * to avoid read error issue. @@ -315,8 +317,10 @@ static int __ddrphy_training(void __iomem *phy_base, u32 init_flag = MPHY_PIR_INIT; u32 done_flag = MPHY_PGSR0_IDONE; int timeout = 50000; /* 50 msec is long enough */ -#ifdef DISPLAY_ELAPSED_TIME - ulong start = get_timer(0); + unsigned long start = 0; + +#ifdef DEBUG + start = get_timer(0); #endif for (s = seq; s->description; s++) { @@ -344,9 +348,7 @@ static int __ddrphy_training(void __iomem *phy_base, } } -#ifdef DISPLAY_ELAPSED_TIME - printf("%s: info: elapsed time %ld msec\n", get_timer(start)); -#endif + pr_debug("DDRPHY training: elapsed time %ld msec\n", get_timer(start)); return 0; } diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index 2213685..e9672d2 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -10,7 +10,10 @@ #include #include #include +#include +#include #include +#include #include "sg-regs.h" #include "soc-info.h" @@ -264,8 +267,8 @@ int ft_board_setup(void *fdt, bd_t *bd) if (ret) return -ENOSPC; - printf(" Reserved memory region for DRAM PHY training: addr=%lx size=%lx\n", - rsv_addr, rsv_size); + pr_notice(" Reserved memory region for DRAM PHY training: addr=%lx size=%lx\n", + rsv_addr, rsv_size); } return 0;