From patchwork Wed Nov 25 16:06:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7701131 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 CE1AFBF90C for ; Wed, 25 Nov 2015 16:14:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57CF02088B for ; Wed, 25 Nov 2015 16:14:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FBD52085E for ; Wed, 25 Nov 2015 16:14:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752253AbbKYQHs (ORCPT ); Wed, 25 Nov 2015 11:07:48 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:57953 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbbKYQHp (ORCPT ); Wed, 25 Nov 2015 11:07:45 -0500 Received: from wuerfel.lan. ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0M4Bbn-1aJIAi1x3b-00rp6p; Wed, 25 Nov 2015 17:07:07 +0100 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Kukjin Kim , Krzysztof Kozlowski , Mark Brown , Vasily Khoruzhick , Charles Keepax , Tomasz Figa , Ben Dooks , linux-samsung-soc@vger.kernel.org, Arnd Bergmann Subject: [PATCH 05/10] ARM: s3c64xx: enable sparse IRQ support Date: Wed, 25 Nov 2015 17:06:50 +0100 Message-Id: <1448467615-447097-6-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.1.0.rc2 In-Reply-To: <1448467615-447097-1-git-send-email-arnd@arndb.de> References: <1448467615-447097-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:zIp46Q/2zAeXPbgBmzPrTpXKQXmUI0fJNj3Q9GEU9UlLRVDaZyV YqmErCc/HjoqOtKNZq0wBl/VtL2+VMmtsKwgPKkgVEiGqwGc8Il006BFqQkUaqUep2t1X0+ BuVR/4GUwji63TajFoULA9p8b4MMM7ykuMB6OI0XD+yRX3gujHvfnqI1w6ctoqtvGacEW+O S7nSgmLpSPiIAooGr1lfA== X-UI-Out-Filterresults: notjunk:1; V01:K0:aTptJkyU3V8=:CxVaz1hLjG2GaBAQ5XSmqa xVu9zFEy/Jf9eKktCn3g0YbT0ZmT4E0YSKhUOWDqyNWs4UMNrO2s3HcKAOclxmHOkmcBHPoZE EyPnfV6iAdFf+v6QG0FjnBbjABDJPOu2fPi9gXAZUjytQBcPU+euiwSk3S0ckhj5sYQZLmPH5 uocFmAmUEnZJPgI9HbofgskQrZEWgV0xcgoKeBdpc2OCyEU70p3F1XxLGxEZTYevzmSK7Bl2P 6oEZFA1NlRIi+7rLDKxdG8x3UVPnVtwDLS6cx5polNB9jk0jOMwhwCYHjTUa4LJsoWJoD4ra8 oFLN1+Tfakgd4I7HNwKWkoPsm5Gjl17QMaPF0OwDdZZDxEaiV1/qrqr/lCLTYLM5FGODcxUQ3 +nRhkmVFaFvUj7nCAqDwWlU92XG0BXzZelklpZApoiqkT5OdIqsLLAw+zTln774pwmUBw3nCb m+ofGwAEKrISTuXFUzC/eqsmr3CB6V3yENDiiW9ysWCXciAaa/ojRYIcciEkRbEchqe1BGpAa mXAee7HuomiLUA7ccThT8Ujl8pb74ABwfL1kkuT4Xyhfzqf62mTC6+Oy0xQGVuihlam07/yqT uZ2AHpQfCDBwshZWiUkeg/xSrH5xVYCJzW419W37O1tJI1igZyJ6i+clR0wvQ6hfVSPVuVQ+4 GYIMZWLWM64hI5+bOhlEhyf33XSSdQUjmKnd9z9ruXSBIVyc2OilYkHYCzGa7bSJBnlk= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 This is another prerequisite for enabling multiplatform support, and it is the part I am least certain about. I assume it will cause the extra boot message "Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated" to be printed, but otherwise work ok. This definitely needs to be tested on real hardware to see if it works. Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 1 + arch/arm/mach-s3c64xx/common.c | 1 + arch/arm/mach-s3c64xx/dev-uart.c | 1 + arch/arm/mach-s3c64xx/include/mach/irqs.h | 20 +++----------------- arch/arm/mach-s3c64xx/include/mach/pm-core.h | 1 + arch/arm/mach-s3c64xx/mach-anw6410.c | 3 ++- arch/arm/mach-s3c64xx/mach-crag6410-module.c | 2 ++ arch/arm/mach-s3c64xx/mach-crag6410.c | 2 ++ arch/arm/mach-s3c64xx/mach-hmt.c | 2 ++ arch/arm/mach-s3c64xx/mach-mini6410.c | 2 ++ arch/arm/mach-s3c64xx/mach-ncp.c | 2 ++ arch/arm/mach-s3c64xx/mach-real6410.c | 3 ++- arch/arm/mach-s3c64xx/mach-smartq5.c | 2 ++ arch/arm/mach-s3c64xx/mach-smartq7.c | 2 ++ arch/arm/mach-s3c64xx/mach-smdk6400.c | 3 ++- arch/arm/mach-s3c64xx/mach-smdk6410.c | 3 ++- arch/arm/plat-samsung/gpio-samsung.c | 1 + 17 files changed, 30 insertions(+), 21 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 83f42877328d..1ec6a153d8e5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -649,6 +649,7 @@ config ARCH_S3C64XX select SAMSUNG_ATAGS select SAMSUNG_WAKEMASK select SAMSUNG_WDT_RESET + select SPARSE_IRQ help Samsung S3C64XX series based systems diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index 3dea4a4ef165..7c66ce1a6bb6 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -39,6 +39,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-s3c64xx/dev-uart.c b/arch/arm/mach-s3c64xx/dev-uart.c index 46e18d77ea93..a0b4f0329811 100644 --- a/arch/arm/mach-s3c64xx/dev-uart.c +++ b/arch/arm/mach-s3c64xx/dev-uart.c @@ -23,6 +23,7 @@ #include #include #include +#include #include diff --git a/arch/arm/mach-s3c64xx/include/mach/irqs.h b/arch/arm/mach-s3c64xx/include/mach/irqs.h index 67bbd1dd04c2..3ceb00b5de07 100644 --- a/arch/arm/mach-s3c64xx/include/mach/irqs.h +++ b/arch/arm/mach-s3c64xx/include/mach/irqs.h @@ -156,25 +156,11 @@ #define IRQ_EINT_GROUP(group, no) (IRQ_EINT_GROUP##group##_BASE + (no)) -/* Define a group of interrupts for board-specific use (eg, for MFD - * interrupt controllers). */ +/* Some boards have their own IRQs behind this */ #define IRQ_BOARD_START (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1) -#ifdef CONFIG_MACH_WLF_CRAGG_6410 -#define IRQ_BOARD_NR 160 -#elif defined(CONFIG_SMDK6410_WM1190_EV1) -#define IRQ_BOARD_NR 64 -#elif defined(CONFIG_SMDK6410_WM1192_EV1) -#define IRQ_BOARD_NR 64 -#else -#define IRQ_BOARD_NR 16 -#endif - -#define IRQ_BOARD_END (IRQ_BOARD_START + IRQ_BOARD_NR) - -/* Set the default NR_IRQS */ - -#define NR_IRQS (IRQ_BOARD_END + 1) +/* Set the default nr_irqs, boards can override if necessary */ +#define S3C64XX_NR_IRQS IRQ_BOARD_START /* Compatibility */ diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c64xx/include/mach/pm-core.h index a30a1e3ffc6a..32d2ff54f82d 100644 --- a/arch/arm/mach-s3c64xx/include/mach/pm-core.h +++ b/arch/arm/mach-s3c64xx/include/mach/pm-core.h @@ -18,6 +18,7 @@ #include #include +#include static inline void s3c_pm_debug_init_uart(void) { diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index 6224c67f5061..347ce6009a8c 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -229,7 +230,7 @@ static void __init anw6410_machine_init(void) MACHINE_START(ANW6410, "A&W6410") /* Maintainer: Kwangwoo Lee */ .atag_offset = 0x100, - + .nr_irqs = S3C64XX_NR_IRQS, .init_irq = s3c6410_init_irq, .map_io = anw6410_map_io, .init_machine = anw6410_machine_init, diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index be21f06e6b3f..571f95cc5a53 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c @@ -30,6 +30,8 @@ #include #include +#include + #include "crag6410.h" static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = { diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index f776adcdaee8..a237b9b117b5 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -860,6 +861,7 @@ static void __init crag6410_machine_init(void) MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") /* Maintainer: Mark Brown */ .atag_offset = 0x100, + .nr_irqs = S3C64XX_NR_IRQS, .init_irq = s3c6410_init_irq, .map_io = crag6410_map_io, .init_machine = crag6410_machine_init, diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 816b39d1e6d1..bc7dc1fcbf7d 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c @@ -31,6 +31,7 @@ #include