blob: 03058e9c9f8769a02572d02ee899ff97adad4af5 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
2 * Copyright (c) 2018, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef __IO_NOR_FLASH_H__
8#define __IO_NOR_FLASH_H__
9
10#include <platform_def.h>
11
12#ifndef NOR_FLASH_BLOCK_SIZE
13 #error NOR_FLASH_BLOCK_SIZE must be defined as the block \
14 size of the NOR Flash seen by the software
15#endif
16
17/* IO NOR Flash specification - used to refer to data on a memory map device
18 * supporting block-like entities */
19typedef struct io_nor_spec {
20 /* Base Address of the NOR Flash device - it is required to program
21 * the flash */
22 uintptr_t device_address;
23 uintptr_t region_address;
24 uint32_t block_size;
25 uint32_t block_count;
26} io_nor_flash_spec_t;
27
28struct io_dev_connector;
29
30int register_io_dev_nor_flash(const struct io_dev_connector **dev_con);
31
32#endif /* __IO_NOR_FLASH_H__ */