From patchwork Tue Jun 11 14:50:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 458 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 322F83F08F for ; Tue, 11 Jun 2019 16:52:21 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id u21sf6642383pfn.15 for ; Tue, 11 Jun 2019 07:52:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264740; cv=pass; d=google.com; s=arc-20160816; b=B4mIgs1H84o3zGk1lihk/p7sr79L2CVyGMp0qIOi1ItsLGXKfIq24ROV4Inu5Qo9go DKuTOmCnGJHK0Tz8x1jMTvztt8UXx4DQMXuYegGCs2N+0nfydF6pHLJJCUUz8OIF2q05 3gqJFAxDRgwteLliFGJ/nHN3GB9cC9grIIcOA2OPFHuV9he4AE9s7aBtaUfUwNA1K6wo yuuY74MQaCYB4X96dFtyp0aHkIpbnvmt6knW5TNzYGQJ4w8sqr11X/h0DJ2DhKfuW8E+ ntyHXF8HP3FQkPXgvJaWnddOhK+5q00mLml2gR28vvll+Ps5XJ/6DIpFVm6lk3z4r4A/ BGfw== 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=E5t7AQ2NRVU0AWERSJWuGnXdSUcIUqqSpLp3obQ9Oz0=; b=EP7L+AYvLyxsGHMGfGAwBwu/s3cAg6clyIH6QqjOTWNoD6XB7psn+7y7oGT03j4S5V z1GsxjnMPyurlb56v4CRlV8+kpmimPrrIzdy5SCiClY0Yy8jnRzGjLArSmpifNCwiuYR iwIAlxjb8PShNd886fX3CDZ/ugCE7EI+Q+NP51gFlgrWjNbdAOGjGaxJ6YKdDH5HZ7jp 1RTn/YqpEcQP/1dOOlF/VTFm2P4+KjI2ejH64tOHYZSk2ntdVaaXoQrhPWFL20G5OBHd f4UhEMx7FL8EgTkvWWUuIYMXws900FTbwg2U5KfoTKZGvJXZqTwqzHLyj0vDG7ssMT1l bzqw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XGF8MAVq; 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=E5t7AQ2NRVU0AWERSJWuGnXdSUcIUqqSpLp3obQ9Oz0=; b=NHnRiAppvizrYZ/H4rlTGlqOgUD+XZHOSF14jZUTlsVSXfQm+jJ2OS/k/20WTEF+VZ S+eFQzqYtAk6HlM3JHyXuwnvBLtsItT6vt2V6dbhhPwlDLW04J0LQPC6kmYUUPSkOyzO 0lzpeAGB9Q/phuTpK6LgnrARHRKFIRrLH2gBs= 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=E5t7AQ2NRVU0AWERSJWuGnXdSUcIUqqSpLp3obQ9Oz0=; b=dVcrgZvtsjujesz4UX/Iv0krbCtkEWSDvlv4vNQtAe3kE7gCQDnd0s63IFGtr++5fT JlZ7+90gXLCg2BAc9UysWJ7xCQCFzKwvDPL7PkVdQcypzTo/RYQxhMiMDnWrX6Dq9KkB R/0VV0ZnzNHr1fRvS9oSaFPto4cRcF88pZjZ+Sw+MhV8CWICsjMIEwKL1gatDta91yPh V4A+iahFBGJ12X0fWrFlSJVUeot8ozNGh5axNUa3XO3P3u4i5Nh8HvXyH1hKRLxW8562 4AwOjNchrRUmGMTDcIkFuCF1P/eM/W+i29vOc9KOLJpg9GafrVjSluADk11Li0LMh/z/ 6kZA== X-Gm-Message-State: APjAAAUlDUK4vWDKdajbDwPrg5NeFuVklcqNDWcfY41IH8OeX/x97Va3 hZdbd+qqCE9C0E3lonqKvoRy17iY X-Google-Smtp-Source: APXvYqzNLo3QHiLcFO1TMVAZvM3ByWAz1ZVROuZDP1JxeUTKgEdnmMriBwDWev2I0giqv8rt0aPQ3w== X-Received: by 2002:a63:5b5c:: with SMTP id l28mr20227746pgm.158.1560264739942; Tue, 11 Jun 2019 07:52:19 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8c8d:: with SMTP id t13ls4894814plo.13.gmail; Tue, 11 Jun 2019 07:52:19 -0700 (PDT) X-Received: by 2002:a17:902:8b88:: with SMTP id ay8mr11290140plb.139.1560264739560; Tue, 11 Jun 2019 07:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264739; cv=none; d=google.com; s=arc-20160816; b=kPA3DLGOj2Ze1u0Av3zlp6l2QrIyE0InYdlDVEMDp71w9LS9Ehl+QkURjggTrWa6od 9N+pCnMpaf6RSfnMn+HJpGvOZk8800fGFzEm/+6Kovplow/hQhJdzEz3NS8CMa8xhD/o eHmp/pPFji4D7i528Lu3cEDoIc4qDFqPF15M9OvdIHOJDl9WuNa1yDRVGyDJPlaTz0YO n+ml9pz3jZriHXVQ49oZ5gqwCLCrC00cDfsCm3BHaUBqlORQGlsLQQrsQk372SvEn237 Mr28rCPQNeKjtMrZqyVXlQPr5n5pvb4KzhqtJGdrHhHjV1jUMi9i6aTce/k4h+Mz94yw 3Dhw== 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=31IyQhlzrF72eorr3kRy/tlLonilIZgN/KedcGGyBqk=; b=cMHmaCejej5pqXve0HDLowSgGv9FlPrGlDxoWKNGhU4mmF73YOryt6TArkDX3DNFOA SxFLGRPbq5itSJrCUV9oEgXWEKoB01mH4enl9aRYyYNgC5y7M+mvOI8MeYxtuyM+1Jnj 6bqWb55dDH2VquBWC/fuVyCYhruqy5xsFRiGuFPgn8kUv3uIKN4eRDgRioG+sJU5mwaG ldfmpeHXs2vZxqZCTD9EfdWXs/o3KQB+gOF92Fou1LHKDVQNw1e2cnTptklvZpCOIJRU HGBJMsNovq7XN8cdMGnq5wSdO82o4KiTa09z2qRTTz8GiD88TXmWhOnOnQUfPfTZJOGk U79Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XGF8MAVq; 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 n20sor13157146pff.10.2019.06.11.07.52.19 for (Google Transport Security); Tue, 11 Jun 2019 07:52:19 -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:5c15:: with SMTP id q21mr6539608pgb.248.1560264739235; Tue, 11 Jun 2019 07:52:19 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:18 -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 07/92] ram: rk3399: Clear PI_175 interrupts in data training Date: Tue, 11 Jun 2019 20:20:10 +0530 Message-Id: <20190611145135.21399-8-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=XGF8MAVq; 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: , Clear the PI_175 interrupts before processing actual data training in all relevant calls. This would help to clear interrupt from previous training. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_rk3399.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 52633166c1..74392076f0 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -618,6 +618,9 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, u32 obs_0, obs_1, obs_2, obs_err = 0; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); @@ -672,6 +675,9 @@ static int data_training_wl(const struct chan_info *chan, u32 channel, u32 obs_0, obs_1, obs_2, obs_3, obs_err = 0; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); @@ -731,6 +737,9 @@ static int data_training_rg(const struct chan_info *chan, u32 channel, u32 obs_0, obs_1, obs_2, obs_3, obs_err = 0; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); @@ -790,6 +799,9 @@ static int data_training_rl(const struct chan_info *chan, u32 channel, u32 i, tmp; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); @@ -835,6 +847,9 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, u32 i, tmp; u32 rank = sdram_params->ch[channel].rank; + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ + writel(0x00003f7c, (&denali_pi[175])); + for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i);