From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] ARM: mmp: append MMP_USE_OF config
Date: Tue, 19 Jul 2011 13:24:28 -0600 [thread overview]
Message-ID: <20110719192428.GG6848@ponder.secretlab.ca> (raw)
In-Reply-To: <1311042290-20253-3-git-send-email-haojian.zhuang@marvell.com>
On Tue, Jul 19, 2011 at 10:24:45AM +0800, Haojian Zhuang wrote:
> Since NR_IRQS is defined in irqs.h, parsing irq specifier will be started
> from NR_IRQS while both CONFIG_USE_OF and CONFIG_SPARSE_IRQ is enabled.
> It breaks the assumption that base irq is started from 0.
>
> Add CONFIG_MMP_USE_OF config to distinguish. If CONFIG_MMP_USE_OF is set,
> NR_IRQS is defined as 0. Otherwise, it follows the original definition.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Don't do this. It is completely valid and supported to have both DT
and non-DT support in the same kernel build. This patch will break
that.
> ---
> arch/arm/mach-mmp/Kconfig | 7 +++++++
> arch/arm/mach-mmp/include/mach/irqs.h | 4 ++++
> 2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig
> index 67793a6..1efe994 100644
> --- a/arch/arm/mach-mmp/Kconfig
> +++ b/arch/arm/mach-mmp/Kconfig
> @@ -96,4 +96,11 @@ config CPU_MMP2
> select CPU_PJ4
> help
> Select code specific to MMP2. MMP2 is ARMv7 compatible.
> +
> +config MMP_USE_OF
> + bool "MMP Use OF"
> + select USE_OF
> + help
> + Select OF code to ARCH-MMP.
> +
> endif
> diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h
> index a09d328..538bb69 100644
> --- a/arch/arm/mach-mmp/include/mach/irqs.h
> +++ b/arch/arm/mach-mmp/include/mach/irqs.h
> @@ -224,6 +224,10 @@
>
> #define IRQ_BOARD_START (IRQ_GPIO_START + IRQ_GPIO_NUM)
>
> +#ifdef CONFIG_MMP_USE_OF
> +#define NR_IRQS 0
> +#else
> #define NR_IRQS (IRQ_BOARD_START)
> +#endif
>
> #endif /* __ASM_MACH_IRQS_H */
> --
> 1.5.6.5
>
next prev parent reply other threads:[~2011-07-19 19:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2011071901>
2011-07-19 2:24 ` [PATCH 0/7] support DT on ARCH-MMP Haojian Zhuang
2011-07-19 2:24 ` [PATCH 1/7] ARM: mmp: parse irq from DT Haojian Zhuang
2011-07-19 2:24 ` [PATCH 2/7] ARM: mmp: append MMP_USE_OF config Haojian Zhuang
2011-07-19 2:24 ` [PATCH 3/7] ARM: mmp: support DT on both dkb and brownstone Haojian Zhuang
2011-07-19 2:24 ` [PATCH 4/7] tty: serial: support device tree in pxa Haojian Zhuang
2011-07-19 2:24 ` [PATCH 5/7] tty: serial: check ops before registering console Haojian Zhuang
2011-07-19 2:24 ` [PATCH 6/7] i2c: pxa: support i2c controller from DT Haojian Zhuang
2011-07-19 2:24 ` [PATCH 7/7] i2c: pxa: support to parse property Haojian Zhuang
2011-07-19 10:17 ` Eric Miao
2011-07-19 19:47 ` Grant Likely
2011-07-19 19:45 ` Grant Likely
2011-07-20 1:22 ` Eric Miao
2011-07-19 19:43 ` [PATCH 6/7] i2c: pxa: support i2c controller from DT Grant Likely
2011-07-19 19:40 ` [PATCH 4/7] tty: serial: support device tree in pxa Grant Likely
2011-07-19 19:48 ` Arnd Bergmann
2011-07-19 19:53 ` Grant Likely
2011-07-19 20:05 ` Russell King - ARM Linux
2011-07-19 20:17 ` Arnd Bergmann
2011-07-20 1:26 ` Eric Miao
2011-07-19 13:42 ` [PATCH 3/7] ARM: mmp: support DT on both dkb and brownstone Mitch Bradley
2011-07-19 19:49 ` Grant Likely
2011-07-19 19:36 ` Grant Likely
2011-07-19 19:24 ` Grant Likely [this message]
2011-07-19 17:39 ` [PATCH 1/7] ARM: mmp: parse irq from DT Grant Likely
2011-07-19 7:12 ` [PATCH 0/7] support DT on ARCH-MMP Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110719192428.GG6848@ponder.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).