From patchwork Mon Jul 13 20:06:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1328433 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=Lxs+H3O6; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B5F772BF9z9s1x for ; Tue, 14 Jul 2020 06:07:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA2D181B78; Mon, 13 Jul 2020 22:07:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com 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=amarulasolutions.com header.i=@amarulasolutions.com header.b="Lxs+H3O6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB5CF81B7D; Mon, 13 Jul 2020 22:07:26 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) (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 2882381B78 for ; Mon, 13 Jul 2020 22:07:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jagan@amarulasolutions.com Received: by mail-pj1-x1042.google.com with SMTP id f16so395957pjt.0 for ; Mon, 13 Jul 2020 13:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kmupqMbziJlPy1JRSkwR5KOsOApCHx7mcVYbKMourXI=; b=Lxs+H3O6c9nN7WEK6upbGJ6oLQhSlU9DZvrTY8Dr62Zi8bguz63hGCPBR2tgKqsai/ e4DpiwvoYk7hNamBSh7r7xAhf46eveJcrja0DRq8OPsesQynxTYmAHMhtQdAZ1vKehbS gd/7p75Ku4V2E7NuT1Y78TYH61Xb9tmXUERok= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kmupqMbziJlPy1JRSkwR5KOsOApCHx7mcVYbKMourXI=; b=Nj2ftVr6q/bGJsjNbKUPAlURegq6zFSwsJHmd/GaKQzAT10vnxYQ9GpOn68Qz1xzrC YItbS8kc2ZqlMDN9QZN9Wqwt+vZtcEzEE39O8WFRfr7b7BCOcZsU7gixgRiXG/gRtShN f5OpwnhVTLhSYHzJJ5+9ZfHhPS15BagAL18tojmS+EZm2Rt6eu2aLySgqA5+ag4Vbx9b JyD8juiEbn1hwSdIPhqYw43a49uwVVvUOsusrcdhhDq7h3fQYUtS0WX0gPbwKzaJTVMW uUvHhQSFs1gXaSbDSLfn7OKu3SgJgXq1hf9Wi809+Emu/6vhK+j3Vv0mQB83L1PfXSDN rSMg== X-Gm-Message-State: AOAM531zSqOZL4G36JmptOmrhu/03R7WJbN4eIR7Vf1YU7A/6TnzTQ1p rIoSwudKdEl07uKIFwbzvGJe4A== X-Google-Smtp-Source: ABdhPJxVLg1/Yoic2XARFbz/lOyiwfbcDqVTmT5hSVN0H3iLBVt9lVZc8Br2+DUs74swyiaX70Qiig== X-Received: by 2002:a17:90a:9606:: with SMTP id v6mr1058930pjo.110.1594670842609; Mon, 13 Jul 2020 13:07:22 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:1c27:6fcc:7acc:eebb]) by smtp.gmail.com with ESMTPSA id e10sm400126pjw.22.2020.07.13.13.07.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 13:07:21 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki Subject: [PATCH 2/3] ram: rk3399: Mark existing prints via RAM_ROCKCHIP_DEBUG Date: Tue, 14 Jul 2020 01:36:34 +0530 Message-Id: <20200713200635.651032-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200713200635.651032-1-jagan@amarulasolutions.com> References: <20200713200635.651032-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Right now all these debug statements are printing on the console to make sure proper dram initialization happens.   Mark them into RAM_ROCKCHIP_DEBUG would be more meaningful and work like before since the RAM_ROCKCHIP_DEBUG is by default yet. No functionality changes. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index d2f3fde236..670925420d 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -2551,8 +2551,10 @@ static int lpddr4_set_rate(struct dram_info *dram, lpddr4_set_ctl(dram, params, ctl_fn, dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq); - printf("%s: change freq to %d mhz %d, %d\n", __func__, - dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq, ctl_fn, phy_fn); + if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) + printf("%s: change freq to %d mhz %d, %d\n", __func__, + dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq, + ctl_fn, phy_fn); } return 0; @@ -2966,8 +2968,10 @@ static int sdram_init(struct dram_info *dram, params->base.num_channels++; } - printf("Channel "); - printf(channel ? "1: " : "0: "); + if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + printf("Channel "); + printf(channel ? "1: " : "0: "); + } if (channel == 0) set_ddr_stride(dram->pmusgrf, 0x17);