2 * flash-manager - Tizen kernel-level image flashing solution
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include <sys/queue.h>
23 #define DFU_DELIMITER " :,\t\n"
24 #define DFU_INFO_NUM 100
25 #define DFU_MOUNT_PATH "/mnt/tfm-temp"
27 #define DFU_INFO_MODE_PARTITION 'p'
28 #define DFU_INFO_MODE_FILE 'f'
38 enum dfu_thread_state {
39 DFU_THREAD_STATE_ERROR = -1,
40 DFU_THREAD_STATE_IDLE,
41 DFU_THREAD_STATE_FLASHING,
47 TAILQ_ENTRY(dfu_frame) entry;
50 void *dfu_get_buffer(unsigned long size);
51 void dfu_put_buffer(void *ptr);
52 int dfu_init(struct tfm_context *ctx, const char *dfu_info_file);
53 void dfu_exit(struct tfm_context *ctx);
54 int dfu_start(struct tfm_context *ctx, const char *entity);
55 int dfu_request_io(struct tfm_context *ctx, unsigned long len);
56 void dfu_sync(struct tfm_context *ctx);