From patchwork Tue Jun 11 14:50:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 502 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 74B363F08F for ; Tue, 11 Jun 2019 16:55:16 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id q6sf7885752pll.22 for ; Tue, 11 Jun 2019 07:55:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264915; cv=pass; d=google.com; s=arc-20160816; b=vLvTcxJRmD80jYXwaVG+7sa4wUMZ6h87BFGQsGYQNDV1CbNT+5q/y+Xhegtq2Ft7yg 78U8fhPbnjQZl7vzlGFFYZHrCZjxI46dEqD8hEjZVkEmVgVS6NM/1Av3PtERH9UuRW/n VMoogohqXLatn2K6ewrb9DsKvrlWJ6vRDPdvO6fGshPX3/5BZDV0lvr8+OnehQ0VIGZ7 SdmmVuaDZORoNyBhfRHML8D2qefjYxVMTFckWM3RLYvqoST2oJOqerUSyuDIp8jzp/SJ aluqHSVOT/6vj3WTq7yIbqW/X+TKjV0Ka5Q3V47DqUbkx+Nv4x92S8akuNvBc8D4teiA 5ztA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0vQHU1IENOEzES80AebY+b6k02BOSvUZGAebfGUby9o=; b=nkrJHKpkHCpe+pcDP7N2i5KXOC1brm4Ld1XLwSolOAFrPKtBfLFNzIZjaaw9TR3fqn ekP1l8p5C7oHhbopnbH+67dgypHmZfjcira1x0N15RTwlbeBrY5KD0EFWIVFCn7C5Il2 3LXreQRaSee/7QN2Hx5ilWYFwz5FSPZpRVg7mQpLQNHQGxo0VBDytamzv1VHQT+tUhiw xfqG5RwUzw8/k1TZ+AWeB4XP2XU5pR06r21b26GHhfI9OTcMExvJfmS9p5fIaNdDLQvc JRpbiXcNpYXnuZg2a6gAo0S9sdrNEqoSrI259OVz3LPaM0pZYmO72XU4TUxuzN4PqGHH UhWw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q0cM60yQ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=0vQHU1IENOEzES80AebY+b6k02BOSvUZGAebfGUby9o=; b=g0O2QuDb2uVW60Vdy244Z+nvf0X5lOJ3MOdnlTuCJHETAtYq2Une0MSit0UwuLvsv7 dgvS6J5DmjxprCuWguLnpNpZvKa5MIzRzSGadUJcCJXYxqHuVNAAtgtESSlxf/s20zuh o6V3jcax6zlSWTOOKrvB+qc0JEge2o9ebBEc4= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=0vQHU1IENOEzES80AebY+b6k02BOSvUZGAebfGUby9o=; b=g0PLxGfMMfMkYVGibz/8GZ1B3nhqBgPLt2/6RQhNpUT7Qy+s75zbW+Vzp1O+FUs/sC Uu3zx5W55i8LBjVyQL653NnrzOL0ndDz9WhURPvmifUsWU0sDL59IorX8DQzixe1Vh3d 5WVjk/5u2lXnfY5ikysuDQk3FYCXQibjJOSIawtcF3rAtMaAXoaiO2z3i3EKU52p8wSq HdYRPHFyxYQvQYKhzBcVSJsWQS8hKDO+YALnnWX8kwXwe+S0Uf1p+tyrd806jm6jkVT/ 7UIWdLYcRWU5pI6x066KZ67kKtg/PEdmyEswBBJwCMRuU47lzEkTsuoPKv68syh2LF1D r55w== X-Gm-Message-State: APjAAAXZ12+NKyM5E+dcmil1cIyN4KOhCMoNiU55jZzckvX9hkPvUBak 8frecePnAng3P/jaLNSg02Pk4UHO X-Google-Smtp-Source: APXvYqzRAZxFyMx5mh/5FV4grT8wD1kJOOFgRxxNto2CMUuMzeZwr7XdoFQ165AtsWJ7iisvxWBPLw== X-Received: by 2002:a63:e70c:: with SMTP id b12mr12395379pgi.242.1560264915188; Tue, 11 Jun 2019 07:55:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bd8b:: with SMTP id q11ls2688808pls.4.gmail; Tue, 11 Jun 2019 07:55:14 -0700 (PDT) X-Received: by 2002:a17:902:b611:: with SMTP id b17mr23388277pls.261.1560264914514; Tue, 11 Jun 2019 07:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264914; cv=none; d=google.com; s=arc-20160816; b=uQLvb5BzwCI+kbBphLzXLgEBhyPWxcMcQjyTmtcO+LFzfAjNtLc3dOijhg9W/BZKVc lhYQsr0HOxdtNebXOy1bI1COXfsXb7auMyj92vRKgMLvq2tRdvf9vig9Rg5xBMzW5CaA R/LFdgdfLdxGgpNK17kkVA1EOekBimIpttTLjAGhlG4Db6rbOPclSCqV2vmkqREWLgAb kEfrEHJfQIeUrc4pldZKFEbJBcndCoMr1OBkTzLg1hNQDTkUIulGNwcRfWftCIVhxBdQ z6Ax+6JRzqQxAQWHzh7Wpj0BoClvC3o6TrJfIpqKLrL3lkuDPia3uh06mvU3c8Hgyal+ sgKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DjIAVTpqi9cTAQJKYzj4NaFyCm4Ruk4KU5YCL5Br3is=; b=eILTo0PXSMbVFKYSaJwm4BfKwdMhAzX7o6OJtrzS+2TLaO2AQy7SsxuzPP89NkK4ky qgXl3UNgEGLvO4BkKrGQr5vZe+bE1IPywCmwBXdNXrZz+GwPMtVuF4CENwyr/aJA/lPu D/e1hgPRCv2ong2+4ehCgqESyhDlUo2uaYLn688KScH/K7xYq+1DZbQCmMQ2lWTOLkjM 1Wo0LRLlDF9pHUSp4zjowD3l1zqpL++VEes8fF5mJoT8lbtu2Fj1k5zZojxnd7nUxgWZ SP+35NeR/c23JdM6W5XD+pmeHEkhmM19qqlh+BrP2UQjK3pDsixMuUWc3FWolS8cXuhx HYyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q0cM60yQ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 123sor7592830pfu.0.2019.06.11.07.55.14 for (Google Transport Security); Tue, 11 Jun 2019 07:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:aa7:956d:: with SMTP id x13mr41478496pfq.132.1560264914236; Tue, 11 Jun 2019 07:55:14 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.55.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:55:13 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 51/92] ram: rk3399: Enable sdram debug functions Date: Tue, 11 Jun 2019 20:20:54 +0530 Message-Id: <20190611145135.21399-52-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Q0cM60yQ; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This would help to debug the sdram base parameters while debugging existing chip or while supporting new sdram type. It require explicit enablement of CONFIG_RAM_ROCKCHIP_DEBUG for showing the debug prints. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index b658d7d1ab..ce38f72374 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1254,6 +1254,8 @@ static unsigned char calculate_stride(struct rk3399_sdram_params *sdram_params) } } + sdram_print_stride(stride); + return stride; } @@ -1361,11 +1363,14 @@ static int sdram_init(struct dram_info *dram, debug("Channel "); debug(channel ? "1: " : "0: "); + sdram_print_ddr_info(cap_info, &sdram_params->base); + set_ddrconfig(chan, sdram_params, channel, cap_info->ddrconfig); } if (sdram_params->base.num_channels == 0) { printf("%s: ", __func__); + sdram_print_dram_type(sdram_params->base.dramtype); printf(" - %dMHz failed!\n", sdram_params->base.ddr_freq); return -EINVAL; }