Message ID | 20190419100327.31483-5-pure.logic@nexus-software.ie (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 8C80F17E0 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 19 Apr 2019 10:04:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B57C28B0D for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 19 Apr 2019 10:04:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F6CE28D64; Fri, 19 Apr 2019 10:04:26 +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 E8ACA28D60 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 19 Apr 2019 10:04:25 +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=VT+mLiPHBUEa9R/EPUPOHJzjVXuqnLPBzQMIb02Ianw=; b=rg54OivDMvfZGC kOXw3Gcbxsw0E4bprqFdvJpVWfN6Yv7chkeH1o90BAMC938k9/Y9wIJG0CqrAPYvNCTJ7zgz6K4PL GLG+Uy4gxdNIQa1fhY8k0Y9g4CpVtCqX92cWY5MTnCT0f/F6ZZ0k2K2l1IhRYeTzIYipLLXs/c/RE xHQHjQhKF4jlzOBTPns3FowT0sgKEDArXabA7UUKmk7Ne5lisdL4xZkZMiw/NPN+NZmOG7cJ/oGRi wV2P3izKon1qMFxH8kaHbC432SZ8kbI1+GudxwywGApIA5Vz7EIrdesn015Jsr/pEeodWk0zIEffW h5WiJ3nqrm9i+u/c37WA==; 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 1hHQNZ-0000Ol-Uc; Fri, 19 Apr 2019 10:04:21 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQMr-0007uW-0o for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2019 10:03:40 +0000 Received: by mail-ed1-x543.google.com with SMTP id d1so4030152edd.13 for <linux-arm-kernel@lists.infradead.org>; Fri, 19 Apr 2019 03:03:36 -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=4HBSGC20hf20NnPa5hdNzen9fskrVCaGqlWtn9J3Z1s=; b=cYTWf9hAGb+llE+oTmm7p/gQ5NI0q4AYY4lZ3sLJbdlY7rNc38TmSWaz5+8JpUB11M HEJeVdjf1K9HV02NBECevFqsT1rofs10USbqUntAYRViLDn468FI6zkrRHbwKDrd2nCT AQQ9xOx4z+IEvp1MeN95zPn7gL/h0uxuQ6Da5TSDkuFHY8TGVtYRqi1cTX+2KlqsL3C8 u4bH2VkZikaeknpqWEmQvRyELydzNLJapA0x2WQ6HgIkuEEzk7PAWPnxpVDsqli3WnJl 2jRKvFhmeq9H6O9A8r/6Bs5wMOVYbdUVaSr1SlRVrwM8Yo0pPvCOfDrdT8p+omqQGcdN 2rVQ== 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=4HBSGC20hf20NnPa5hdNzen9fskrVCaGqlWtn9J3Z1s=; b=NP7pt1Md0EsIuE88qL79eewQGNjHLPI8P22OMJkZnjGLf8xWssQHWIzhpH29UEQZKD xajFotmiruVLDtCdq6oc2jSx+pbXA1wfbMKHGQIubeCFX5gxAT0a8OD47OD6orin1eUz 2E3V9PTy+ua0gjWH6aq2sllo1spIYmyfgCrLU3xU1YDylKVRuilPwRx+ozxlwNA3AD8p T+GIgzuGcw64PNf14Cl3OC065A2I4xNq7/jY6XexiSktBIQoBgXH/4fl2pY99tWinMBa EuRSr5PMFWYxXIk7JepLYWLQBgQxVINqbEPkpFcHhURd0sQ7dqm0fMXAVF/O+eqRCwZD C/lQ== X-Gm-Message-State: APjAAAW6Oh2Q56y3jNMnWSK/KOef1pX9AAWDrTY3KZcNhoJzoavstg36 gO2+y/tHlemLM6E7zsXHPr4naQ== X-Google-Smtp-Source: APXvYqw2zNUCtL8WTN458AIlk8l4ZsWrEvmoNZl/RJUXocY+XnKDTBly3LVfEZfWt2EncYckK7lvtA== X-Received: by 2002:a17:906:8159:: with SMTP id z25mr1576759ejw.286.1555668215727; Fri, 19 Apr 2019 03:03:35 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id b11sm1254512edm.5.2019.04.19.03.03.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 03:03:35 -0700 (PDT) From: Bryan O'Donoghue <pure.logic@nexus-software.ie> To: l.stach@pengutronix.de, peng.fan@nxp.com, shawnguo@kernel.org, srinivas.kandagatla@linaro.org, leonard.crestez@nxp.com Subject: [PATCH 4/6] nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing Date: Fri, 19 Apr 2019 11:03:25 +0100 Message-Id: <20190419100327.31483-5-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190419100327.31483-1-pure.logic@nexus-software.ie> References: <20190419100327.31483-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-20190419_030337_303845_18FF1C73 X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=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 <pure.logic@nexus-software.ie>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Add i.MX8MM support
|
expand
|
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index b6e71c34a393..840d939f792b 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -194,7 +194,8 @@ static void imx_ocotp_set_imx6_timing(struct ocotp_priv *priv) strobe_prog = clk_rate / (1000000000 / 10000) + 2 * (DEF_RELAX + 1) - 1; strobe_read = clk_rate / (1000000000 / 40) + 2 * (DEF_RELAX + 1) - 1; - timing = strobe_prog & 0x00000FFF; + timing = readl(priv->base + IMX_OCOTP_ADDR_TIMING) & 0x0FC00000; + timing |= strobe_prog & 0x00000FFF; timing |= (relax << 12) & 0x0000F000; timing |= (strobe_read << 16) & 0x003F0000;
The i.MX6 and i.MX8 both have a bit-field spanning bits 27:22 called the WAIT field. The WAIT field according to the documentation for both parts "specifies time interval between auto read and write access in one time program. It is given in number of ipg_clk periods." This patch ensures that the relevant field is read and written back to the timing register. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> --- drivers/nvmem/imx-ocotp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)