From patchwork Mon Sep 22 17:09:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 4949211 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 3892ABEEA6 for ; Mon, 22 Sep 2014 17:13:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E6222024C for ; Mon, 22 Sep 2014 17:13:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ED91920221 for ; Mon, 22 Sep 2014 17:13:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XW78i-00076h-Bx; Mon, 22 Sep 2014 17:11:04 +0000 Received: from mail.kmu-office.ch ([178.209.48.102]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XW781-0005Jg-9F for linux-arm-kernel@lists.infradead.org; Mon, 22 Sep 2014 17:10:22 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.kmu-office.ch (Postfix) with ESMTP id 6921342D188 for ; Mon, 22 Sep 2014 19:08:21 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kmu-office.ch X-Amavis-Alert: BAD HEADER, Duplicate header field: "In-Reply-To" Received: from mail.kmu-office.ch ([127.0.0.1]) by localhost (mail.kmu-office.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aQNT+rT-BfN9 for ; Mon, 22 Sep 2014 19:08:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.kmu-office.ch (Postfix) with ESMTP id DB07842D1DB for ; Mon, 22 Sep 2014 19:08:15 +0200 (CEST) Received: from trochilidae.toradex.int (unknown [46.140.72.82]) (Authenticated sender: stefan@agner.ch) by mail.kmu-office.ch (Postfix) with ESMTPSA id 5B7B642D1A6; Mon, 22 Sep 2014 19:08:15 +0200 (CEST) From: Stefan Agner To: shawn.guo@freescale.com, kernel@pengutronix.de, linus.walleij@linaro.org, gnurou@gmail.com Subject: [PATCH 7/9] ARM: imx: src: Support vf610 system reset controller Date: Mon, 22 Sep 2014 19:09:28 +0200 Message-Id: <0ca4daed3e71bf1eb20e3667ed66536c60b35007.1411404079.git.stefan@agner.ch> X-Mailer: git-send-email 2.1.0 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140922_101021_525212_7B0EED84 X-CRM114-Status: GOOD ( 10.75 ) X-Spam-Score: 0.0 (/) Cc: linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, stefan@agner.ch, linux-gpio@vger.kernel.org, jingchang.lu@freescale.com, b20788@freescale.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-2.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 Support Vybrid SoC's system reset controller (SRC). Currently we don't register a reset controller but only support the imx_cpu_jump and imx_cpu_arg functions. Signed-off-by: Stefan Agner --- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/common.h | 1 + arch/arm/mach-imx/mach-vf610.c | 1 + arch/arm/mach-imx/src.c | 11 +++++++++++ 4 files changed, 14 insertions(+) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 70e6d56..f393775 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -634,6 +634,7 @@ config SOC_VF610 select ARM_GIC select PINCTRL_VF610 select HAVE_IMX_GPC + select HAVE_IMX_SRC select ARM_GLOBAL_TIMER select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK select PL310_ERRATA_769419 if CACHE_L2X0 diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 4b753f5..ca7a0d9 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -103,6 +103,7 @@ static inline void imx_scu_map_io(void) {} static inline void imx_smp_prepare(void) {} #endif void imx_src_init(void); +void vf610_src_init(void); void imx6_gpc_init(void); void vf610_gpc_init(void); void imx_gpc_pre_suspend(bool arm_power_off); diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c index 532f18f..eef3496 100644 --- a/arch/arm/mach-imx/mach-vf610.c +++ b/arch/arm/mach-imx/mach-vf610.c @@ -16,6 +16,7 @@ static void __init vf610_init_irq(void) { + vf610_src_init(); vf610_gpc_init(); irqchip_init(); } diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c index 45f7f4e..a1f5160 100644 --- a/arch/arm/mach-imx/src.c +++ b/arch/arm/mach-imx/src.c @@ -140,3 +140,14 @@ void __init imx_src_init(void) writel_relaxed(val, src_base + SRC_SCR); spin_unlock(&scr_lock); } + +void __init vf610_src_init(void) +{ + struct device_node *np; + + np = of_find_compatible_node(NULL, NULL, "fsl,vf610-src"); + if (!np) + return; + src_base = of_iomap(np, 0); + WARN_ON(!src_base); +}