Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp762078imu; Tue, 20 Nov 2018 06:37:06 -0800 (PST) X-Google-Smtp-Source: AJdET5fsa20sftv8tstF4S7jufyi/FdZwT1qnmToMn24Unrb0A4Il4w4r250Y/P5vd02yxIA5wUw X-Received: by 2002:a62:2606:: with SMTP id m6mr2353181pfm.133.1542724626622; Tue, 20 Nov 2018 06:37:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542724626; cv=none; d=google.com; s=arc-20160816; b=HlxicM2tq5FrlhB9jwvM/q1cQpCQb/ubL0HeYchURfYxGGvuOnR7Y+jTRIQHeiCYiv i7HhaofPMip4FF4jAJlQ4Q3NH8RulE8jGtMJLtyvbuZFq4bT9zgGE6BPsnOYsSFbF54N 99O5FRlOvNH+GLz7Wby7o2KptQ/RtzZh/jRwYvYFqC5Y0Rj8vAiiYeo4/cy8WRGRB2nr y7tvDLqnxYAEJG7/DfLIcqtdBOjS5X7K+yHyW/3Y81sGAOiOHduyInmZuTA3aH/GK36d HsgWsv8H1wOS4GA9iqeugQkJ6WE78/ShJ1whY7UVHZV2aLgrG2+cdhc2qk8LLFT5TD/Q G6Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=b8vpB+Yw9fs+DC+VhgumihtidglLQIb7zZUQb16xyFc=; b=tSzJRS3JIdqj+yxwVmW75J7SmMXm5syotjyDgmirAA24xIceLZncI3rdL7O6KjjFQq TvZciC+6iiy0SIvfg6glSnQLJNIzB6ad5VREPVwCVspsB0iIk4coqsKC78gXe5Og0QbG yVB685QWwV8ca44loo++dHFziwJggmbdPXPk6W+hqp3kK5lkZ/dNNQkQz9EAKArUMTvW ffGS0sfKfAGhPIRFv2//V/PfcfJX8cV5eQagmIwiOZu8q5mMH8BJEhlLze60TDIvkyIL MWDlD8uNWCogio/snWQLIxqKbZS3BGmqs1ZqQA+mqzN8gTR6kIQ1a/wtqvqO+wM41QGW jpdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=QaKcsDlB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8si25269152plr.343.2018.11.20.06.36.51; Tue, 20 Nov 2018 06:37:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=QaKcsDlB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727649AbeKTUyV (ORCPT + 99 others); Tue, 20 Nov 2018 15:54:21 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:19573 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726398AbeKTUyU (ORCPT ); Tue, 20 Nov 2018 15:54:20 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 20 Nov 2018 02:25:56 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 20 Nov 2018 02:25:56 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 20 Nov 2018 02:25:56 -0800 Received: from [10.26.11.164] (172.20.13.39) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 20 Nov 2018 10:25:53 +0000 Subject: Re: [PATCH v1 2/4] ARM: tegra: Fix DRAM refresh-interval clobbering on resume from LP1 on Tegra30 To: Dmitry Osipenko , Thierry Reding , Peter De Schrijver CC: , References: <20180830185404.7224-1-digetx@gmail.com> <20180830185404.7224-3-digetx@gmail.com> <4f61bf5f-0aa8-df6e-109b-194b08f3374e@nvidia.com> From: Jon Hunter Message-ID: <2b3bf920-b8e1-c8c5-11cd-5a7443eda521@nvidia.com> Date: Tue, 20 Nov 2018 10:25:50 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL106.nvidia.com (172.18.146.12) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1542709556; bh=b8vpB+Yw9fs+DC+VhgumihtidglLQIb7zZUQb16xyFc=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=QaKcsDlBmQdAZe1UM3HdjsIcip8GSYuJJbJhqK9ImxC3NK9FZ9aKX2tPDUKLSdIEL FzIsLJu2SVfI+i9+IZtavHbQx74jPBltwSuvuMFCmZFYbNhDJQPgjox56iq6ZwkqZZ Kfxe9yiHegC4Ky6lBqTdRAHyhh5kGP6xCTw8yQrweABBlPVeBfIfgpsKBAtsng+xxv fyRN8r5vsh5XCEgIszNzpXVocUyewv0tKUV1yf8p/g6Z3K/RWbG+iYSzPYZr1gGPqT ccu2/XFdekFQlKavqsC+ygjkhBEUj/EtSx9VkWXNq28q3y/a+9cMHrbeM/IrTr2D9e YdgOn7tkaHD2g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/11/2018 22:09, Dmitry Osipenko wrote: > On 20.11.2018 0:34, Jon Hunter wrote: >> >> On 30/08/2018 19:54, Dmitry Osipenko wrote: >>> The DRAM refresh-interval is getting erroneously set to "1" on exiting >>> from memory self-refreshing mode. The clobbered interval causes the >>> "refresh request overflow timeout" error raised by the External Memory >>> Controller on exiting from LP1 on Tegra30. >>> >>> Signed-off-by: Dmitry Osipenko >>> --- >>> arch/arm/mach-tegra/sleep-tegra30.S | 2 -- >>> 1 file changed, 2 deletions(-) >>> >>> diff --git a/arch/arm/mach-tegra/sleep-tegra30.S b/arch/arm/mach-tegra/sleep-tegra30.S >>> index 801fe58978ae..99ac9c6dcf7c 100644 >>> --- a/arch/arm/mach-tegra/sleep-tegra30.S >>> +++ b/arch/arm/mach-tegra/sleep-tegra30.S >>> @@ -29,7 +29,6 @@ >>> #define EMC_CFG 0xc >>> #define EMC_ADR_CFG 0x10 >>> #define EMC_TIMING_CONTROL 0x28 >>> -#define EMC_REFRESH 0x70 >>> #define EMC_NOP 0xdc >>> #define EMC_SELF_REF 0xe0 >>> #define EMC_MRW 0xe8 >>> @@ -459,7 +458,6 @@ emc_wait_auto_cal_onetime: >>> cmp r10, #TEGRA30 >>> streq r1, [r0, #EMC_NOP] >>> streq r1, [r0, #EMC_NOP] >>> - streq r1, [r0, #EMC_REFRESH] >>> >>> emc_device_mask r1, r0 >> >> This does look incorrect and it appears Tegra20 has the same bug. > > Indeed.. somehow this doesn't cause any problems on T20. Maybe this affects only specific timing configurations and it's just a luck that "refresh overflow" isn't getting raised. > >> However, looking at the EMC_REFRESH register it appears that bits 5:0 >> are the REFRESH_LO and bits 15:6 are the refresh interval. So this seems >> to imply the interval is set to 0 and not 1. So maybe the commit message >> needs to be fixed up. > > Do you mean that EMC_REFRESH is a fractional value? No the more I look at this, I just think it is a badly describe register in the TRM. I think that your description is correct afterall. Cheers Jon -- nvpublic