From patchwork Tue Jun 4 02:09:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 2656281 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2C0BE3FC23 for ; Tue, 4 Jun 2013 02:09:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759687Ab3FDCJY (ORCPT ); Mon, 3 Jun 2013 22:09:24 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:35599 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759322Ab3FDCJX (ORCPT ); Mon, 3 Jun 2013 22:09:23 -0400 Received: from ayumi.isobedori.kobe.vergenet.net (p5212-ipbfp1903kobeminato.hyogo.ocn.ne.jp [114.172.132.212]) by kirsty.vergenet.net (Postfix) with ESMTP id E5E53266CED; Tue, 4 Jun 2013 12:09:21 +1000 (EST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 7A4A06CE066; Tue, 4 Jun 2013 11:09:20 +0900 (JST) From: Simon Horman To: Zhang Rui , linux-pm@vger.kernel.org Cc: linux-sh@vger.kernel.org, Kuninori Morimoto , Magnus Damm , Ulrich Hecht , Simon Horman Subject: [PATCH] thermal: rcar: set up I/O base before requesting IRQ Date: Tue, 4 Jun 2013 11:09:13 +0900 Message-Id: <1370311753-6463-1-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 1.8.2.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Ulrich Hecht It is used by the interrupt handler. Fixes crash when booting via kexec on APE6 board. This problem was introduced by e0a5172e9eec7f0d3c476e013c51dab62f3fc666 ("thermal: rcar: add interrupt support") which was introduced in v3.8-rc3. Signed-off-by: Ulrich Hecht Acked-by: Kuninori Morimoto [horms+renesas@verge.net.au: enhanced changelog to include commit that cuases the problem ] Signed-off-by: Simon Horman Acked-by: Eduardo Valentin --- drivers/thermal/rcar_thermal.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Hi Zhang, could you consider this fix for v3.10? diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 8d7edd4..7641dcc 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -395,13 +395,6 @@ static int rcar_thermal_probe(struct platform_device *pdev) return -ENODEV; } - ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0, - dev_name(dev), common); - if (ret) { - dev_err(dev, "irq request failed\n "); - return ret; - } - /* * rcar_has_irq_support() will be enabled */ @@ -409,6 +402,13 @@ static int rcar_thermal_probe(struct platform_device *pdev) if (IS_ERR(common->base)) return PTR_ERR(common->base); + ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0, + dev_name(dev), common); + if (ret) { + dev_err(dev, "irq request failed\n "); + return ret; + } + /* enable temperature comparation */ rcar_thermal_common_write(common, ENR, 0x00030303);