From patchwork Fri Jan 16 01:49:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 5643781 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 6DA3AC058D for ; Fri, 16 Jan 2015 01:43:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97336201BC for ; Fri, 16 Jan 2015 01:43:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3CE1200ED for ; Fri, 16 Jan 2015 01:43:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753277AbbAPBnX (ORCPT ); Thu, 15 Jan 2015 20:43:23 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:61844 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbbAPBnW (ORCPT ); Thu, 15 Jan 2015 20:43:22 -0500 Received: by mail-pa0-f43.google.com with SMTP id kx10so21098183pab.2 for ; Thu, 15 Jan 2015 17:43:22 -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=vSzUtRaaGe4WeLn6Xd3kjSjvAFc+7XE7cCUHRQGtSH4=; b=Yp0zt9P+zTAVnrQKeVird7NtIBbUY0WYEuzQOXbnjA+nArvhyY0Qg3A9QRQP4dJDEF brHgpWMzNluTafzVNYMLW336mOBIpaMyCxO4s/uGEmQe/5V1A7jya+dGVFodufeE8UfQ 6RQNbSRaSsjudM5IUrTWzoPE0sfH2Hsd4fuCPKsjYNrIqaXvcjZiYXD4AK5gl8l0r0vr Ivp/AGPpfBfOiN8OUoNsg3b3PH3gImSytAr0tZ5x8GF2Y97vHimiX0v/eAw93KtR+NFu nrnHKNM6OI5txg3vA7CwQ38MbKmIJoAxnfSosC6QBkIvj+YaZAaTuWlPeTIbpO2h8bI1 J49A== X-Received: by 10.70.47.161 with SMTP id e1mr18759457pdn.55.1421372602445; Thu, 15 Jan 2015 17:43:22 -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 kl7sm2546868pdb.10.2015.01.15.17.43.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 17:43:20 -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: Fri, 16 Jan 2015 10:49:19 +0900 Message-Id: <20150116014919.30817.13079.sendpatchset@little-apple> Subject: ARM: shmobile: r8a7779: 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."), Marzen legacy hangs during boot with: Image Name: 'Linux-3.19.0-rc4' Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3445880 Bytes = 3.3 MiB Load Address: 60008000 Entry Point: 60008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... Enabling DEBUG_LL does not seem to change the situation, however this patch by itself fixes this issue and re-enables normal boot. This issue happens because 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 and r8a7778 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 Acked-by: Geert Uytterhoeven --- Written on top of renesas-devel-20150114v2-v3.19-rc4 arch/arm/mach-shmobile/setup-r8a7779.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 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/setup-r8a7779.c +++ work/arch/arm/mach-shmobile/setup-r8a7779.c 2015-01-15 18:48:00.969339495 +0900 @@ -720,10 +720,17 @@ static int r8a7779_set_wake(struct irq_d void __init r8a7779_init_irq_dt(void) { +#ifdef CONFIG_ARCH_SHMOBILE_LEGACY + void __iomem *gic_dist_base = ioremap_nocache(0xf0001000, 0x1000); + void __iomem *gic_cpu_base = ioremap_nocache(0xf0000100, 0x1000); +#endif gic_arch_extn.irq_set_wake = r8a7779_set_wake; +#ifdef CONFIG_ARCH_SHMOBILE_LEGACY + gic_init(0, 29, gic_dist_base, gic_cpu_base); +#else irqchip_init(); - +#endif /* route all interrupts to ARM */ __raw_writel(0xffffffff, INT2NTSR0); __raw_writel(0x3fffffff, INT2NTSR1);