From patchwork Mon Jun 17 07:32:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 621 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1240C3F353 for ; Mon, 17 Jun 2019 09:39:10 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id s195sf7207916pgs.13 for ; Mon, 17 Jun 2019 00:39:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560757148; cv=pass; d=google.com; s=arc-20160816; b=i2IX8Xp+AHeVCNixbe4oYkMeUNJ9njoS2MwdmCw2RqsuPOfOIVa7gKuK57PcIHAzYB FNZBt/YTmccFo62IFULgaX14Uu9pC0VvfxLJGdaqmXCoc9z5t80uY8gOVQkjUUC/6Uti LyDGqmQKmx6sNeCiz3ilCN7xIjTyOArSKTlDC5PfKEgllCKPAaYzRSGoKS2n6/fXc1Eq 7NcQyWIfMbsEEhJ3vBBD8qYk7925u6VSeh1Z7MJM+SRRF9w1des1dBykCiTY1ihXQVwC SNacbvupxG+6x6XaMFiRnV72sc8sQyL2sqYzrWE9nTSxkz0GNauR6TmsjJS2tbRWr/4Y H+fA== 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=kv279UzTcFxJ3z8iQuDIdXurehdoCPHWmSeO6ImcEFE=; b=ssDvzY1PZQP7izxtPy566AWiVWIkUnTCjrJ831PaXGkjupC7LhFRGOVbs7Kyvkx529 HVMFNJHQiKcSDBMhyoIti15hbwO91qt+ou9TEhBtv8mDqyawPt8j2Q/3atQJeksW4bIp XjA9lKSvXvneyi2k5LgT/TfJ/zlT+H+ZxzGaki4bn2q1bfcLtQ1yzAQcs8Ca++koaaHt qvGl/AQ6WbVWeGazRXBMUFsPZv+ceiwFX07utRUJbJkTJiBAIDAXOHRlOKKNKmgVNl9A hyUNxFTE+IzbwkMWe5/Q9mEoQaYe9jPlRO6S61v5f8d09jMoeV0YMr3d2b3abxgvBEFB IIWA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=b2Pe0rkR; 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=kv279UzTcFxJ3z8iQuDIdXurehdoCPHWmSeO6ImcEFE=; b=LWe3PNng+bdyibONX2JurRJAQad4/HwPKrkbtYkDotyRd9c95b7OoBTdhGVgeWaLhg IintyIVcducCQanvftyFQjWIn3hchzT7FcGQgnPNzqyMKDIV4DsWBBt+hqROrogXA1Ie tWrnqLWyaS6KDIkXwSEHrS04rQIwWCQgVQrG4= 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=kv279UzTcFxJ3z8iQuDIdXurehdoCPHWmSeO6ImcEFE=; b=jLRiDKd29f5xlkea4bd/HzKvaocxhm6Qd6WPA26dR+DAKwrV30J6XcVjnaiWeXRDTH bhAwzv6aCKkSv4658SypBIgmMMTACMqyBkALYHgkMPFAn3t7LaV+AfKVSvTUEuThOavw 2CZA7cesj0KMBd8uJij5L6lRWrs9Mycg4HGciAxqdJwrDSuFuG9arp7ACzRi3Wr4el1Q wzLjIEuc9QjcUBXzDUfcLVdqpR1C70TGvUDPIh6kncJRkPFZV2beSxTJtlstu8x++wHG OOm6z4Ajy8Ek17YKwx7Pmi9mF3Wrr601C2X8vcazHhliaFBjxbIWXOu3GgfOvfAu3iGi tsZg== X-Gm-Message-State: APjAAAW5aiL3y7QOwf0NCK7E5P7C55MTN5w8T7h+L8tjoq8poR0LmeyA aZ3WM2EpvwjPfcFVmAyBV2DeEi5N X-Google-Smtp-Source: APXvYqyT3F9qK5cwfZyBVTkPjLB9dTZi1YNaBTVB7tGM7oLtzXRJDlq4qyHhcZi/FCG/olQ5pPddKA== X-Received: by 2002:a17:90a:db42:: with SMTP id u2mr25009659pjx.48.1560757148868; Mon, 17 Jun 2019 00:39:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:d50a:: with SMTP id c10ls2173620pgg.10.gmail; Mon, 17 Jun 2019 00:39:08 -0700 (PDT) X-Received: by 2002:a63:490b:: with SMTP id w11mr10871662pga.127.1560757148398; Mon, 17 Jun 2019 00:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560757148; cv=none; d=google.com; s=arc-20160816; b=rYHbk0W8583gdas9+4pX/voxxbHufI+0/EoH75bkLaoA9fmoopR6trZDNameRt+kx1 Buiz6NwhlGbIn6w+DGB1qcESzhdLhW75EslfUd/vNjIouSHccnwk2F0PWKl4w0nGY/9E S7V7wRMp9Ju0O6BunKZ+HHnFJPcFPBbVi3CpoBo/7eBgZHIdr//xYzMXfvyLXzzY9CNi 7liwcG3w+qNXSNAXZ924xTvPJsL9XC9WZdDdRu6EeVayF7F8Lt9VSTIE+f0wpzTrsTLo uqZcEwU030asgYYXnKQJN/asC0wMMYUB7vWd3knPzbkIrOJdRryyBAgyVsYpsQySb18d f2aQ== 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=pa89ljwqYQJg7yIuO3/z5Z9hjRvwxKVbcNr1PKxfaZU=; b=uCKgrEOuIKxwygFZQ15O14HqCuc079wulAP7WwX2cbapCoaMqIT0+MkkNZEn8mFSna 6uWqPOZTRIKL2Bpeqt9iZuotXuW47iNReso7LBreoDj8y1czE6Kn25LElm4wlpr+u0N4 pzGMMg4J9iRJcJS+uGh7AiaGF5MkILHtKVzGcodYGXkwgh2UUcaciWHiIvnTBVjdKq0U YLyYpnS6benbhK0klgPtHda+CLfo6N1vG6lpZf+jOI7/MTakXo456Do2csPv1hxzlDuT LZCAGvDIebk7Cqnp+a4O0zlKvy0MUuyI37VHbgK49PZDZ1BmB1Q/bMyBuc7m/KLGAw9f 3ZaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=b2Pe0rkR; 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 v6sor10163853pgj.85.2019.06.17.00.39.08 for (Google Transport Security); Mon, 17 Jun 2019 00:39: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:a63:5457:: with SMTP id e23mr49457269pgm.307.1560757148044; Mon, 17 Jun 2019 00:39:08 -0700 (PDT) Received: from localhost.localdomain ([49.206.203.245]) by smtp.gmail.com with ESMTPSA id m41sm15205998pje.18.2019.06.17.00.39.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 00:39: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 v2 50/99] ram: rk3399: Compute stride for 1 channel a Date: Mon, 17 Jun 2019 13:02:03 +0530 Message-Id: <20190617073252.27810-51-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190617073252.27810-1-jagan@amarulasolutions.com> References: <20190617073252.27810-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=b2Pe0rkR; 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 stride computation for the sdram which support single channel a This configuration available in NanoPi NEO4 and the same can work with existing rk3399-sdram-ddr3-1866.dtsi Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 75df469952..87eda06055 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1208,6 +1208,10 @@ static unsigned char calculate_stride(struct rk3399_sdram_params *params) chinfo |= 1 << channel; } + /* stride calculation for 1 channel */ + if (params->base.num_channels == 1 && chinfo & 1) + return 0x17; /* channel a */ + /* stride calculation for 2 channels, default gstride type is 256B */ if (ch_cap[0] == ch_cap[1]) { cap = ch_cap[0] + ch_cap[1];