Message ID | 20190716115745.12585-23-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBE7YW3UQKGQEY4G2PIQ@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 724B83F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 16 Jul 2019 13:59:16 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id q11sf10031917pll.22 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 16 Jul 2019 04:59:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278355; cv=pass; d=google.com; s=arc-20160816; b=eK9gisbpjkjGQrNFcvlF+Bc/OKf/T+LPjtpq/F7KrGsHnvcsBMGncRYD5fEYyElbXg CPC6GMbEWJrcyNs/ujo64xz891MloaY+kp1eGxbSMbVLWSU0a7vHsw0j8abhLL7gptV2 5wFeZc/Er0uX2cVOqzeJs1l5WxsQFaRvswMoXF3w61bw8YF7vJB3rZWMXxLwPH6s106/ WdS7QFHfde5vD+sET3T+H3LG8Awc+UJ7BRTtuJKYLCShQclpjkHdlVXX8Lzz9mcYZ3lP 84PQajli2Je2C3EKa8DT+jYApuXoHS9+SfEe2349F6TJxL5lUNs/Rmi9tJ+Snq6e4SWA Sz3Q== 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=ut3MFIj7Ofa+ooZFS+4LLeXUzTr/ZlYfWxnlEa9JsGU=; b=Kl2tx65u6rdn2I8BW6TLkZYy7fvF/G3q02YemCyojFto95YdJ//zay08r7X1+nd4PS Sew0YGCzqP1InvghM3zpG4FxBCusRTqlgVLydH6C7Dnj4CdZE+TvM4M0dp2aAvBG8Ywe AiipIpdGg/FUS25fPUTEnJDxq0ut9NBFQPR/QfOGHAmN2d3LKZBC1DqRFHkBtexUHjka eFNvqkHv42SVVmqyLky8yF3Mc86NNzYa5cHS35mg8n4LMHiV7Oqr3/dBl+B+ZGWFBduM LjNt61ujEETbBclI/auyNBqAvnGywnNxrhXc99UB+zNO3dK/mri81OhhfTwKOus5ELMv yzBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DMoTToEV; 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=ut3MFIj7Ofa+ooZFS+4LLeXUzTr/ZlYfWxnlEa9JsGU=; b=mlXqOeVLaTdmfr4gl7VyXux1kiNxD81WEn0rGIsQBa6tWiQFuGAk1TM7kurOFVxRlc dprXzIxngB5EEf40WWJA94mLSIAmdsZhrcQsKpUxCKEJ84xi3DXmKh4z/k16CgZTnG1b bObPlRBbKyAHZxZaWiudUyBlH1/w/WrEFSbTQ= 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=ut3MFIj7Ofa+ooZFS+4LLeXUzTr/ZlYfWxnlEa9JsGU=; b=Jv/S49W3e2WwIcWxHM/HGMYvAuYQtyMehV/PfWcNHt8TT7LxG4Y8w1UuuPdP3fgATM iCVoBzx2bWt8Cu9oWrMs5XYIwVLI3xKpCR59GQo2V6uMuYmP2THUJy0k/jc/KceTf4i7 kWIQLryvk9hlZm0D6JdVJ4NvGj+HCAt8zqqjOmqGWdeszbbglkoaStv8c3Fp620jFdXx 4tfc+ll7Kx+flsJOi9MvSSHe8Iz89cixMYKbOT7JpWGvBoWX8SAFCm5NroyV9UsEKcdu w323BpgML0IP7F189jsSYJ4bmN4NZynyh4GiuGr18CZeqQUMfheXJ4r0ToVSChr86vjC mMtQ== X-Gm-Message-State: APjAAAWj0f0uPTyMbEd4B0CtWsFbZAatFdq/eie8LWFeDKlILi19Htdz lORNPhaSE9zIg77PH+aV+zL5Rrg4 X-Google-Smtp-Source: APXvYqwodqAu5lcBoGwTIfSOenq5FeCjteWEjgSe4d6M2AFABL7o2YrvUgH08hWSf3OWiJnW957r5g== X-Received: by 2002:a17:902:f01:: with SMTP id 1mr34596405ply.170.1563278355307; Tue, 16 Jul 2019 04:59:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:e444:: with SMTP id i4ls3433575pgk.13.gmail; Tue, 16 Jul 2019 04:59:15 -0700 (PDT) X-Received: by 2002:a63:8a43:: with SMTP id y64mr32765502pgd.104.1563278354911; Tue, 16 Jul 2019 04:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278354; cv=none; d=google.com; s=arc-20160816; b=0xPsd7q+589HRk8QTrXIQiKNHb15U/ygx0OIZiCumySeK2zs1SUbNZcJYHtlPwe0kR tMvBgZ5OgrSzSnTtZX2vfLOpGIYLZACaqtuPNmChejUSHYEO/G2zcNFgPYN83cvePuxf NAoctTj2/7XQaL1umehGR1HBk9l2+lUPT6EFbsAR3l4xGIsMN/9wTUA/lDuNXvdFHFxT HslOIMTedsOQjVbA+rIoEaO2HEanZ3G4606eHH8o9GGsAmYO+lCEOjky6lpjxo96fdR2 BYk7qUrJsTqkZDYrJq76pzRnZp2BwlE3r8u6YvuQjpHO255/lR6iKJ4wERUhIX5NYOL/ eHqA== 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=aylTmfkqtJF+7tnDVUrQIwHiwDYUMKBZKCeVtVEHmj0=; b=pJKidwldYgbiyrtKVEOxHcnCHccTjngbK3i6bEyxwH4IdWTVN2Tk+T7ykj+54nijdo 94Th3OBZJl0rC7naNsqSCA2JIBde49d52wuxXGqir6vfU+RXZSv3lDH82f4jfe8ix7uf aj2Tr8nL0ndCe1ytQ7WoBS/Au8N+dqxGwdOsRWB45FNTGcjzSf85rzP5oQrpoQ5z0RWl jGiZPR+5g3k+EHUpOUtA3Y7V5d0scTSo7vpdHw+LSDUT96rCL/MXKhbpndqp77pBwebh xpeglyvNCHYMYturNxXVb2KdUitqBTC+oKFGg76Po0Z9KUVOShmCyHweWJ1gAakdBWdQ dFzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DMoTToEV; 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 e8sor24335773plb.48.2019.07.16.04.59.14 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 16 Jul 2019 04:59: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:a17:90a:380d:: with SMTP id w13mr35066590pjb.138.1563278354606; Tue, 16 Jul 2019 04:59:14 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59:14 -0700 (PDT) From: Jagan Teki <jagan@amarulasolutions.com> To: Simon Glass <sjg@chromium.org>, Philipp Tomsich <philipp.tomsich@theobroma-systems.com>, Kever Yang <kever.yang@rock-chips.com>, YouMin Chen <cym@rock-chips.com>, u-boot@lists.denx.de Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v3 22/57] ram: rk3399: Add lpddr4 rank mask for wdql training Date: Tue, 16 Jul 2019 17:27:10 +0530 Message-Id: <20190716115745.12585-23-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=DMoTToEV; 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: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
On 2019/7/16 下午7:57, Jagan Teki wrote: > Add rank_mask based on the rank number for lpddr4. > > This would keep the wdql data training loop based on the > desired rank mask value instead of looping for all values. > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > Signed-off-by: YouMin Chen <cym@rock-chips.com> Reviewed-by: Kever Yang <Kever.yang@rock-chips.com> Thanks, - Kever > --- > drivers/ram/rockchip/sdram_rk3399.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c > index 8ecc3a1b74..711477188e 100644 > --- a/drivers/ram/rockchip/sdram_rk3399.c > +++ b/drivers/ram/rockchip/sdram_rk3399.c > @@ -925,7 +925,10 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, > /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ > writel(0x00003f7c, (&denali_pi[175])); > > - rank_mask = (rank == 1) ? 0x1 : 0x3; > + if (params->base.dramtype == LPDDR4) > + rank_mask = (rank == 1) ? 0x5 : 0xf; > + else > + rank_mask = (rank == 1) ? 0x1 : 0x3; > > for (i = 0; i < 4; i++) { > if (!(rank_mask & (1 << i)))
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 8ecc3a1b74..711477188e 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -925,7 +925,10 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); - rank_mask = (rank == 1) ? 0x1 : 0x3; + if (params->base.dramtype == LPDDR4) + rank_mask = (rank == 1) ? 0x5 : 0xf; + else + rank_mask = (rank == 1) ? 0x1 : 0x3; for (i = 0; i < 4; i++) { if (!(rank_mask & (1 << i)))