From patchwork Wed Apr 17 10:34:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 2453071 Return-Path: X-Original-To: patchwork-linux-sh@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 47B363FC64 for ; Wed, 17 Apr 2013 11:34:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965961Ab3DQLeH (ORCPT ); Wed, 17 Apr 2013 07:34:07 -0400 Received: from mail-bk0-f50.google.com ([209.85.214.50]:55561 "EHLO mail-bk0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965882Ab3DQLeH (ORCPT ); Wed, 17 Apr 2013 07:34:07 -0400 Received: by mail-bk0-f50.google.com with SMTP id jg1so712671bkc.9 for ; Wed, 17 Apr 2013 04:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=XzfidEoJy/VUm2HJn6SVnGU+5EXX6arPPujkQ7DSmIg=; b=qt/ihZyig505VTjYJSFFenb/lljj4ZhtsTsHri+934Ju3+Zd297mKjqdpnciJsJjlB 2AcS8ikXuyOcQT9wJFK2P7AUOaiVY29Ds3wdVY6peEZ+wptDOuGGJjK5IjtqJ2auGESu A/DdqV7a94p6tiBq2Ar3TrGV36cO6Fk1jeCuOKniPRIMeiNSmnTwgdL8sfvE0Kpo+LDe inW+uUaE62tqSJYUk2qqN8uCSHb+I/v+XUa7/GUiAYJghN8u9fd3rMMIvh5EuZNQ7i6p XRAKqaa9RVoUCw3jDxgP/J7ttCvTamEC2Ye7mqSwfFiq3QJfl2BsnuwQnTXi27Aln/55 Hmlg== X-Received: by 10.205.99.130 with SMTP id cs2mr1244286bkc.118.1366198445725; Wed, 17 Apr 2013 04:34:05 -0700 (PDT) Received: from localhost.localdomain (g229254233.adsl.alicedsl.de. [92.229.254.233]) by mx.google.com with ESMTPS id ej2sm1993713bkb.14.2013.04.17.04.34.04 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Apr 2013 04:34:05 -0700 (PDT) From: Bastian Hecht To: linux-sh@vger.kernel.org Cc: Magnus Damm , Laurent Pichart , Simon Horman , Kuninori Morimoto Subject: [PATCH v2 4/6] ARM: shmobile: r8a7740: Add OF support to initialze the GIC Date: Wed, 17 Apr 2013 12:34:04 +0200 Message-Id: <1366194847-9879-4-git-send-email-hechtb+renesas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366194847-9879-1-git-send-email-hechtb+renesas@gmail.com> References: <1366194847-9879-1-git-send-email-hechtb+renesas@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org We add a variant to initalize the interrupt controller in case we describe the GIC using the Device Tree and not platform data. Signed-off-by: Bastian Hecht --- v2: r8a7740_init_irq_common is static now Reordered patch arch/arm/mach-shmobile/include/mach/r8a7740.h | 1 + arch/arm/mach-shmobile/intc-r8a7740.c | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h index abdc4d4..19c0423 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7740.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h @@ -534,6 +534,7 @@ enum { extern void r8a7740_meram_workaround(void); extern void r8a7740_init_irq(void); +extern void r8a7740_init_irq_of(void); extern void r8a7740_map_io(void); extern void r8a7740_add_early_devices(void); extern void r8a7740_add_standard_devices(void); diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c index b741c84..8871f77 100644 --- a/arch/arm/mach-shmobile/intc-r8a7740.c +++ b/arch/arm/mach-shmobile/intc-r8a7740.c @@ -20,19 +20,15 @@ #include #include +#include #include -void __init r8a7740_init_irq(void) +static void __init r8a7740_init_irq_common(void) { - void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000); - void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000); void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10); void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10); void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4); - /* initialize the Generic Interrupt Controller PL390 r0p0 */ - gic_init(0, 29, gic_dist_base, gic_cpu_base); - /* route signals to GIC */ iowrite32(0x0, pfc_inta_ctrl); @@ -54,3 +50,19 @@ void __init r8a7740_init_irq(void) iounmap(intc_msk_base); iounmap(pfc_inta_ctrl); } + +void __init r8a7740_init_irq_of(void) +{ + irqchip_init(); + r8a7740_init_irq_common(); +} + +void __init r8a7740_init_irq(void) +{ + void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000); + void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000); + + /* initialize the Generic Interrupt Controller PL390 r0p0 */ + gic_init(0, 29, gic_dist_base, gic_cpu_base); + r8a7740_init_irq_common(); +}