mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Daniel Glöckner" <dg@emlix.com>
To: Chris Zankel <chris@zankel.net>
Cc: linux-kernel@vger.kernel.org, linux-xtensa@linux-xtensa.org,
	"Daniel Glöckner" <dg@emlix.com>
Subject: [PATCH] xtensa: generalize logic for variant/irq.h inclusion
Date: Tue,  5 May 2009 17:02:14 +0200	[thread overview]
Message-ID: <1241535734-17479-1-git-send-email-dg@emlix.com> (raw)
In-Reply-To: <4A0054A0.3030104@emlix.com>

CONFIG_VARIANT_IRQ_SWITCH has been replaced by CONFIG_VARIANT_IRQ_EXT
and a #define VARIANT_HAS_IRQ_ENABLE in variant/irq.h.

This change was made to allow further extensions to the irq handling by
the variant in variant/irq.h independent of the CONFIG_VARIANT_IRQ_SWITCH
functionality and without forcing all variants to provide this header.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
---
 arch/xtensa/Kconfig                              |    4 ++--
 arch/xtensa/configs/s6105_defconfig              |    2 +-
 arch/xtensa/include/asm/irq.h                    |    6 ++++--
 arch/xtensa/variants/s6000/include/variant/irq.h |    1 +
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index ac02f3c..76dee02 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -57,7 +57,7 @@ source "kernel/Kconfig.freezer"
 config MMU
 	def_bool n
 
-config VARIANT_IRQ_SWITCH
+config VARIANT_IRQ_EXT
 	def_bool n
 
 menu "Processor type and features"
@@ -78,7 +78,7 @@ config XTENSA_VARIANT_DC232B
 
 config XTENSA_VARIANT_S6000
 	bool "s6000 - Stretch software configurable processor"
-	select VARIANT_IRQ_SWITCH
+	select VARIANT_IRQ_EXT
 	select ARCH_REQUIRE_GPIOLIB
 	select XTENSA_CALIBRATE_CCOUNT
 endchoice
diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig
index 768bee0..51d4bae 100644
--- a/arch/xtensa/configs/s6105_defconfig
+++ b/arch/xtensa/configs/s6105_defconfig
@@ -103,7 +103,7 @@ CONFIG_DEFAULT_CFQ=y
 CONFIG_DEFAULT_IOSCHED="cfq"
 # CONFIG_FREEZER is not set
 # CONFIG_MMU is not set
-CONFIG_VARIANT_IRQ_SWITCH=y
+CONFIG_VARIANT_IRQ_EXT=y
 
 #
 # Processor type and features
diff --git a/arch/xtensa/include/asm/irq.h b/arch/xtensa/include/asm/irq.h
index dfac82d..4a39bb5 100644
--- a/arch/xtensa/include/asm/irq.h
+++ b/arch/xtensa/include/asm/irq.h
@@ -14,9 +14,11 @@
 #include <platform/hardware.h>
 #include <variant/core.h>
 
-#ifdef CONFIG_VARIANT_IRQ_SWITCH
+#ifdef CONFIG_VARIANT_IRQ_EXT
 #include <variant/irq.h>
-#else
+#endif
+
+#ifndef VARIANT_HAS_IRQ_ENABLE
 static inline void variant_irq_enable(unsigned int irq) { }
 static inline void variant_irq_disable(unsigned int irq) { }
 #endif
diff --git a/arch/xtensa/variants/s6000/include/variant/irq.h b/arch/xtensa/variants/s6000/include/variant/irq.h
index fa031cb..bcd496d 100644
--- a/arch/xtensa/variants/s6000/include/variant/irq.h
+++ b/arch/xtensa/variants/s6000/include/variant/irq.h
@@ -3,6 +3,7 @@
 
 #define NO_IRQ		(-1)
 
+#define VARIANT_HAS_IRQ_ENABLE
 extern void variant_irq_enable(unsigned int irq);
 extern void variant_irq_disable(unsigned int irq);
 
-- 
1.6.1.3


       reply	other threads:[~2009-05-05 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4A0054A0.3030104@emlix.com>
2009-05-05 15:02 ` Daniel Glöckner [this message]
2009-05-05 15:31   ` Sam Ravnborg

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=1241535734-17479-1-git-send-email-dg@emlix.com \
    --to=dg@emlix.com \
    --cc=chris@zankel.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.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

all inboxes | Powered by JetHome®