summaryrefslogtreecommitdiff
path: root/include/amlogic/storage_if.h (plain)
blob: 1824821fad0d4ea846eb0b4b286430ab08696cb7
1/*
2 * \file storage_if.h
3 * \brief interfaces declarations for storage operations
4 *
5 * \version 1.0.0
6 * \date 2013-7-16
7 * \author Sam.Wu <yihui.wu@amlgic.com>
8 *
9 * Copyright (c) 2013 Amlogic. All Rights Reserved.
10 *
11 */
12#ifndef __STOARGE_IF_H__
13#define __STOARGE_IF_H__
14
15
16/***
17upgrade_read_ops:
18
19partition_name: env / logo / recovery /boot / system /cache /media
20
21***/
22int store_read_ops(unsigned char *partition_name,unsigned char * buf, uint64_t off, uint64_t size);
23
24
25/***
26upgrade_write_ops:
27
28partition_name: env / logo / recovery /boot / system /cache /media
29
30***/
31int store_write_ops(unsigned char *partition_name,unsigned char * buf,uint64_t off, uint64_t size);
32
33
34/***
35upgrade_write_ops:
36
37partition_name: env / logo / recovery /boot / system /cache /media
38
39***/
40int store_get_partititon_size(unsigned char *partition_name, uint64_t *size);
41
42
43/***
44upgrade_erase_ops:
45
46partition_name: boot / data
47
48flag = 0; indicate erase partition ;
49flag = 1; indicate scurb whole nand;
50
51***/
52int store_erase_ops(unsigned char *par_name, uint64_t off, uint64_t size, unsigned char flag);
53
54/***
55bootloader:
56***/
57int store_boot_read(unsigned char * buf, uint64_t off, uint64_t size);
58
59int store_boot_write(unsigned char * buf,uint64_t off, uint64_t size);
60
61int store_init(unsigned flag);
62
63int store_exit(void);
64
65//dtb read/write
66//@rwFlag: 0---read, 1---write, 2---iread
67int store_dtb_rw(void* buf, unsigned dtbSz, int rwFlag);
68
69//key read/write
70int store_key_read(uint8_t * buffer,
71 uint32_t length, uint32_t *actual_lenth);
72int store_key_write(uint8_t * buffer,
73 uint32_t length, uint32_t *actual_lenth);
74
75#endif//ifndef __STOARGE_IF_H__
76
77