drivers: rknand: add nand flash drivers for spl
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I21c449226f57f2ff05fdcf241dde014062634cb5
This commit is contained in:
parent
d7965d03e2
commit
e18e709024
|
|
@ -59,7 +59,7 @@ obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/
|
||||||
obj-$(CONFIG_SPL_MMC_SUPPORT) += block/
|
obj-$(CONFIG_SPL_MMC_SUPPORT) += block/
|
||||||
obj-$(CONFIG_SPL_MTD_SUPPORT) += block/
|
obj-$(CONFIG_SPL_MTD_SUPPORT) += block/
|
||||||
obj-$(CONFIG_SPL_FPGA_SUPPORT) += fpga/
|
obj-$(CONFIG_SPL_FPGA_SUPPORT) += fpga/
|
||||||
|
obj-$(CONFIG_SPL_RKNAND_SUPPORT) += rknand/
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,15 @@
|
||||||
config RKNAND
|
config RKNAND
|
||||||
bool "Rockchip NAND FLASH device support"
|
bool "Rockchip NAND FLASH device support"
|
||||||
depends on BLK
|
depends on BLK
|
||||||
select ZFTL if ROCKCHIP_PX30
|
select ZFTL if (ROCKCHIP_PX30 || ROCKCHIP_RK3568)
|
||||||
help
|
help
|
||||||
This option enables support for Rockchip NAND FLASH devices.
|
This option enables support for Rockchip NAND FLASH devices.
|
||||||
It supports block interface(with rk ftl) to read and write NAND FLASH.
|
It supports block interface(with rk ftl) to read and write NAND FLASH.
|
||||||
|
|
||||||
config ZFTL
|
config ZFTL
|
||||||
bool "Rockchip ZFTL for rkpx30/rk3326 to support 3D/2D TLC/MLC"
|
bool "Rockchip ZFTL for rkpx30/rk3326 to support 3D/2D TLC/MLC"
|
||||||
depends on RKNAND && (ROCKCHIP_PX30)
|
depends on RKNAND && (ROCKCHIP_PX30 || ROCKCHIP_RK3568)
|
||||||
default y if ROCKCHIP_PX30
|
default y if (ROCKCHIP_PX30 || ROCKCHIP_RK3568)
|
||||||
help
|
help
|
||||||
This option enables support for Rockchip NAND FLASH devices.
|
This option enables support for Rockchip NAND FLASH devices.
|
||||||
It supports block interface(with zftl) to read and write 3D/2D TLC/MLC
|
It supports block interface(with zftl) to read and write 3D/2D TLC/MLC
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,11 @@ obj-y += rknand.o
|
||||||
ifdef CONFIG_ARM64
|
ifdef CONFIG_ARM64
|
||||||
|
|
||||||
ifdef CONFIG_ZFTL
|
ifdef CONFIG_ZFTL
|
||||||
|
ifdef CONFIG_SPL_BUILD
|
||||||
|
obj-y += rk_zftl_spl_arm_v8.o
|
||||||
|
else
|
||||||
obj-y += rk_zftl_arm_v8.o
|
obj-y += rk_zftl_arm_v8.o
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
obj-y += rk_ftl_arm_v8.o
|
obj-y += rk_ftl_arm_v8.o
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -191,9 +191,11 @@ static int rockchip_nand_probe(struct udevice *udev)
|
||||||
ndev->read = ftl_read;
|
ndev->read = ftl_read;
|
||||||
ndev->write = ftl_write;
|
ndev->write = ftl_write;
|
||||||
ndev->erase = ftl_discard;
|
ndev->erase = ftl_discard;
|
||||||
|
#ifndef CONFIG_SPL_BUILD
|
||||||
#ifdef CONFIG_ROCKCHIP_VENDOR_PARTITION
|
#ifdef CONFIG_ROCKCHIP_VENDOR_PARTITION
|
||||||
flash_vendor_dev_ops_register(rkftl_nand_vendor_read,
|
flash_vendor_dev_ops_register(rkftl_nand_vendor_read,
|
||||||
rkftl_nand_vendor_write);
|
rkftl_nand_vendor_write);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -202,10 +204,8 @@ static int rockchip_nand_probe(struct udevice *udev)
|
||||||
|
|
||||||
static const struct blk_ops rknand_blk_ops = {
|
static const struct blk_ops rknand_blk_ops = {
|
||||||
.read = rknand_bread,
|
.read = rknand_bread,
|
||||||
#ifndef CONFIG_SPL_BUILD
|
|
||||||
.write = rknand_bwrite,
|
.write = rknand_bwrite,
|
||||||
.erase = rknand_berase,
|
.erase = rknand_berase,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct udevice_id rockchip_nand_ids[] = {
|
static const struct udevice_id rockchip_nand_ids[] = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue