From patchwork Mon Jul 15 18:28:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 747 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A01253F08F for ; Mon, 15 Jul 2019 20:30:09 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id i27sf10730485pfk.12 for ; Mon, 15 Jul 2019 11:30:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563215408; cv=pass; d=google.com; s=arc-20160816; b=C8k/AeZ7mqj0N3sIPW/c5C4t1p71TzSnTQBvlwI42IQGPsE3WXzfm9FVmwcR2CWIo0 FAu/DX2yKDZzjbn/eDMztiiJgnH1tnIbipZDKCaZ6n4Mj1e13GExe8vhorGpvKSbXb0E B/Qaphof3wH36m7Jg9cuvOwoXK7Uz0A1t/2ksgFnwsOLij81hYTRigGBV16Y4pA08dXG 7t5H6KK+22j5d3DDHzfWzyzF+fVnDbAZd0WOJRHxiLDg3cmA6LuPX91yD+FvO8RMOEVf m1o0JGwmS4HEpDWk9fdjFyxg0KQzVh6DwZP72sOqruRAkS/LEHVzHMPkvuIpV+kiwF9u jyug== 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=h87ijcFiBhp5Jw4Wce6E38TbnFGcKb5BEszZZ/vOSQM=; b=OjkxCwEezY5+DZcqFoP8EEdXvcjbU2aeOsXQ41SCSRMrox4K0t7Mq0t1U2857WVma+ 8nEBNVJmSAVPrsQ6Td1OOgl8b0gvDUV9ia2Vj/xZG481F89aZZHXubnrJE56aRjSLpO6 bRoq1K7StYISRmHXFe+19+FIG2SFut9ZJQYKSw6vjy6/brn/LPcmGubRVzQWh5YsQ51M bnO3pmEdkuMUemDdZ3ZJufdlIoiH/FsDxn+rp/LjEux/Q4FrtNkAaCQF48am1MNSS/cQ aJnnWZhCh5uyCB8NyvJQvIQbaHFRQeDoNzXH0v1EF4Yj0zdzm2LZ/cBrfgXAw9bte3r6 mkoA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rvikxEPL; 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=h87ijcFiBhp5Jw4Wce6E38TbnFGcKb5BEszZZ/vOSQM=; b=gHTx5NeI4hQiG5hj7H3Ooqt3wxvidI7b2qfKSTvvc6YMChCnuuy12SE9QJhTc2bVRv yPs/hieyfDAY+hXInur0ssNJbaUZEUgD44aTRWwbYrOVhcEvW231Bf/eFpoGFqB15auY sXdhL0zVsSioxXILpmomOTpAgHUefBQiV3E9Q= 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=h87ijcFiBhp5Jw4Wce6E38TbnFGcKb5BEszZZ/vOSQM=; b=Mm9J8d8Pt3C+fJNrr1JDiPcAxcAW2cIFn4hvKHknAg7BhPb42hjkRpsYEc1BHS5hbr dcOu4SYkNIPMD/6GZk6HJNPBWQ3Y9gGR196aXDvwmqBKo/NpabFyBrNALn71LtmvLVEH vrWXFouRWUcbHFSztRHeEbc69soSlGTnTwu7DsJRk0PWPqLrAqn6CA4GmB1q8ghQRnvU /d4vjczrGwhNYBEy0kH+HAAHcEhytaPpAlWxs1CPmpeE0bgYXek8E6m4M+NcJyyJzux/ lSsFSm4Sd4TYIKhpMuMOROaJL7vHLrDwPqba3a8mqEqEjYAbn3N89tWgFBqUvFjcjoPV yacA== X-Gm-Message-State: APjAAAWYiE2oUT/hlKQvI4eNDKeRQG/ELO9yzmz1scgMi7oMl0jSIXqg fW5VlZ8n80v452cVcx/qFRlhO/ee X-Google-Smtp-Source: APXvYqwUBkzupytpg/JzK8K+eQ64MqjP47aA2qVhmR+gHpYm++H3zXV9gn9xJ7J8SVfgAg3u2AhnCg== X-Received: by 2002:a17:90a:b903:: with SMTP id p3mr30354464pjr.79.1563215408479; Mon, 15 Jul 2019 11:30:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:db53:: with SMTP id u19ls6196923pjx.3.gmail; Mon, 15 Jul 2019 11:30:08 -0700 (PDT) X-Received: by 2002:a17:902:2868:: with SMTP id e95mr27969892plb.319.1563215408193; Mon, 15 Jul 2019 11:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563215408; cv=none; d=google.com; s=arc-20160816; b=QsiD0UEnDSSgONtMVFyQASus3uJUggqFrSCm3jBSM5Vf+I/xA/HbtS9hNRY3oPU1Ap ErZL0pBVrE2n/02K82VTEcp+Yg7dHwbS+nGYp7LIqyf9JyvB5uPR55/w9iZcDpZxo139 un86WmYmgVevZnW4psw5t527D9U+N2jni8eFJLB6mUBp55Meci7vGL8pU63s0ynrXIv3 3AwQN29PfiNkZf6gW1f3psuEIhn7E41MZY9Rt5SuS47TZja5vvQ9Wxe6bRTERj+RfXDz uG8pm5/UI/3Fe2Jf/lAnksAPjCcQtEwwX99pDQhdIodmieGOWeafQSekJDTlwcNhftCQ 8YTQ== 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=gYf4E6KmEJMpnMow4hpC6iE9+FOQ3+Z1CgoYtUkZWOg=; b=j9dcAI7uAU6dRo3CXqwLV/wBvwFMN5MduoX0glmaZi4AG57Rwth8wlYlE6DKKQBqwJ 0PNmfa0ccr5FciT/Mz7SWx43uixnqyEmFdHM8KTFQQJOKOcpGS/ZwteXwO3r/6aG2el6 0Zw+M10h09+3CoyXENJLc1xRQwlD+9OzDckByU1Zxb84HvtW+kYzvwnYGHRjnJ8oS7G+ hrW57gyKoY5bx0XvHtKabMW0WzMs2oZwUoDXw8fKNQcy3V2rc3iaDQf3PQkhMa9r84fK kpZn63KWsgUD8bL2CrsILuuc239A/GuH0YqMdTaCge1gabFixSTDcUf14D3+9cvKGiO3 yAOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rvikxEPL; 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 v10sor21998266plg.28.2019.07.15.11.30.08 for (Google Transport Security); Mon, 15 Jul 2019 11:30:08 -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:a17:902:b608:: with SMTP id b8mr30342008pls.303.1563215407898; Mon, 15 Jul 2019 11:30:07 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id y133sm20250075pfb.28.2019.07.15.11.30.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 11:30:07 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 17/18] ram: rk3399: Enable sdram debug functions Date: Mon, 15 Jul 2019 23:58:55 +0530 Message-Id: <20190715182856.21688-18-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190715182856.21688-1-jagan@amarulasolutions.com> References: <20190715182856.21688-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=rvikxEPL; 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 Reviewed-by: Kever Yang --- 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 b83955f94e..9a60c24135 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1251,6 +1251,8 @@ static unsigned char calculate_stride(struct rk3399_sdram_params *params) } } + sdram_print_stride(stride); + return stride; } @@ -1357,11 +1359,14 @@ static int sdram_init(struct dram_info *dram, debug("Channel "); debug(channel ? "1: " : "0: "); + sdram_print_ddr_info(cap_info, ¶ms->base); + set_ddrconfig(chan, params, channel, cap_info->ddrconfig); } if (params->base.num_channels == 0) { printf("%s: ", __func__); + sdram_print_dram_type(params->base.dramtype); printf(" - %dMHz failed!\n", params->base.ddr_freq); return -EINVAL; }