blob: 68060558ba5b7286321f8f3860ed587cf3d0e34e [file] [log] [blame]
Yann Gautiereb16b472018-10-15 09:36:32 +02001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef IO_STM32IMAGE_H
8#define IO_STM32IMAGE_H
9
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000010#include <drivers/io/io_driver.h>
11#include <drivers/partition/partition.h>
Yann Gautiereb16b472018-10-15 09:36:32 +020012
13#define MAX_LBA_SIZE 512
14#define MAX_PART_NAME_SIZE (EFI_NAMELEN + 1)
15#define STM32_PART_NUM (PLAT_PARTITION_MAX_ENTRIES - STM32_TF_A_COPIES)
16
17struct stm32image_part_info {
18 char name[MAX_PART_NAME_SIZE];
19 uint32_t binary_type;
20 uintptr_t part_offset;
21 uint32_t bkp_offset;
22};
23
24struct stm32image_device_info {
25 struct stm32image_part_info part_info[STM32_PART_NUM];
26 uint32_t device_size;
27 uint32_t lba_size;
28};
29
30int register_io_dev_stm32image(const io_dev_connector_t **dev_con);
31
32#endif /* IO_STM32IMAGE_H */