From: David Woodhouse Date: Tue, 6 Oct 2009 14:08:29 +0000 (+0100) Subject: spectra: Clean up emulation vs. hardware backend support X-Git-Tag: v2.6.36-rc1~520^2~1^2~450^2~6 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=4087524f3924c64791fab469b731f4e7420797a2;p=net-next-2.6.git spectra: Clean up emulation vs. hardware backend support 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 --- diff --git a/drivers/block/spectra/Kconfig b/drivers/block/spectra/Kconfig index fbece109f6c..dae951e96e6 100644 --- a/drivers/block/spectra/Kconfig +++ b/drivers/block/spectra/Kconfig @@ -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. diff --git a/drivers/block/spectra/Makefile b/drivers/block/spectra/Makefile index 261891c2357..8f5e0179250 100644 --- a/drivers/block/spectra/Makefile +++ b/drivers/block/spectra/Makefile @@ -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 diff --git a/drivers/block/spectra/lld.c b/drivers/block/spectra/lld.c index 3f411af4405..c9a311213af 100644 --- a/drivers/block/spectra/lld.c +++ b/drivers/block/spectra/lld.c @@ -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 */ /*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/ diff --git a/drivers/block/spectra/spectraswconfig.h b/drivers/block/spectra/spectraswconfig.h index b630f0651b3..1e6afd372fe 100644 --- a/drivers/block/spectra/spectraswconfig.h +++ b/drivers/block/spectra/spectraswconfig.h @@ -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