Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp685627pxb; Tue, 5 Apr 2022 18:44:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg5+Ep5droCkoJo8RNaXEZcSNya78hlYQFrpEuhZfLlO9qbjrEJcPvu5NlVDu0buR/cxlS X-Received: by 2002:a17:907:868a:b0:6e5:e35f:3b99 with SMTP id qa10-20020a170907868a00b006e5e35f3b99mr6266528ejc.33.1649209382785; Tue, 05 Apr 2022 18:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649209382; cv=none; d=google.com; s=arc-20160816; b=ZHaVLCcZrYM03VdMzvSSv62rv6ViSCCEjF8E6T7wnvv9AOFNX3CL0V9c1Q9LvVEnRF NOKVFmu4Run78t6R8v07kT2zS3X1IsfzPtSWRS2JeBrI5ghd59GzXUsj4+LhnBD0xcfC 57FdJ0/iOH15aYm8lE/myWRt1PaI1S2rjgmtuHhfwNbm9wv8VRQzflHB26L4ISdmA1AO qszzIExJFMN71rm7fDB99VIpGwQLZeFwY+yEU4rULEWMz0fu6GyJhGRSWuobUfqMCWQD 7lW59oPtM/Qbfcyur+q2w+5mzTltjVFGfg47B1nhRArE58VPZwsFEwQ/4vQSBQnNd3Yu KW7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KUcNI92EpjrdErgv4+DMUetF+X+HE7jYy4zgV3K1ucM=; b=SpJD68J/tTevZoTeQ71+Jbxn/XII+rk51iOi/HjYVnWDWuhsT1i1jH1+mJfyrdn6gM e2fOn3vu1NhafhxoECdgljMYK5hIL7WI7JZS7Gn3OjqaUu9d3dcQvyNSSSSM7OtnX5nv ViFuntcd2N7y4zXuoWOVv0E0TlPt7didzlP+ptVFefP89kMVngHwOUzzORWbDHGnC7K+ P8NhagcHmqBRAukncKQ5vToz04wv/XpHCI4qT14P7l6GK9GjRhek6t99r666Y4yodBnD tLQI5gb0QFti/NFuhoUwHDOnSV9p6bZWLve9RBts8OID044/6a59pWIpcwzGxdK9Oi0w 0IOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TNY1v7Bu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a056402084b00b00418c2b5bed7si12172128edz.441.2022.04.05.18.42.34; Tue, 05 Apr 2022 18:43:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TNY1v7Bu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244718AbiDELoZ (ORCPT + 99 others); Tue, 5 Apr 2022 07:44:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244833AbiDEIwm (ORCPT ); Tue, 5 Apr 2022 04:52:42 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0B2022512; Tue, 5 Apr 2022 01:44:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 415E5CE1C6D; Tue, 5 Apr 2022 08:44:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58907C385A0; Tue, 5 Apr 2022 08:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148268; bh=iWedxj7YTagci/gi3EDpl5fIirs9sNJC96Xu5blLHW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TNY1v7BuWUWRVYEMOtiB/QNDzRqXnF9xXL/PtY8yBPGG/sBN5Wn3J7Ev0GC8CKCMi a6jshQd6MuiA2PMycfFgWi0fWYJowOGR1wPuR4IKy8vb/DEBtqL9XxrBGlRvl78ziQ lTcv1ZaPwwh6FoMOGOLwu6qzNuLPTQddCiQmXmsw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Osipenko , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 5.16 0294/1017] memory: tegra20-emc: Correct memory device mask Date: Tue, 5 Apr 2022 09:20:07 +0200 Message-Id: <20220405070403.001122645@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Osipenko [ Upstream commit 9ff684342ee7d3ea2755c6e9b60bc43085baa3ad ] Memory chip select is swapped when we read mode register, correct it. We didn't have devices that use a single LPDDR chip and both chips are always identical, hence this change is just a minor improvement. Fixes: 131dd9a436d8 ("memory: tegra20-emc: Support matching timings by LPDDR2 configuration") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20211222043215.28237-2-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin --- drivers/memory/tegra/tegra20-emc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c index 497b6edbf3ca..25ba3c5e4ad6 100644 --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -540,7 +540,7 @@ static int emc_read_lpddr_mode_register(struct tegra_emc *emc, unsigned int register_addr, unsigned int *register_data) { - u32 memory_dev = emem_dev + 1; + u32 memory_dev = emem_dev ? 1 : 2; u32 val, mr_mask = 0xff; int err; -- 2.34.1