mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH v3 06/20] i.MX: ocotp: Add imx_ocotp_sense_enable()
Date: Tue, 10 Jan 2017 07:08:59 -0800	[thread overview]
Message-ID: <20170110150913.31416-7-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20170110150913.31416-1-andrew.smirnov@gmail.com>

Add imx_ocotp_sense_enable() function to allow changing that aspect of
OCOTP driver behaviour before calling imx_ocotp_read_field()

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/mach-imx/include/mach/ocotp.h | 1 +
 arch/arm/mach-imx/ocotp.c              | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/arch/arm/mach-imx/include/mach/ocotp.h b/arch/arm/mach-imx/include/mach/ocotp.h
index 430bc75..5474c27 100644
--- a/arch/arm/mach-imx/include/mach/ocotp.h
+++ b/arch/arm/mach-imx/include/mach/ocotp.h
@@ -16,5 +16,6 @@
 int imx_ocotp_read_field(uint32_t field, unsigned *value);
 int imx_ocotp_write_field(uint32_t field, unsigned value);
 int imx_ocotp_permanent_write(int enable);
+bool imx_ocotp_sense_enable(bool enable);
 
 #endif /* __MACH_IMX_OCOTP_H */
diff --git a/arch/arm/mach-imx/ocotp.c b/arch/arm/mach-imx/ocotp.c
index c67e37a..99b365a 100644
--- a/arch/arm/mach-imx/ocotp.c
+++ b/arch/arm/mach-imx/ocotp.c
@@ -359,6 +359,13 @@ int imx_ocotp_permanent_write(int enable)
 	return 0;
 }
 
+bool imx_ocotp_sense_enable(bool enable)
+{
+	const bool old_value = imx_ocotp->sense_enable;
+	imx_ocotp->sense_enable = enable;
+	return old_value;
+}
+
 static uint32_t inc_offset(uint32_t offset)
 {
 	if ((offset & 0x3) == 0x3)
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2017-01-10 15:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 15:08 [PATCH v3 00/20] Vybrid related patches Andrey Smirnov
2017-01-10 15:08 ` [PATCH v3 01/20] i.MX: esdhc: Enable host->clk during initialization Andrey Smirnov
2017-01-10 15:08 ` [PATCH v3 02/20] i.MX: ocotp: Move memory reversing into a subroutine Andrey Smirnov
2017-01-10 15:08 ` [PATCH v3 03/20] i.MX: ocotp: Add provisions for storing multiple MAC addresses Andrey Smirnov
2017-01-10 15:08 ` [PATCH v3 04/20] i.MX: ocotp: Initialize OCOTP as early as possible Andrey Smirnov
2017-01-10 15:08 ` [PATCH v3 05/20] i.MX: clk: Add IMX_PLLV3_SYS_VF610 subtype Andrey Smirnov
2017-01-10 15:08 ` Andrey Smirnov [this message]
2017-01-10 15:09 ` [PATCH v3 07/20] i.MX: imx6-fusemap: Fix SJC_RESP_LOCK width Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 08/20] i.MX: Add fusemap for VF610 Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 09/20] i.MX: vf610: Ramp CPU clock to maximum frequency Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 10/20] i.MX: iomuxv3: Add low-level pad code to headers Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 11/20] i.MX: iomuxv3: Add helper macros to deconstruct iomux_v3_cfg_t values Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 12/20] i.MX: iomuxv3: Add low-level pad configuration routine Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 13/20] i.MX6: sabresd: Remove magic numbers in setup_uart Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 14/20] i.MX: iomuxv3: Use helper functions in iomux-v3.h Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 15/20] i.MX: vf610: Add low-level pin configuration helper Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 16/20] i.MX: iomux-vf610: Add missing pad definitions Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 17/20] i.MX: imx-usb-phy: Add VF610 OF compatiblity string Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 18/20] i.MX: Default CONFIG_USB_IMX_PHY to 'y' on Vybrid Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 19/20] i.MX: imx-usb-misc: Add Vybrid support Andrey Smirnov
2017-01-10 15:09 ` [PATCH v3 20/20] i.MX: vf610-twr: Remove MSCM setup code Andrey Smirnov
2017-01-12  6:41 ` [PATCH v3 00/20] Vybrid related patches Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170110150913.31416-7-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox