From patchwork Thu Apr 25 13:34:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 10917093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6481676 for ; Thu, 25 Apr 2019 13:35:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50A8B283B1 for ; Thu, 25 Apr 2019 13:35:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 418AB2884A; Thu, 25 Apr 2019 13:35:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D7C13283B1 for ; Thu, 25 Apr 2019 13:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j85x5qE109k6k3mYuZCuvpIZ/rpIR1fb4yeiWRFAdFU=; b=cMCE50c1De1vWV S9BBVg9j2v7UNoxd+nJY7wFjCURmF8ffKE91CiWECu9mQazQyLCihd77T6YPYCazSOwdSOGRMQGro /RPa2fYbZoP4Hh5yXSG7+TiJcGf6Jzbx2Q+EftGuIaxjRba28dr1vF1lForeSm3U6gDFUUk2Khrf5 oxden5krO7iSg2LTCyEc7OLyamNdXgASn9V5y9p6x3KimaqvxUlpFtpNPflqonvCuSYT7er+g6Hjm 5gPU3Y40tFYldDckwq5IprU5buEzjj2g3LphWBY125kfjJUvbZtN306X7sm9XzPvFZkJjasOScFvo spOGcdl+cNJrmNCGuFFw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJeWp-0007XX-J2; Thu, 25 Apr 2019 13:35:07 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJeWK-0006Rs-9D for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2019 13:34:37 +0000 Received: by mail-ed1-x541.google.com with SMTP id k92so19149693edc.12 for ; Thu, 25 Apr 2019 06:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vDjC1HhrwiK6rBinSJgP2ZiTatVr91mDGrEAz73BDHg=; b=2EWSZaK3LOtcxz1o7mXlVyd659WMFQk4S7ML9FAF7k8PFHIw5gSAsVAFhx2vCmL7NR xXrAQNyQQlvOudvEK9UPcDUPLzSlYNlWK40xikE1nzvivADCSy3H2TLznGfI6eCoJjMc 4zwozm4Wc1AbGsA3NZqHPW5lffDOzbS9fVnX9ABMOoCid8ttIBh/ldpkjFmPniryBgAC l2sJsySqk6KxcjRF0+rtvWP50uKMk3aO6UxJFtZ9AJWIMBoWPfiPEfSNdPww5Dvl9cfF t/4RRZwSaKvCzOqdZYz/6MUw4cJ5e2N2/ab26RrxG7jGMu9KVYHTd7jsDVsWGPguzXQu V/EA== 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:content-transfer-encoding; bh=vDjC1HhrwiK6rBinSJgP2ZiTatVr91mDGrEAz73BDHg=; b=k54waEfxUHUJrhQPQ0Twj6/GWmKlP6ERgUgTpT7zTiOqqaVeP/QYhXsS4wjj+Wf09G b5fxh0viWlR72fLdft51Xh3CDreyjF98foIYRVJwAiXX9t8a8/uydjxTZ12FFbyhvX+w 0AXV4VcUdTImsVhfBDcI+KYgIPwK39xZdgcYgC7ZL8cBkFzYsDVUQM+H9zvSb6KCIXai dpGSwvMXHMEoTFF+0p5RbvNSvN4l/S6O8KouQHkbrUv+tQCmyBTyqubgDTVvfI5X53FK PGKD95LtXfnyWfabx14hYbXyAsxY9iUNnqDFGCTorz8llHKRvDoVO8ERc8Js+rgPYQVw AIlQ== X-Gm-Message-State: APjAAAXtsa3SdDzqFE11OzxEalxIdr6EDex4ogdtrSBoE8FtQpDmRlcj 1HVp3xNxIRdkkTRWcN9o1VL1HQ== X-Google-Smtp-Source: APXvYqxl45lD47UfaLn3TWKmwzsgaeijEp1Ao2z94iGTq1tzLzhhDZFNyZcMAaUdM5PKioj03HtleQ== X-Received: by 2002:a50:c905:: with SMTP id o5mr24913197edh.252.1556199271359; Thu, 25 Apr 2019 06:34:31 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id k20sm4027084edb.9.2019.04.25.06.34.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2019 06:34:30 -0700 (PDT) From: Bryan O'Donoghue To: l.stach@pengutronix.de, peng.fan@nxp.com, shawnguo@kernel.org, srinivas.kandagatla@linaro.org, leonard.crestez@nxp.com Subject: [PATCH v6 1/5] nvmem: imx-ocotp: Elongate OCOTP_CTRL ADDR field to eight bits Date: Thu, 25 Apr 2019 14:34:23 +0100 Message-Id: <20190425133427.30648-2-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190425133427.30648-1-pure.logic@nexus-software.ie> References: <20190425133427.30648-1-pure.logic@nexus-software.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_063436_320405_59C4B53A X-CRM114-Status: GOOD ( 11.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, abel.vesa@nxp.com, anson.huang@nxp.com, linux-imx@nxp.com, kernel@pengutronix.de, fabio.estevam@nxp.com, Bryan O'Donoghue , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP i.MX6 defines OCOTP_CTRLn:ADDR as seven bit address-field with a one bit RSVD0 field, i.MX7 defines OCOTP_CTRLn:ADDR as a four bit address-field with a four bit RSVD0 field. i.MX8 defines the OCOTP_CTRLn:ADDR bit-field as a full range eight bits. i.MX6 and i.MX7 should return zero for their respective RSVD0 bits and ignore a write-back of zero where i.MX8 will make use of the full range. This patch expands the bit-field definition for all users to eight bits, which is safe due to RSVD0 being a no-op for the i.MX6 and i.MX7. Signed-off-by: Bryan O'Donoghue Reviewed-by: Leonard Crestez --- drivers/nvmem/imx-ocotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index 4cf7b61e4bf5..6600c4ddeb51 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -45,7 +45,7 @@ #define IMX_OCOTP_ADDR_DATA2 0x0040 #define IMX_OCOTP_ADDR_DATA3 0x0050 -#define IMX_OCOTP_BM_CTRL_ADDR 0x0000007F +#define IMX_OCOTP_BM_CTRL_ADDR 0x000000FF #define IMX_OCOTP_BM_CTRL_BUSY 0x00000100 #define IMX_OCOTP_BM_CTRL_ERROR 0x00000200 #define IMX_OCOTP_BM_CTRL_REL_SHADOWS 0x00000400