]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
spectra: Clean up emulation vs. hardware backend support
authorDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 6 Oct 2009 14:08:29 +0000 (15:08 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 7 Jun 2010 15:24:02 +0000 (16:24 +0100)
Only build the parts which are actually needed, and turn the DMA support
(which is currently hard-coded off) into a config option (still forced off).

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/block/spectra/Kconfig
drivers/block/spectra/Makefile
drivers/block/spectra/lld.c
drivers/block/spectra/spectraswconfig.h

index fbece109f6c6defd4b7e219433c70295145bd38d..dae951e96e6bdccb1504a389a2d9478039da3672 100644 (file)
@@ -25,3 +25,9 @@ config MRST_NAND_EMU
 
 endchoice
 
+config MRST_NAND_HW_DMA
+       bool
+       default n
+       depends on MRST_NAND_HW
+       help
+         Use DMA for native hardware interface.
index 261891c23577b663a745ef268b90b52e5f158c2d..8f5e0179250feea925387b5e9ed30011dc4c7012 100644 (file)
@@ -3,5 +3,8 @@
 #
 
 obj-$(CONFIG_MRST_NAND) += spectra.o
-spectra-objs := ffsport.o flash.o lld.o lld_emu.o lld_nand.o lld_cdma.o
+spectra-y := ffsport.o flash.o lld.o
+spectra-$(CONFIG_MRST_NAND_HW) += lld_nand.o 
+spectra-$(CONFIG_MRST_NAND_HW_DMA) += lld_cdma.o
+spectra-$(CONFIG_MRST_NAND_EMU) += lld_emu.o
 
index 3f411af4405e364b2bf1705b6302f8b0ff472461..c9a311213aff83efc7babb3e43f7afe364a41e0a 100644 (file)
@@ -199,6 +199,7 @@ u16  GLOB_LLD_Get_Bad_Block(u32 block)
        return  NAND_Get_Bad_Block(block);
 }
 
+#if CMD_DMA
 u16 GLOB_LLD_Event_Status(void)
 {
        return CDMA_Event_Status();
@@ -251,6 +252,7 @@ u16 GLOB_LLD_Read_Page_Main_Spare_cdma(u8 *data,
                        LLD_CMD_FLAG_MODE_CDMA);
 }
 
+#endif /* CMD_DMA */
 #endif /* FLASH_NAND */
 
 /*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/
index b630f0651b3130842562acb61674937e5051ee45..1e6afd372fe40dec8f27d841ca798f9444823874 100644 (file)
@@ -47,7 +47,7 @@
 /***** Product Feature Support *****/
 #define FLASH_EMU               defined(CONFIG_MRST_NAND_EMU)
 #define FLASH_NAND              defined(CONFIG_MRST_NAND_HW)
-#define CMD_DMA                   0
+#define CMD_DMA                 defined(CONFIG_MRST_NAND_HW_DMA)
 
 #define SPECTRA_PARTITION_ID    0