Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1946994ybv; Fri, 14 Feb 2020 08:41:24 -0800 (PST) X-Google-Smtp-Source: APXvYqyYKlbX9JcHX2BA60ZxGG5c2gepa0V8tpdgBmvnbXvIPOGiJGrB6e7scZlN1NdwKfhA2QSI X-Received: by 2002:aca:a98c:: with SMTP id s134mr2535722oie.77.1581698484328; Fri, 14 Feb 2020 08:41:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581698484; cv=none; d=google.com; s=arc-20160816; b=sfTHU9L1T3RxTsh1rDr1S1ZHidlJINX5px0NqA217v0kjOyuiTKFsTJOHZP5NMYxwc mYgjbjz3tDXIeEN8oE5Vs6HH2o6PEoOAThHpUY40rzaZ79FbG12+To8TD/slqGt1K70b i/U/dUgKDXig6ThCthHhfskqeFpWF7j4pNFd82DgZl1TivAZMg2SamPn+OZyoaOkwudH 42W8ff3Cy9zEr1P8q3jy9FSkDY6DSutmcwlsqHiWrEagxptWO7Bxwnjn1xvfX1UzbmUd 51d0AyvVeMVODiLxWAafPPEPSFjsqlpOGcsoMaV0SBIc94alx4VqYu6+KaQO093YdEA6 WLVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=60N9a4hbDnWqGEYR12iviwf5mPcJ06aLOiu8QpupSY8=; b=e9fGAlTh8z6FjaNPiki5gHemU6wxpJ0N8eIqvix34/qXqBrqOuKHNatKAXuvdkR2cp zBNa6aECXJixetOL+EAjRpbQqUYNrzApXZuP1CmhBiz5QcL675qaNu/4IyuJqEV1Ald/ AxSCyWv2p4v7D3R1y1CsK4V4t4JTWVzcpllo93rxNeKAfZpoybiZZ7y4U9ACCE+Rqqqu /HCA9+Ecc/XOCIxF0I1FqjuBfWynGxcfvtGoWapEOz3TH2jDkcz5fuDbMqzb50AcjfB0 b0ER+Ta2VyQ+5cPslt9yUKhM8lFCcXsTTBAt32cNZQCEhosQlJVP+KjR/iTiI7jj4zJY WL5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XdGtX10D; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h26si2035230otm.303.2020.02.14.08.41.12; Fri, 14 Feb 2020 08:41:24 -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=@kernel.org header.s=default header.b=XdGtX10D; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405600AbgBNQjj (ORCPT + 99 others); Fri, 14 Feb 2020 11:39:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:59204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405351AbgBNQXJ (ORCPT ); Fri, 14 Feb 2020 11:23:09 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3ACBD2475E; Fri, 14 Feb 2020 16:23:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697388; bh=ofwbgNjBWpSvnTCV96oBhMiWdtYCquSy3RtoQ52qE2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XdGtX10Dkjzh7UCdW6N3AXR2Ry00lYzJhxvZMux2xzhIWjwaM+ycEoBsphx9X9oKG ueQJSwBVuPGFUiv7/82GRHyTtKgRBEg+eb1GRAqewTn7qhnqIOJto/BYvteTD7htWe sTITe+kLnVVhAUkVplvELXJBKzvy7EVgwlZzfuDI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dmitry Osipenko , Thierry Reding , Sasha Levin , linux-tegra@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 084/141] soc/tegra: fuse: Correct straps' address for older Tegra124 device trees Date: Fri, 14 Feb 2020 11:20:24 -0500 Message-Id: <20200214162122.19794-84-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Osipenko [ Upstream commit 2d9ea1934f8ef0dfb862d103389562cc28b4fc03 ] Trying to read out Chip ID before APBMISC registers are mapped won't succeed, in a result Tegra124 gets a wrong address for the HW straps register if machine uses an old outdated device tree. Fixes: 297c4f3dcbff ("soc/tegra: fuse: Restrict legacy code to 32-bit ARM") Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/soc/tegra/fuse/tegra-apbmisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c index 5b18f6ffa45c7..cd61c883c19f5 100644 --- a/drivers/soc/tegra/fuse/tegra-apbmisc.c +++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c @@ -134,7 +134,7 @@ void __init tegra_init_apbmisc(void) apbmisc.flags = IORESOURCE_MEM; /* strapping options */ - if (tegra_get_chip_id() == TEGRA124) { + if (of_machine_is_compatible("nvidia,tegra124")) { straps.start = 0x7000e864; straps.end = 0x7000e867; } else { -- 2.20.1