From patchwork Mon Jul 15 18:28:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 743 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2479B3F08F for ; Mon, 15 Jul 2019 20:29:56 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id a20sf10709317pfn.19 for ; Mon, 15 Jul 2019 11:29:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563215395; cv=pass; d=google.com; s=arc-20160816; b=lOYfXNY4WetMb7mXgsaXB4ZQNbd4MuCTvpK3dYKBElN4sHiXPac4as+jx+2ocN0J20 cPudOwghMF5U2XnrJhyhyE60N4FA8mim2Ko9twiRq039RrKA/roK8zjTK7VDKxRuQQD/ CvioDepnlplcPlZq1S2mGeXTCMnBTyZNiiY3YrbJMtvgvKS5ii8Ptd+SaQ94j+bf+zrq HPj6C+BiXrRNwm1X0lE87xiP7FB+G+1HvhtDtyS8DE2NrhoviiRFGqD/LKCNuMA5lpc+ Y0/RxvTzdXZwJclP5QB3fNI58opVmNnffCQo6IVbpNMwehkr8IvAquUmFrnO16aspGus +iHg== 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=IbbMEV8G3KWcrMIsB461eVNYDJiOhws8Zo+4Hay7xac=; b=etfwfHWnRi3dbGlqxzWqq7lO55cb76NeYRmDdc94kNzRTLg/yb9S83rwpDlXgdMKpz 1e7rtCKG/NRACyq9OOtyf/sclNO5/7SKQvCAHrFBHioRq7EFtplMpBXLQ9gO5nj/BY78 8igI83cki24T2cHnB48uG1kU4LOV06RI2OOEAVt5zN+8wcxyy4tnleDVF+cwMTSYT8TZ Zfq+q7KCco/LH/IrAUztN7V29+le6MpeeiZ6WeK94EWtDfczL7YSFs1reBnZ5Z65YRBY eiKAe2nfskj0LJK+c5v0MxPeUPGU0iGJnXpgtBh9jp11JHK6z2fKZZfvr7nbVdBWKtlA epIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=P2AJyQUD; 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=IbbMEV8G3KWcrMIsB461eVNYDJiOhws8Zo+4Hay7xac=; b=augr9Jb6n95tTCJDTZ15p7RH1B++8c1OXGjx0d3e/VS6GYfFIwTy4/9lkCgMeVsBFF Cbh/TIdODs+wsGHVQvFJG7EbARTFzi8x42ANs0A3sXW682HbRfsuB/jX3k2SfWZujIGA Syj7d1gVaVZ3RW2y943Z3aSUQ8aRSh013Fu84= 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=IbbMEV8G3KWcrMIsB461eVNYDJiOhws8Zo+4Hay7xac=; b=ER8UTIGCrgdWzSdMjCEQy0MnN9RDFSXLhyy3PG/smv26OUYWZjrAQ3YI7WM7A5Cpzr xFyt154arvbvOLR0dVbO2SJR1sNVZU3LSkzTrQy8iJyqLGXQyYCMLWz1+0zWzoGjA2Pd CURiPQbIFDYLKo/99t7U/BIKuXMNY4fZLnZB/xVPJgDvTorOVQ4F0e2JRttPET8gk4Sk BAIPSGlhhiQf62nnd7e8zAMIaSp/9p+u/4FIOnQeawSJGoVL1bEySXz3UZUJJAwlj8Ls 0coBe1iEMfdweYDgXccUryrdzheUQmqNuQhAfuO3ZXUW/MG2VLjf3TXdzCRAI7ObKoDd An7Q== X-Gm-Message-State: APjAAAUX/FJckpV0iNN0SVZEoRNg5Ta3y+Z/BGtM5wlRycrlywgVFknK YI/kqa+n2ATPnkg+nz4nH0XnK66K X-Google-Smtp-Source: APXvYqycNmMFkuStTwqQ2weySYbqq3Gn9rD2K33QYbskzTFHSeykP8j4twCcnDY4GtHsuja8qleDBw== X-Received: by 2002:a65:55c9:: with SMTP id k9mr28854089pgs.142.1563215394835; Mon, 15 Jul 2019 11:29:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:45cd:: with SMTP id m13ls1628620pgr.3.gmail; Mon, 15 Jul 2019 11:29:54 -0700 (PDT) X-Received: by 2002:a63:2a96:: with SMTP id q144mr16737865pgq.116.1563215394348; Mon, 15 Jul 2019 11:29:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563215394; cv=none; d=google.com; s=arc-20160816; b=TanJ0Tw11rWNMRYm2A2NUM76P2OQCN/lX6T8Drn1aEiyq4vCJpAHMglzjmPIO6uHnf c+tmdsGnlMnBrEjmGax5uZ0cC54xWsBfNtCwDsGN0St3E3/c5SZv+dnpryZHUsH2TiAp kYjGkpmEb89snJsXMOcNJ0yrKtxpQ6/re6q7uJ7WGIDxAN37JwMG9/o2S+cGZ+lT/ZhB XUPFiCVRbAJWAnz2frUvFxd0DciYvYTCCoi7WKVZDpu4Sed3sb513myCl8oDT0H5P/lf kBtyiQjJrqRmn+po6W6fqrUDJ9yvPVavB+21CtuEpJhLPkeC0AzzpRV3jDTwEZ7DRd2K e7MA== 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=pIDTnUfr0djUpkT1BNeINgQLdbC0j9OQ9/2h48Y8nMY=; b=T/pVl2Pdp6RBVxcYVfeRdoznWAaOeegtMUWpcRPw0859tfDDNUmOdgUdVCQkiiBFdy 1Z5elFNRXg5nDc2We6vETlxDtriMrXpjdUQeHNY3X/p+3ai0PVLqCf65E5pFZ17zgSHc LMsJqrx4rGQCGsWHX9YXYtS3vt1jx0wh8LKSsUXSelrHDDetJ4VFPCWzKSBClsORO8UD whaIdz0Lox6+HfRiXd6JuCMpjp8L/f0W0njF6pTu8P4utmfbvVqKaYwUca1ELHFpzDo3 yG6xp0ErTwXFH6U0KTxJtiajRPH72Z73KtW4BPZs40MsmO/xvaZjd6JSEZgOr7TYwCrK fgGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=P2AJyQUD; 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 z64sor9504096pfz.10.2019.07.15.11.29.54 for (Google Transport Security); Mon, 15 Jul 2019 11:29:54 -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:a63:f510:: with SMTP id w16mr28980694pgh.0.1563215393933; Mon, 15 Jul 2019 11:29:53 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id y133sm20250075pfb.28.2019.07.15.11.29.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 11:29:53 -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 13/18] ram: rk3399: debug: Add sdram_print_stride Date: Mon, 15 Jul 2019 23:58:51 +0530 Message-Id: <20190715182856.21688-14-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=P2AJyQUD; 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: , Add code to print the channel stride, this would help to print the stride of associated channel. Here is sample print on LPDDR4, 50MHz. 256B stride Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen Reviewed-by: Kever Yang --- .../include/asm/arch-rockchip/sdram_common.h | 5 ++++ drivers/ram/rockchip/sdram_debug.c | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index cfbb511843..b7549f5d8a 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -102,10 +102,15 @@ inline void sdram_print_ddr_info(struct sdram_cap_info *cap_info, struct sdram_base_params *base) { } + +inline void sdram_print_stride(unsigned int stride) +{ +} #else void sdram_print_dram_type(unsigned char dramtype); void sdram_print_ddr_info(struct sdram_cap_info *cap_info, struct sdram_base_params *base); +void sdram_print_stride(unsigned int stride); #endif /* CONFIG_RAM_ROCKCHIP_DEBUG */ #endif diff --git a/drivers/ram/rockchip/sdram_debug.c b/drivers/ram/rockchip/sdram_debug.c index 19e9225c12..9cf662675b 100644 --- a/drivers/ram/rockchip/sdram_debug.c +++ b/drivers/ram/rockchip/sdram_debug.c @@ -116,3 +116,32 @@ void sdram_print_ddr_info(struct sdram_cap_info *cap_info, printdec(cap >> 20); printascii("MB\n"); } + +void sdram_print_stride(unsigned int stride) +{ + switch (stride) { + case 0xc: + printf("128B stride\n"); + break; + case 5: + case 9: + case 0xd: + case 0x11: + case 0x19: + printf("256B stride\n"); + break; + case 0xa: + case 0xe: + case 0x12: + printf("512B stride\n"); + break; + case 0xf: + printf("4K stride\n"); + break; + case 0x1f: + printf("32MB + 256B stride\n"); + break; + default: + printf("no stride\n"); + } +}