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 5F9A8C433FE for ; Thu, 3 Nov 2022 06:37:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 27FCD85114; Thu, 3 Nov 2022 07:37:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=edgeble.ai 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=edgeble-ai.20210112.gappssmtp.com header.i=@edgeble-ai.20210112.gappssmtp.com header.b="JjWiITQO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BACBC850EF; Thu, 3 Nov 2022 07:37:05 +0100 (CET) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 2D225850AC for ; Thu, 3 Nov 2022 07:37:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=edgeble.ai Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jagan@edgeble.ai Received: by mail-pj1-x102f.google.com with SMTP id d59-20020a17090a6f4100b00213202d77e1so4330284pjk.2 for ; Wed, 02 Nov 2022 23:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=edgeble-ai.20210112.gappssmtp.com; s=20210112; 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=sp4eBrvp0kJYuP18z5g4eRJmwGgUTuy943bru1KfzR8=; b=JjWiITQOLonZQ/kmgxnfxxmbEtJLWDracrZGAksvYFdtdCH5FlzxzXJ3jikX0UAvtv PZJTDMnpOcOuDZhw45alGapg1dOnaRkC3gvMuwWLvjuvUs4cEhutvjnFu+Hvr8lCNkKT hcUxAq0SWB2DpllG7YEUHHXdshiZya/e/9QZhalsOhs6EFoU3K/KSpCgFGECGl9MLDC5 5VMTVgTVgXIooKznYzTV2si3yAF+0AOpx6C2GC+CFkRKGkwD+3DPXD8DJX9lLA1vBAjs XjQg4o8YuxZgAu0sZ1FYxv4ZHRYJwYX0GJMw6CZja4obm3079/nnw/5pEOTygdfL+nbj 89gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=sp4eBrvp0kJYuP18z5g4eRJmwGgUTuy943bru1KfzR8=; b=MCqAr6KncLhy4jsXxXSPbp2wAbEsAH7EnotFG9M7OdpNWCU8PMWQubCTRaSH2fpPba 3umf14TLkSBW+MAQRm95sdZoWtE1C+1x8w7YN4vS5PHbfqX1d3bBAl7DCws7SAeYUmFQ AUDzl00iTDBFAHg6bJ9CECRZBmrxWBvkGNrN2/DYKu8yCyy4hbFmfCxL97M78U5vcmmM E1fs5IElJYCF1J5O56jN4MCrISyThp8iGTZM/O3wTQnuEeMpjOUWq62GLzrZodgtHRnm krIsVWkZ5b83kgBw+3L1A1g36kBhr+zQGU0GHa/3RHT1Mu9U+iMNoCeRSFdw1iwUwFOD L5xw== X-Gm-Message-State: ACrzQf3KJC4V2Z9Pv8j/NW7BoDO3yL8kbL8zB1zZ1xBGl81ygbJ9COpf jDDaO0ZX3L8S5jndo86/iAphZA== X-Google-Smtp-Source: AMsMyM4TLxLrMFGUxWOSg9LcSxGsXELV2xGMjkKbPziPtwumMgDSzwZoKjQpBdXbnjYr3APq+ewlEQ== X-Received: by 2002:a17:90a:a781:b0:214:2921:41ca with SMTP id f1-20020a17090aa78100b00214292141camr8286097pjq.118.1667457419487; Wed, 02 Nov 2022 23:36:59 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a809:3a79:b5a5:9718:3f91]) by smtp.gmail.com with ESMTPSA id q2-20020aa79822000000b0056bd59eaef0sm9149156pfl.4.2022.11.02.23.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 23:36:59 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: u-boot@lists.denx.de, Jagan Teki Subject: [PATCH v3 08/25] ram: rockchip: rv1126: Control ddr init prints via DEBUG Date: Thu, 3 Nov 2022 12:05:30 +0530 Message-Id: <20221103063531.854326-9-jagan@edgeble.ai> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221103063531.854326-1-jagan@edgeble.ai> References: <20221103063531.854326-1-jagan@edgeble.ai> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.6 at phobos.denx.de X-Virus-Status: Clean Control the ddr init print messages via RAM_ROCKCHIP_DEBUG instead of printing by default. This gives an option to configs to enable these prints or not. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Changes for v3: - collect Kever r-b Changes for v2: - none drivers/ram/rockchip/sdram_rv1126.c | 38 +++++++++++++++++++---------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rv1126.c b/drivers/ram/rockchip/sdram_rv1126.c index d41e043556..34b690668a 100644 --- a/drivers/ram/rockchip/sdram_rv1126.c +++ b/drivers/ram/rockchip/sdram_rv1126.c @@ -3358,22 +3358,33 @@ static void ddr_set_rate_for_fsp(struct dram_info *dram, if (get_wrlvl_val(dram, sdram_params)) printascii("get wrlvl value fail\n"); - printascii("change to: "); - printdec(f1); - printascii("MHz\n"); + if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + printascii("change to: "); + printdec(f1); + printascii("MHz\n"); + } ddr_set_rate(&dram_info, sdram_params, f1, sdram_params->base.ddr_freq, 1, 1, 1); - printascii("change to: "); - printdec(f2); - printascii("MHz\n"); + + if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + printascii("change to: "); + printdec(f2); + printascii("MHz\n"); + } ddr_set_rate(&dram_info, sdram_params, f2, f1, 2, 0, 1); - printascii("change to: "); - printdec(f3); - printascii("MHz\n"); + + if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + printascii("change to: "); + printdec(f3); + printascii("MHz\n"); + } ddr_set_rate(&dram_info, sdram_params, f3, f2, 3, 1, 1); - printascii("change to: "); - printdec(f0); - printascii("MHz(final freq)\n"); + + if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { + printascii("change to: "); + printdec(f0); + printascii("MHz(final freq)\n"); + } ddr_set_rate(&dram_info, sdram_params, f0, f3, 0, 0, 1); } @@ -3465,7 +3476,8 @@ static int rv1126_dmc_init(struct udevice *dev) save_rw_trn_result_to_ddr(&rw_trn_result); #endif - printascii("out\n"); + if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) + printascii("out\n"); return ret; error: -- 2.25.1