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 0EFA1C00140 for ; Thu, 18 Aug 2022 14:54:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6C5FF84B1F; Thu, 18 Aug 2022 16:53:35 +0200 (CEST) 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="FvEkNigS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 21F9684B17; Thu, 18 Aug 2022 16:53:26 +0200 (CEST) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (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 8845B84AE8 for ; Thu, 18 Aug 2022 16:53:22 +0200 (CEST) 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-x102b.google.com with SMTP id o5-20020a17090a3d4500b001ef76490983so2074697pjf.2 for ; Thu, 18 Aug 2022 07:53:22 -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; bh=HCYq3ocOVLtyQIZ2JIJRgGMH0htZh2Nm1pEIZFGcIms=; b=FvEkNigSWG5RzOf6IahMbY5M0p7yMJ4zPHYfDsuu+nYM1l2K+s5PgLztKH2Yxiki9h t++/zVH7h9Qqit2KgbImbYyqlOf58haBL7Pu6QUFxnFQ2wAAVGlQ2SNitOYwJBKTKElx n4EjoTHVbiGvtEkWeZ6oUDJGtAmBrtVlhWecGAKAPjW2dSy946SoVAQGmCXGn3bkwJvl eWunJ8z2neSLQPSw1pGvIeEZuasiae6RX5MAaCXVxikQm1lU/A5KfJG6pJ7Q4LzKQVml VxjxOXr4TqbsAM7AbolKsyoOWR6p+CKIknwGNhlEFHhVdSbD0KjgYHptzmfDscsy9e4Y HJ+w== 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; bh=HCYq3ocOVLtyQIZ2JIJRgGMH0htZh2Nm1pEIZFGcIms=; b=gcszFPVTTlRuyu9HI128+4HKqReXM7bZ2HwNR0Iutwzrc4DHc8qH3CTGPfSlzsNT6x TAVrhWYW0dXrEHFDyAQnfjrUzFjuqNA6fGBeb89jTisHczeotNpzLb9kT80xAdSPF6WC phd9JLNtITQFqxpQaxHoFJ36ecRKE31oFqXA2PTW5HAqR8DYQIHN7iv9sgQy2jXwNWu6 btwhfRH/7pPmEYpIIlx9DMxfXbVSj1/QGktBOr0pz7IkcLIgSBgXnIYQmADgrJrJ3dsQ vfL8mtEk0ISAFL4CzAr9WgNVgvxVido+2A0IJcmVRdzjKxeCGz6WjRNFzoLd/ZpjxTbS 2bPg== X-Gm-Message-State: ACgBeo3jwCAaJzWAXpNeGFMUVxpNkon6vB0K832U0vwgsXd0IlwywyNq GzqrTthkXUKPTj7FCLhCUJ9XnA== X-Google-Smtp-Source: AA6agR6yzZmOESVOVhGxZxn/+ym3Z2Z7wJe4DXZ/66XRT74Disz06HKtU/yf/tZ1PycBWOBHNc/GLA== X-Received: by 2002:a17:902:7782:b0:172:6a5c:fe41 with SMTP id o2-20020a170902778200b001726a5cfe41mr2947358pll.86.1660834400859; Thu, 18 Aug 2022 07:53:20 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:d1c4:8ea9:aedc:add1]) by smtp.gmail.com with ESMTPSA id i15-20020a17090332cf00b0016dc6243bb2sm1504818plr.143.2022.08.18.07.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 07:53:20 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Cc: u-boot@lists.denx.de, Jagan Teki Subject: [PATCH v2 10/28] ram: rockchip: rv1126: Control ddr init prints via DEBUG Date: Thu, 18 Aug 2022 20:22:28 +0530 Message-Id: <20220818145246.201205-11-jagan@edgeble.ai> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220818145246.201205-1-jagan@edgeble.ai> References: <20220818145246.201205-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 --- 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 9b1c34391e..6fe5b0305e 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