blob: 4f3ab39d4d9673560ced82b820fa33f41ef3c844 [file] [log] [blame]
Haojian Zhuang12ade162016-03-18 15:14:19 +08001/*
2 * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Haojian Zhuang12ade162016-03-18 15:14:19 +08005 */
6
7#ifndef __IO_BLOCK_H__
8#define __IO_BLOCK_H__
9
10#include <io_storage.h>
11
12/* block devices ops */
13typedef 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
18typedef 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
24struct io_dev_connector;
25
26int register_io_dev_block(const struct io_dev_connector **dev_con);
27
28#endif /* __IO_BLOCK_H__ */