Introduce CONFIG_HAS_DMA
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Sun, 6 May 2007 21:49:09 +0000 (14:49 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:12:51 +0000 (12:12 -0700)
Architectures that don't support DMA can say so by adding a config NO_DMA
to their Kconfig file.  This will prevent compilation of some dma specific
driver code.  Also dma-mapping-broken.h isn't needed anymore on at least
s390.  This avoids compilation and linking of otherwise dead/broken code.

Other architectures that include dma-mapping-broken.h are arm26, h8300,
m68k, m68knommu and v850.  If these could be converted as well we could get
rid of the header file.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
"John W. Linville" <linville@tuxdriver.com>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: <James.Bottomley@SteelEye.com>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: <geert@linux-m68k.org>
Cc: <zippel@linux-m68k.org>
Cc: <spyro@f2s.com>
Cc: <uclinux-v850@lsi.nec.co.jp>
Cc: <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/s390/Kconfig
drivers/base/Makefile
include/asm-s390/dma-mapping.h
lib/Kconfig

index e6ec418093e5067fba3bae3400c2ee612daac208..1a84719be2641f47bedc832ff7a460acbf29cf9b 100644 (file)
@@ -49,6 +49,9 @@ config GENERIC_BUG
 config NO_IOMEM
        def_bool y
 
+config NO_DMA
+       def_bool y
+
 mainmenu "Linux Kernel Configuration"
 
 config S390
index e9eb7382ac3ac26b9c0c0ccae636da25bf4e1fa0..b39ea3f59c9b77edc9ec636383bcc3f3f3225f4e 100644 (file)
@@ -2,10 +2,10 @@
 
 obj-y                  := core.o sys.o bus.o dd.o \
                           driver.o class.o platform.o \
-                          cpu.o firmware.o init.o map.o dmapool.o \
-                          dma-mapping.o devres.o \
+                          cpu.o firmware.o init.o map.o devres.o \
                           attribute_container.o transport_class.o
 obj-y                  += power/
+obj-$(CONFIG_HAS_DMA)  += dma-mapping.o dmapool.o
 obj-$(CONFIG_ISA)      += isa.o
 obj-$(CONFIG_FW_LOADER)        += firmware_class.o
 obj-$(CONFIG_NUMA)     += node.o
index 09bb7b04f96731b0d427d98d6353d8a8f0ad72eb..3f8c12fde0f0830a8cdb876a3f90ad521b1a6e45 100644 (file)
@@ -9,6 +9,4 @@
 #ifndef _ASM_DMA_MAPPING_H
 #define _ASM_DMA_MAPPING_H
 
-#include <asm-generic/dma-mapping-broken.h>
-
 #endif /* _ASM_DMA_MAPPING_H */
index 384249915047f0e28f8f82c10caa6b9795f4fb3b..96d6e8ca8b70c4c90ea4a96f182dd1af16a72043 100644 (file)
@@ -111,4 +111,9 @@ config HAS_IOPORT
        depends on HAS_IOMEM && !NO_IOPORT
        default y
 
+config HAS_DMA
+       boolean
+       depends on !NO_DMA
+       default y
+
 endmenu