From patchwork Tue Jan 20 11:38:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 5668301 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BAEB3C058D for ; Tue, 20 Jan 2015 11:32:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D30CC2025A for ; Tue, 20 Jan 2015 11:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01634201C0 for ; Tue, 20 Jan 2015 11:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752916AbbATLb6 (ORCPT ); Tue, 20 Jan 2015 06:31:58 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:40177 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752361AbbATLb6 (ORCPT ); Tue, 20 Jan 2015 06:31:58 -0500 Received: by mail-pa0-f54.google.com with SMTP id eu11so10768946pac.13 for ; Tue, 20 Jan 2015 03:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=Wvongu33zZagmcKCfOUvL2Y1J+yINgANaUSnj3LaO64=; b=h50xfElJQMx9zFrbbGXcmfOSiYtBpuGqGXR5f1ALmBYGxKoHeJINuHl4EsbZNNIbwH 0JyR32FL052OioKEiI1N7KYkQ03pppvhkbfQhZAjGJrNGnIriWVN69AvpgvK06AycRQC 4NRi5DjAk9HHiEzXOhTI8Gjos+zneqVuXlt1u6mxUOiVK56eSmsZ6QghWwouslhL29Mr UIKu38XoCSo98Os0IOoiAK1qVsNfeZMckI1BUq1kCue9ougtk3a2lBZsY6q5ZF9UHlcg yolePuWaHnctSBMGZfoW6JKXPbO7Esw2AM2oXmDTAlkMGM9MpmvgMrzSkffuyqY9EbHM UL6g== X-Received: by 10.66.102.106 with SMTP id fn10mr53373005pab.156.1421753517697; Tue, 20 Jan 2015 03:31:57 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id k3sm14371815pdj.2.2015.01.20.03.31.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 03:31:56 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: marc.zyngier@arm.com, Magnus Damm , horms@verge.net.au, geert+renesas@glider.be Date: Tue, 20 Jan 2015 20:38:00 +0900 Message-Id: <20150120113800.11062.65299.sendpatchset@little-apple> Subject: ARM: shmobile: r8a73a4: Instantiate GIC from C board code in legacy builds Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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: Magnus Damm As of commit 9a1091ef0017c40a ("irqchip: gic: Support hierarchy irq domain."), the APE6EVM legacy board support is know to be broken. The IRQ numbers of the GIC are now virtual, and no longer match the hardcoded hardware IRQ numbers in the platform board code. To fix this, instantiate the GIC from platform board code when compiling a legacy kernel, like is done for the sh73a0, r8a7740, r8a7778 and r8a7779 legacy code. Follows same style as the r8a7740 legacy GIC fix by Geert Uytterhoeven, thanks to him for the initial work. Signed-off-by: Magnus Damm --- Written on top of renesas-devel-20150119-v3.19-rc5 Untested due to lack of working hardware, testing needed. arch/arm/mach-shmobile/board-ape6evm.c | 1 + arch/arm/mach-shmobile/r8a73a4.h | 1 + arch/arm/mach-shmobile/setup-r8a73a4.c | 10 ++++++++++ 3 files changed, 12 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/arm/mach-shmobile/board-ape6evm.c +++ work/arch/arm/mach-shmobile/board-ape6evm.c 2015-01-20 18:49:50.087786672 +0900 @@ -280,6 +280,7 @@ static const char *ape6evm_boards_compat DT_MACHINE_START(APE6EVM_DT, "ape6evm") .init_early = shmobile_init_delay, + .init_irq = r8a73a4_init_irq, .init_machine = ape6evm_add_standard_devices, .init_late = shmobile_init_late, .dt_compat = ape6evm_boards_compat_dt, --- 0001/arch/arm/mach-shmobile/r8a73a4.h +++ work/arch/arm/mach-shmobile/r8a73a4.h 2015-01-20 18:43:29.027788042 +0900 @@ -10,6 +10,7 @@ enum { SHDMA_SLAVE_MMCIF1_RX, }; +void r8a73a4_init_irq(void); void r8a73a4_add_standard_devices(void); void r8a73a4_clock_init(void); void r8a73a4_pinmux_init(void); --- 0001/arch/arm/mach-shmobile/setup-r8a73a4.c +++ work/arch/arm/mach-shmobile/setup-r8a73a4.c 2015-01-20 18:48:16.427787009 +0900 @@ -14,6 +14,8 @@ * GNU General Public License for more details. */ #include +#include +#include #include #include #include @@ -286,6 +288,14 @@ void __init r8a73a4_add_standard_devices r8a73a4_register_dmac(); } +void __init r8a73a4_init_irq(void) +{ + void __iomem *gic_dist_base = IOMEM(0xf1001000); + void __iomem *gic_cpu_base = IOMEM(0xf1002000); + + gic_init(0, 29, gic_dist_base, gic_cpu_base); +} + #ifdef CONFIG_USE_OF static const char *r8a73a4_boards_compat_dt[] __initdata = {