1 /* 2 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: GPL-2.0 5 */ 6 7 #ifndef __RK_SFTL_H 8 #define __RK_SFTL_H 9 10 u32 ftl_low_format(void); 11 int sftl_init(void); 12 int sftl_deinit(void); 13 int sftl_read(u32 index, u32 count, u8 *buf); 14 int sftl_write(u32 index, u32 count, u8 *buf); 15 u32 sftl_get_density(void); 16 s32 sftl_gc(void); 17 int sftl_vendor_read(u32 index, u32 count, u8 *buf); 18 int sftl_vendor_write(u32 index, u32 count, u8 *buf); 19 20 void *ftl_malloc(int n_size); 21 void ftl_free(void *p); 22 void *ftl_memset(void *s, int c, unsigned int n); 23 void *ftl_memcpy(void *pv_to, 24 const void *pv_from, 25 unsigned int size); 26 #endif 27