linux/drivers/staging/spectra
Arnd Bergmann 2a48fc0ab2 block: autoconvert trivial BKL users to private mutex
The block device drivers have all gained new lock_kernel
calls from a recent pushdown, and some of the drivers
were already using the BKL before.

This turns the BKL into a set of per-driver mutexes.
Still need to check whether this is safe to do.

file=$1
name=$2
if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
            sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
    else
            sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
    fi
    sed -i ${file} \
        -e "/^#include.*linux.mutex.h/,$ {
                1,/^\(static\|int\|long\)/ {
                     /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

} }"  \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[      ]*cycle_kernel_lock();/d'
else
    sed -i -e '/include.*\<smp_lock.h\>/d' ${file}  \
                -e '/cycle_kernel_lock()/d'
fi

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2010-10-05 15:01:10 +02:00
..
Kconfig Staging: spectra: depend on X86_MRST 2010-09-03 17:37:16 -07:00
Makefile
README
ffsdefs.h
ffsport.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
ffsport.h
flash.c Staging: spectra: removes unused functions 2010-08-23 18:15:35 -07:00
flash.h
lld.c
lld.h
lld_cdma.c
lld_cdma.h
lld_emu.c
lld_emu.h
lld_mtd.c
lld_mtd.h
lld_nand.c
lld_nand.h
nand_regs.h
spectraswconfig.h

README

This is a driver for NAND controller of Intel Moorestown platform.

This driver is a standalone linux block device driver, it acts as if it's a normal hard disk.
It includes three layer:
	block layer interface - file ffsport.c
	Flash Translation Layer (FTL) - file flash.c (implement the NAND flash Translation Layer, includs address mapping, garbage collection, wear-leveling and so on)
	Low level layer - file lld_nand.c/lld_cdma.c/lld_emu.c (which implements actual controller hardware registers access)

This driver can be build as modules or build-in.

Dependency:
This driver has dependency on IA Firmware of Intel Moorestown platform.
It need the IA Firmware to create the block table for the first time.
And to validate this driver code without IA Firmware, you can change the
macro AUTO_FORMAT_FLASH from 0 to 1 in file spectraswconfig.h. Thus the
driver will erase the whole nand flash and create a new block table.

TODO:
	- Enable Command DMA feature support
	- lower the memory footprint
	- Remove most of the unnecessary global variables
	- Change all the upcase variable / functions name to lowercase
	- Some other misc bugs

Please send patches to:
	Greg Kroah-Hartman <gregkh@suse.de>

And Cc to: Gao Yunpeng <yunpeng.gao@intel.com>