• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef __IO_BLOCK_H__
8 #define __IO_BLOCK_H__
9 
10 #include <io_storage.h>
11 
12 /* block devices ops */
13 typedef struct io_block_ops {
14 	size_t	(*read)(int lba, uintptr_t buf, size_t size);
15 	size_t	(*write)(int lba, const uintptr_t buf, size_t size);
16 } io_block_ops_t;
17 
18 typedef struct io_block_dev_spec {
19 	io_block_spec_t	buffer;
20 	io_block_ops_t	ops;
21 	size_t		block_size;
22 } io_block_dev_spec_t;
23 
24 struct io_dev_connector;
25 
26 int register_io_dev_block(const struct io_dev_connector **dev_con);
27 
28 #endif /* __IO_BLOCK_H__ */
29