1 /*
2  * Copyright (c) 2023 Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the License); you may
7  * not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #include "Driver_Flash_Strata.h"
20 #include "cmsis_driver_config.h"
21 #include "RTE_Device.h"
22 
23 #if (RTE_FLASH0)
24 static ARM_FLASH_INFO ARM_FLASH0_DEV_DATA = {
25     .sector_info    = NULL,     /* Uniform sector layout */
26     .sector_count   = BOOT_FLASH_SIZE / 0x1000,
27     .sector_size    = 0x1000,
28     .page_size      = 256U,
29     .program_unit   = 1U,
30     .erased_value   = ARM_FLASH_DRV_ERASE_VALUE
31 };
32 
33 static struct arm_strata_flash_dev_t ARM_FLASH0_DEV = {
34     .dev    = &FLASH0_DEV,
35     .data   = &ARM_FLASH0_DEV_DATA
36 };
37 
38 ARM_FLASH_STRATA(ARM_FLASH0_DEV, Driver_FLASH0);
39 #endif /* RTE_FLASH0 */
40