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 <David.Woodhouse@intel.com>
This commit is contained in:
David Woodhouse 2009-10-06 15:08:29 +01:00
parent 90d598285c
commit 4087524f39
4 changed files with 13 additions and 2 deletions

View 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.

View 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

View 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 */
/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/

View 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