From patchwork Wed Jul 3 12:39:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Christoph G. Baumann" X-Patchwork-Id: 2816551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 531A4BF4A1 for ; Wed, 3 Jul 2013 12:42:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2097A201B4 for ; Wed, 3 Jul 2013 12:42:26 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9BED5201B3 for ; Wed, 3 Jul 2013 12:42:24 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UuMMV-0002JS-4d; Wed, 03 Jul 2013 12:40:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UuMMI-0001FU-8I; Wed, 03 Jul 2013 12:40:30 +0000 Received: from moutng.kundenserver.de ([212.227.17.8]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UuMM5-0001Cf-KV for linux-arm-kernel@lists.infradead.org; Wed, 03 Jul 2013 12:40:19 +0000 Received: from baumann-laptop.ppc-ag.de ([212.65.29.63]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0M31Ih-1U3UkN1JZ9-00sxH3; Wed, 03 Jul 2013 14:39:56 +0200 From: "Christoph G. Baumann" To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] Added support for On Chip OTP in i.MX23/28 Date: Wed, 3 Jul 2013 14:39:14 +0200 Message-Id: <1372855154-8422-4-git-send-email-cb@sgoc.de> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1372855154-8422-1-git-send-email-cb@sgoc.de> References: <1372855154-8422-1-git-send-email-cb@sgoc.de> X-Provags-ID: V02:K0:83rmQM9JJ0SOPQ3gLCtvDX5+HD3v6RknFwHsHSMbNwf cKoOmAJaWbt81GNL3SQqxaW2VcArDOCy3nr5hrdA+pR9ym8rLs S6BhhGY2OpsKTpHfRo8x2yTWS7byrGINZaS2qvIke770ZeBnA0 63Xccv+SLeJ6r4ZCDzAhS4pA/CuhUa8Xqy+40kCX2LPGKMDP0h KrV03mpgkRl32xcUeTGcO/XgzT1uWgLxNzactb7kXLwoK5fKF0 UIKTZvVqIIzOi3lHNe32+2pnv9P/Gz7AsSzzZOXIVHT9d3+Bn4 zoi3cfdTQ0MwKuVQpzLewdyId1pRehmqxf/5IVZwARyXgprtIr 7Fv7RzhG96kdAiOeSxtkbblh1ZsIDQvWr5vTlXN5g X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130703_084017_983314_C3E9B819 X-CRM114-Status: GOOD ( 10.92 ) X-Spam-Score: -1.9 (-) Cc: "Christoph G. Baumann" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Christoph G. Baumann" Signed-off-by: Christoph G. Baumann --- arch/arm/boot/dts/imx28.dtsi | 1 - drivers/clk/mxs/clk-imx23.c | 2 ++ drivers/clk/mxs/clk-imx28.c | 1 + drivers/misc/Kconfig | 14 ++++++++++++++ drivers/misc/Makefile | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 600f7cb..e9de86b 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -711,7 +711,6 @@ ocotp@8002c000 { compatible = "fsl,ocotp"; reg = <0x8002c000 0x2000>; - status = "disabled"; }; axi-ahb@8002e000 { diff --git a/drivers/clk/mxs/clk-imx23.c b/drivers/clk/mxs/clk-imx23.c index f6a7487..ec76d00 100644 --- a/drivers/clk/mxs/clk-imx23.c +++ b/drivers/clk/mxs/clk-imx23.c @@ -168,6 +168,8 @@ int __init mx23_clocks_init(void) clk_data.clk_num = ARRAY_SIZE(clks); of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); + clk_register_clkdev(clks[hbus], NULL, "hbus"); + for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) clk_prepare_enable(clks[clks_init_on[i]]); diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c index 4faf0af..792fcaf 100644 --- a/drivers/clk/mxs/clk-imx28.c +++ b/drivers/clk/mxs/clk-imx28.c @@ -247,6 +247,7 @@ int __init mx28_clocks_init(void) of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); clk_register_clkdev(clks[enet_out], NULL, "enet_out"); + clk_register_clkdev(clks[hbus], NULL, "hbus"); for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) clk_prepare_enable(clks[clks_init_on[i]]); diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index c002d86..b44ef48 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -527,6 +527,20 @@ config SRAM the genalloc API. It is supposed to be used for small on-chip SRAM areas found on many SoCs. +config FSL_OTP + tristate "Freescale On-Chip OTP Memory Support" + depends on SOC_IMX23 || SOC_IMX28 + default n + help + If you say Y here, you will get support for a SysFS interface for + the One Time Programmable memory pages that are stored on the + iMX23/28 processor. + + To compile this driver as a module, choose M here: the module + will be called fsl_otp. + + If unsure, it is safe to say N. + source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index c235d5b..e622e01 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -53,3 +53,4 @@ obj-$(CONFIG_INTEL_MEI) += mei/ obj-$(CONFIG_VMWARE_VMCI) += vmw_vmci/ obj-$(CONFIG_LATTICE_ECP3_CONFIG) += lattice-ecp3-config.o obj-$(CONFIG_SRAM) += sram.o +obj-$(CONFIG_FSL_OTP) += fsl_otp.o