mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
drivers: rkflash: add rkflash proc info
Change-Id: I7316c628d79cdee8fb513e144b6c365a142d4ecb Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -14,6 +14,15 @@ u32 sftl_get_density(void);
|
||||
s32 sftl_gc(void);
|
||||
int sftl_vendor_read(u32 index, u32 count, u8 *buf);
|
||||
int sftl_vendor_write(u32 index, u32 count, u8 *buf);
|
||||
|
||||
/*
|
||||
* rknand_proc_ftlread() Read FTL info which's about 2KB size
|
||||
*
|
||||
* @size: buf size(>= 2KB)
|
||||
* @buf: buf for caching ftl info
|
||||
* @return real size of caching ftl info
|
||||
*/
|
||||
int rknand_proc_ftlread(int size, char *buf);
|
||||
int rk_sftl_vendor_read(u32 id, u8 *buf, u32 size);
|
||||
int rk_sftl_vendor_write(u32 id, u8 *buf, u32 size);
|
||||
int rk_sftl_vendor_register(void);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -188,10 +188,17 @@ static unsigned int rk_partition_init(struct flash_part *part)
|
||||
|
||||
static int rkflash_proc_show(struct seq_file *m, void *v)
|
||||
{
|
||||
int real_size = 0;
|
||||
char *ftl_buf = kzalloc(4096, GFP_KERNEL);
|
||||
|
||||
real_size = rknand_proc_ftlread(4096, ftl_buf);
|
||||
if (real_size > 0)
|
||||
seq_printf(m, "%s", ftl_buf);
|
||||
seq_printf(m, "Totle Read %ld KB\n", totle_read_data >> 1);
|
||||
seq_printf(m, "Totle Write %ld KB\n", totle_write_data >> 1);
|
||||
seq_printf(m, "totle_write_count %ld\n", totle_write_count);
|
||||
seq_printf(m, "totle_read_count %ld\n", totle_read_count);
|
||||
kfree(ftl_buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user