mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
mtd, spi: Add MTD layer driver
Add MTD layer driver for spi, original patch from: http://git.denx.de/?p=u-boot/u-boot-mips.git;a=commitdiff;h=bb246819cdc90493dd7089eaa51b9e639765cced Changes from Heiko Schocher against this patch: - Remove compile error if not defining CONFIG_SPI_FLASH_MTD: LD drivers/mtd/spi/built-in.o drivers/mtd/spi/sf_probe.o: In function `spi_flash_mtd_unregister': /home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: multiple definition of `spi_flash_mtd_unregister' drivers/mtd/spi/sf_params.o:/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: first defined here drivers/mtd/spi/sf_ops.o: In function `spi_flash_mtd_unregister': /home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: multiple definition of `spi_flash_mtd_unregister' drivers/mtd/spi/sf_params.o:/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: first defined here make[1]: *** [drivers/mtd/spi/built-in.o] Fehler 1 make: *** [drivers/mtd/spi] Fehler 2 - Add a README entry. - Add correct writebufsize, to fit with Linux v3.14 MTD, UBI/UBIFS sync. Note (From Jagan): For testing raw mtd parition erase/read/write operations using cmd_sf, sf_mtd should be required to register the spi flash device to MTD layer but the sf_mtd_info ops were not required until and unless if we use any flash filesystem layer say for example UBI. Due to this the foot-print got increased ~290bytes in non-UBI case here that should be acceptible. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Heiko Schocher <hs@denx.de> Tested-by: Jagannadh Teki <jteki@openedev.com> Reviewed-by: Jagannadh Teki <jteki@openedev.com>
This commit is contained in:

committed by
Jagan Teki

parent
ecfbaa869a
commit
9fe6d8716e
9
README
9
README
@ -3090,6 +3090,15 @@ CBFS (Coreboot Filesystem) support
|
||||
memories can be connected with a given cs line.
|
||||
Currently Xilinx Zynq qspi supports these type of connections.
|
||||
|
||||
CONFIG_SPI_FLASH_MTD spi-flash MTD layer
|
||||
|
||||
Define this option to use mtd support for spi flash layer, this
|
||||
adapter is for translating mtd_read/mtd_write commands into
|
||||
spi_flash_read/spi_flash_write commands. It is not intended to
|
||||
use it within sf_cmd or the SPI flash subsystem. Such an adapter
|
||||
is needed for subsystems like UBI which can only operate on top
|
||||
of the MTD layer.
|
||||
|
||||
- SystemACE Support:
|
||||
CONFIG_SYSTEMACE
|
||||
|
||||
|
Reference in New Issue
Block a user