From patchwork Wed Jun 26 10:27:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 167791 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp760208ilk; Wed, 26 Jun 2019 03:28:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKF+OY3Vm7E9CwPq3bj4IPzHkI3T8d2bjz7S4yFt4Os+6R/bCJGY//mGS8PjZGeb2GUxDP X-Received: by 2002:a17:902:31c3:: with SMTP id x61mr4458359plb.331.1561544887731; Wed, 26 Jun 2019 03:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561544887; cv=none; d=google.com; s=arc-20160816; b=jBvIRry/1JZETi8Fbuebqff6up7XcchHINtz6gf6MY/g47EFK/klBzm9JkQ3LT6s3j QFiclytgW4Ni7MPfVnh8SVya65Il/aNwqwWPdG5usmkL/uHGITGeMb0LrzmriwzT5A77 J8nmipeB9b3y5ls3+b64EzbCdq4f/T7C0Sv/om8mxYYLm3AgvSoozKpDJTaPttB3ylDb tb7c2vMmz74brnC8Vpbj945ecgWTwKV0v3XvDA1gFQVr8PQEFJfy4RFhKaB3qAIBz7JM LYfBaNOl9FdisEejfqiPyFKsqCqYuS7Fzo3ahAc2nqQ7aJh35pBN+WZAl3Wcd155naad ZjUg== 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=p/mgZFZvtz5MXeK97S6RAma7XXrIP4D9tjHX9nEHACY=; b=vChI4AYVt4j6EGcyeXienmvHgngVb9f8XjU66aVFgBBx8tUA6jPVDRCb2F0WI5wFS3 16iLgL6COM+FG95Gsge7IpT5Jjz3Gw99uNoTQcx57DoW3ve+T8JIIMQR4cbri2V7skyE Zy2GcY7+XRxIpfsCqfr+/N2O7PWoot/mpgMKPqb/EedKrMmXN1OFMgv+Ae30kqSgHal1 ts/ozTuWifZNTwy6iJEufJYtykD6XSa1iCjL8UVO25D8QO7mklGCDNUwr3M2fhVT4eyj g5hHaXdHUPUmD0Qd8lTDJacnHJr5tKGOxrBzyKsaT7r6lFRRe3ImfN1wgKGu0jMvXwSz yFEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h1JRpI0J; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a89si3178895pla.60.2019.06.26.03.28.07; Wed, 26 Jun 2019 03:28:07 -0700 (PDT) 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=@linaro.org header.s=google header.b=h1JRpI0J; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727154AbfFZK2G (ORCPT + 30 others); Wed, 26 Jun 2019 06:28:06 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41078 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726242AbfFZK2E (ORCPT ); Wed, 26 Jun 2019 06:28:04 -0400 Received: by mail-wr1-f65.google.com with SMTP id c2so2083834wrm.8 for ; Wed, 26 Jun 2019 03:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p/mgZFZvtz5MXeK97S6RAma7XXrIP4D9tjHX9nEHACY=; b=h1JRpI0JBRfQ+DluKeXamJpk4K1xEhaXO9qNejSpmI2TPx6pE6d0M/X0rx6rND0y5j QkCOjv+8SKTcJSBjx6qzWuyqzQWVDccPIQvjSmth3U45tdO5j9nV7qah3hOY8LrqGTIz CyZaCFdvCuKCUyIhaUgxSnW2QdZx42O5Cf59ZrNQlCgFBc2v0cOacMc4UmJFCxyoUDNf pNcS/G4MaJg3r/sRiC2fI2Ul+RQ2HzXudlA+TT62lbeltM4+rM3i3HGhLJlN5jdWEovs +tSmZUlUczr64N34sWFPtmpR5Vb1DwuIwzNnL+I1NEqcNEwM8WxU+rf2qxJInvbGmoZ6 MF0g== 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=p/mgZFZvtz5MXeK97S6RAma7XXrIP4D9tjHX9nEHACY=; b=KNsVHDQeZIsd/HAw69LcLzo7WTpcVFFPGY5WUjbYjJI8KuyTamMgoLObECl8BWIbuz QXcG5Ouswkr59/jZ9RrrAS24neQwmOhG9O8pPr7MNofHnPSUDFkWEyc+1lB+kzxe5GKI L8dogKaAsmAtfNLX4jEkmnVF7AYdNymOKwgLbuJx/ebRXq0hKdmOqLR7MsyHiwDhETH6 3nHU+/cMZovCq5ehi0HHkH5/MiM09wDY208oJASZ3XDca8qn7WAvRW+JikCI2CIO1m0j 3JSlAnpyBM62SuleLMI28OUGLejenjZUg8NcO96EFsbWnxA1LLaQupx5l/m1MF4i+IMO jd8w== X-Gm-Message-State: APjAAAXtShpQ2DgiBN++QWAnjYe6r5sfMhlBoyepXlvVUKLSr0s36K77 UTM3hMSTq1DN4PMlfejYHH5LfQ== X-Received: by 2002:adf:e40f:: with SMTP id g15mr2944999wrm.174.1561544881765; Wed, 26 Jun 2019 03:28:01 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id z19sm2212042wmi.7.2019.06.26.03.28.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 03:28:01 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Bryan O'Donoghue , Leonard Crestez , Srinivas Kandagatla Subject: [PATCH 1/6] nvmem: imx-ocotp: Elongate OCOTP_CTRL ADDR field to eight bits Date: Wed, 26 Jun 2019 11:27:28 +0100 Message-Id: <20190626102733.11708-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190626102733.11708-1-srinivas.kandagatla@linaro.org> References: <20190626102733.11708-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bryan O'Donoghue 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 Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/imx-ocotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0 diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index bd016b928589..14c2bff2cd96 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -39,7 +39,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