Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 494a43bb authored by Alan Olsen's avatar Alan Olsen Committed by David Woodhouse
Browse files

Moorestown "Post Beta" nand driver.



Contains the fixes for nand corruption with the watchdog driver.

New features compares to MRST NAND driver Post Alpah2 2.0:
1. Enable CDMA feature of NAND controller

How to use this driver:
The same with before. That is, to enable this driver,
you can set
CONFIG_MRST_NAND=y
CONFIG_MRST_NAND_HW=y

Signed-off-by: default avatarGao Yunpeng <yunpeng.gao@intel.com>
Signed-off-by: default avatarAlan Olsen <alan.r.olsen@intel.com>
parent e40152ee
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -488,4 +488,6 @@ config BLK_DEV_HD

	  If unsure, say N.

source "drivers/block/spectra/Kconfig"

endif # BLK_DEV
+2 −0
Original line number Diff line number Diff line
@@ -38,4 +38,6 @@ obj-$(CONFIG_BLK_DEV_HD) += hd.o
obj-$(CONFIG_XEN_BLKDEV_FRONTEND)	+= xen-blkfront.o
obj-$(CONFIG_BLK_DEV_DRBD)     += drbd/

obj-$(CONFIG_MRST_NAND)	+= spectra/

swim_mod-objs	:= swim.o swim_asm.o
+27 −0
Original line number Diff line number Diff line

menuconfig MRST_NAND
	tristate "Moorestown NAND Flash controller"
	depends on BLOCK
	default n
	---help---
	  Enable the driver for the NAND Flash controller in Intel Moorestown
	  Platform

choice
	prompt "Compile for"
	depends on MRST_NAND
	default MRST_NAND_HW

config MRST_NAND_HW
	bool "Actual hardware mode"
	help
	  Driver communicates with the actual hardware's register interface.
	  in DMA mode.

config MRST_NAND_EMU
	bool "RAM emulator testing"
	help
	  Driver emulates Flash on a RAM buffer and / or disk file.  Useful to test the behavior of FTL layer.

endchoice
+7 −0
Original line number Diff line number Diff line
#
# Makefile of Intel Moorestown NAND controller driver
#

obj-$(CONFIG_MRST_NAND) += spectra.o
spectra-objs := ffsport.o flash.o lld.o lld_emu.o lld_nand.o lld_cdma.o
+29 −0
Original line number Diff line number Diff line
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>
Loading