Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp379883ybg; Wed, 10 Jun 2020 03:17:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgQ1PiVvEyVhz9Xd8KkfuMgVjgif8DqCIpP4tQiAfzfnf8HVJxAJ6D88hbfh4ANgbl/Mdx X-Received: by 2002:a17:906:1dce:: with SMTP id v14mr2644232ejh.46.1591784226562; Wed, 10 Jun 2020 03:17:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591784226; cv=none; d=google.com; s=arc-20160816; b=KXvvIom4A8A6Kr8xkW7pxlQOkZb/RWxwGtRdVGb5lkO+Rv+YEOXRRJvKR+hWRQFALJ xFCaq3tP/atX45Kyl/8JRxj4YEWx8aIU3ev+FPpD5a3/P7e9k1CFzqCI9PFjcx9E3imK fpTylRTKs1k9ZOKA2j3C5yD39raLNURp4uLLW/Rv44IxVazPOAhjhlFiBM1qCu5O3zYk 0zl8qam7aOGDNXLoVuCpFVMwD1EWXhw0iB+egEvYNDkZjh7OrKA+MadUAEm5esbi2RqE E6gjVJelKjVYBDPr0LObHsJkaQ6pMYawHiOtBI9DuJsYnoXwHSGWQBZEYvlrIgnRK/z3 0YhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=njE3MZgInDbB6q/weHAQoLhcxGbQTiUScW2aJlXmWPI=; b=yMonIW3sH4eAf4D7OQdBimg4hVKSr/lHlvAkstUlMyRmwve4eyM/STPF5W3J8GJVMB acngX8kir+I9hDfOKvXdsflCewi3smOZEaRy9X6btlaK9HkT4eH6K7WDy9Lmmvfz6gcv knb4hkeLxmG5SiGIQICDmziMJzn0AWeW3anUzMwwlYjZX/K/MlEwklIaIGFamgSelmMQ 1BZjGCufmfEkGKYe8yabHJrl1OHr9ClVUF90E7oz0wNXD8AEEY8QInGj33785E9/vUVZ tLGsChgB5TCo913l7qHAxRM7TfvRnXRN9h6GhLjq3t7dXMSV/2sm6kfJrGe33UQKuIuk wxNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a8si13162966ejp.552.2020.06.10.03.16.43; Wed, 10 Jun 2020 03:17:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728147AbgFJKNx (ORCPT + 99 others); Wed, 10 Jun 2020 06:13:53 -0400 Received: from inva021.nxp.com ([92.121.34.21]:48578 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726134AbgFJKNw (ORCPT ); Wed, 10 Jun 2020 06:13:52 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 218E62002EC; Wed, 10 Jun 2020 12:13:51 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 89942200301; Wed, 10 Jun 2020 12:13:46 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A71F14029F; Wed, 10 Jun 2020 18:13:40 +0800 (SGT) From: Anson Huang To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, leonard.crestez@nxp.com, abel.vesa@nxp.com, l.stach@pengutronix.de, peng.fan@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V3] soc: imx8m: Correct i.MX8MP UID fuse offset Date: Wed, 10 Jun 2020 18:03:02 +0800 Message-Id: <1591783382-27033-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Correct i.MX8MP UID fuse offset according to fuse map: UID_LOW: 0x420 UID_HIGH: 0x430 Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") Fixes: 18f662a73862 ("soc: imx: Add i.MX8MP SoC driver support") Signed-off-by: Anson Huang --- Changes since V2: - add one more fix tag for original patch before file name is changed. --- drivers/soc/imx/soc-imx8m.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c index 7b0759a..0bc8314 100644 --- a/drivers/soc/imx/soc-imx8m.c +++ b/drivers/soc/imx/soc-imx8m.c @@ -22,6 +22,8 @@ #define OCOTP_UID_LOW 0x410 #define OCOTP_UID_HIGH 0x420 +#define IMX8MP_OCOTP_UID_OFFSET 0x10 + /* Same as ANADIG_DIGPROG_IMX7D */ #define ANADIG_DIGPROG_IMX8MM 0x800 @@ -87,6 +89,8 @@ static void __init imx8mm_soc_uid(void) { void __iomem *ocotp_base; struct device_node *np; + u32 offset = of_machine_is_compatible("fsl,imx8mp") ? + IMX8MP_OCOTP_UID_OFFSET : 0; np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-ocotp"); if (!np) @@ -95,9 +99,9 @@ static void __init imx8mm_soc_uid(void) ocotp_base = of_iomap(np, 0); WARN_ON(!ocotp_base); - soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH); + soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH + offset); soc_uid <<= 32; - soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW); + soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW + offset); iounmap(ocotp_base); of_node_put(np); -- 2.7.4