/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2020-2020. All rights reserved. * Description: external interface module, support emmc, nand, spi-nor * Author: Hisilicon * Create: 2020-10-15 */ #include "soc_log.h" #include "uapi_flash.h" #include "mpi_flash_ext.h" td_handle ext_mpi_flash_open(ext_mpi_flash_type flash_type, const td_char *partition_name) { return uapi_flash_open((uapi_flash_type)flash_type, partition_name); } td_handle ext_mpi_flash_open_by_addr(ext_mpi_flash_type flash_type, td_u64 address, td_u64 len) { return uapi_flash_open_by_addr((uapi_flash_type)flash_type, address, len); } td_s32 ext_mpi_flash_close(td_handle handle) { return uapi_flash_close(handle); } td_s64 ext_mpi_flash_erase(td_handle handle, td_u64 offset, td_u64 len) { return uapi_flash_erase(handle, offset, len); } td_s64 ext_mpi_flash_read(td_handle handle, td_u64 offset, td_u8 *buf, td_u64 len, td_u32 flags) { return uapi_flash_read(handle, offset, buf, len, flags); } td_s64 ext_mpi_flash_write(td_handle handle, td_u64 offset, td_u8 *buf, td_u64 len, td_u32 flags) { return uapi_flash_write(handle, offset, buf, len, flags); } td_s32 ext_mpi_flash_getinfo(td_handle handle, ext_mpi_flash_info *flash_info) { return uapi_flash_getinfo(handle, (uapi_flash_info *)flash_info); }