From patchwork Mon Jul 15 18:28:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 732 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 DB64B3F08F for ; Mon, 15 Jul 2019 20:29:17 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id q9sf10944484pgv.17 for ; Mon, 15 Jul 2019 11:29:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563215356; cv=pass; d=google.com; s=arc-20160816; b=EeXpRHE/x8jrUJ7t1oEBhTIF5pLEzosh0n2ZukGe+GIq5+hZkkIavY0qzSMEXjtjPl pxwZFMP8VHpSEGZXljlbi84V8uK+dJEmslEFkLd52zY5sakqM7bCPEreyYfVRRX2rn1D S5c+gl9fwMDUUU36osVxsdeOHR3XrYhyxSQoboxgbM/6o2rZwR7UWYvkTYCSUVwD8Lo0 tu8bH4h+hxnanwg10OoTM/aUUCNIc2KRoKweA67owfZFkculHRcNztalAufcjR4Bv2qo yWK6Ta67ssJ8ig1fSN5t2gbTQdFSDM/3WOwWjHC0Hh4FEGYDGnAszrqgiDD80ktQwlYQ bUmw== 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=w+3iRxctKdcWWYg1PznerRoeQeii15N7KJ+SOvb9+Sw=; b=OxqgA4yrMN3mei/f0wl+x1TFn2PsGLeGyhfZaLEFLHdlVoKmLhun6UW+fXTqga+dI7 2sxO2Q/Pm8f1KwgoANaycawE5kwyusgaifV2oLyOT7e/6HhGBibOEKemA5LeIYuEswcH yTvH7Qy8eKMDrHqaanZs1x23kaj8qp2bPN+Ryage5Ek7u6zYeCTQ8UfSOm4RCuaUWXyy EjlypQE9FIHG1Dpv7/dZG9BWRHAhvhpZpAFW09t8RAwk2dtDWKcJbTeBDPlXurbZz5xR eEW1xnM3p/d4wBcU3E9QBtkdKYDrWYrCa1t0ajzrp/nUhEZY226xCvMQdbq6lDvJ7iSL EjrQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Dm2snpus; 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=w+3iRxctKdcWWYg1PznerRoeQeii15N7KJ+SOvb9+Sw=; b=dhOfE98ArtNtVGIHO5DuNH+1jEDeCyBRsoeQm7eelRauPpEyKfDBwbZueMlw0qQfUU K+kIsZXk1hO7pQBwD0DZZSXU76GbzX9CxoGdgQUjG8hCH7l+aFqW2dBjbI2UzRL/pRo4 Nu4IKi7BMBIL/RGaiIZMqpYmYK46VZ/95ph70= 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=w+3iRxctKdcWWYg1PznerRoeQeii15N7KJ+SOvb9+Sw=; b=OGDXDSxrRhsg1jFHkdBCafAlT0Yo6rSWQa3R+Q5e4ZKYPQAPIPoaLu3DXeQgZm0vRg GFtpwGNvhJHPnukCWn8woYDdRDc9FCzkE5pwvSkJTieRNVu0g/yr+QGxG+H2jEEGa038 F4V+xevzIwxr+OkKZBB5eQuh6Ee9E8YtauaoJvOQ+K8Ubi0zwzP1xUESw+5aU7xNYUt8 K1zgtwJpt94Ar4OrGasrv4qhdMipM6HkP/b0Hn0Ly4r16C0pLOWezVPPm2gSQBMElFXc YZPNMKHqHkopX7Eg7ABxqyiscCosfieQCO4ZtWfZ16lYoIEr0MNjXqyNKLfWikicLC8K MVJA== X-Gm-Message-State: APjAAAUADTYSWsVdjMHgU3WwphRJpNLivnRZTCg5EzkV0CpoC8P68pPj 9gPqJUxlrH8BTzJp1q43lDUW/wiK X-Google-Smtp-Source: APXvYqxCAcPY4xCnoloSQ+W51Wk6s9FzbFYCiypBTOhNFv2pH4v2jhQ6+oako+k21K7lEEPs5HgNug== X-Received: by 2002:a17:902:830c:: with SMTP id bd12mr30551520plb.237.1563215356738; Mon, 15 Jul 2019 11:29:16 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:5045:: with SMTP id q5ls2982229pgl.16.gmail; Mon, 15 Jul 2019 11:29:16 -0700 (PDT) X-Received: by 2002:a65:584f:: with SMTP id s15mr12613095pgr.175.1563215356331; Mon, 15 Jul 2019 11:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563215356; cv=none; d=google.com; s=arc-20160816; b=La/HULd+Oi2whd5yPfujmxzyEVrMfUyuPK902020qqJ3vIfBOcp6Q6HZ8T1TMO5iB6 fMeGAw7KNAIf3RU9rPobJ8eA95tHywrWJQi5cz7UQjDKK2L+nwvKSagTKVX65wX401WU 4N0o9idP3zClDxqKnW84INMrdk/ozWCWt6MGV5vCw9XusierxMqOURCzN7R1M9y5kODa yjkFl6/t7eewRBF8K9IiCQC8w4qnOT2SB9LVsk3KlRN6E+4uRqcXsqdGSgY0oxMqqlsw vQLu1+PonI2T4TRbf1iXvrRbST64nlCoIGiMmNhGoS+CkxE+F8YjRw6fpsVruZMb16CY +CYA== 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=DN7dbp/suL0eklOT4cOrJU8AKImrdUW67r8rQCwhI+w=; b=fyrqJG4qBcq5YbLrLVZxcn0pkcUmp+tUQrXUm/UspUmi3lZzN3TfJSDZ1XcJt+9dNV xxwD3/ce2dyUp6X1QhBOpCHmSlluG+CIwR5VKX4YsozSfAKaubZpm9LMrHoBTO4f2QRU GC09TA6jEyKWoX1U+z7qGlLZY0JNz2/d5ww63G+qg/MQc4CmSUocBAQMkrzx3RPQwdK+ r6g1YE/fRLOdW+S7xQ+ggwEuQ6rV/tPPwUpyh/irgZto677fNuLh8Daoi8O8UfU7LONv S6Koyt0L30K+Fz/spf63lpWGxxemU8ZD+GuVbkitbWgEZiqNY8s5rLdNyheMqjIMeTDB Ilhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Dm2snpus; 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 f9sor21817735plr.31.2019.07.15.11.29.16 for (Google Transport Security); Mon, 15 Jul 2019 11:29:16 -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:5998:: with SMTP id p24mr29643545pli.110.1563215356029; Mon, 15 Jul 2019 11:29:16 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id y133sm20250075pfb.28.2019.07.15.11.29.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 11:29:15 -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 02/18] ram: rk3399: Clear PI_175 interrupts in data training Date: Mon, 15 Jul 2019 23:58:40 +0530 Message-Id: <20190715182856.21688-3-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=Dm2snpus; 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 Reviewed-by: Kever Yang --- 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 e9c0fdf2d4..fe26144f27 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -627,6 +627,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 = params->ch[channel].cap_info.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); @@ -681,6 +684,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 = params->ch[channel].cap_info.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); @@ -740,6 +746,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 = params->ch[channel].cap_info.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); @@ -799,6 +808,9 @@ static int data_training_rl(const struct chan_info *chan, u32 channel, u32 i, tmp; u32 rank = params->ch[channel].cap_info.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); @@ -844,6 +856,9 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, u32 i, tmp; u32 rank = params->ch[channel].cap_info.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);