2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #include "ia_css_device_access.h"
16 #include <type_support.h> /* for uint*, size_t */
17 #include <system_types.h> /* for hrt_address */
18 #include <ia_css_env.h> /* for ia_css_hw_access_env */
19 #include <assert_support.h> /* for assert */
21 static struct ia_css_hw_access_env my_env;
24 ia_css_device_access_init(const struct ia_css_hw_access_env *env)
32 ia_css_device_load_uint8(const hrt_address addr)
34 return my_env.load_8(addr);
38 ia_css_device_load_uint16(const hrt_address addr)
40 return my_env.load_16(addr);
44 ia_css_device_load_uint32(const hrt_address addr)
46 return my_env.load_32(addr);
50 ia_css_device_load_uint64(const hrt_address addr)
59 ia_css_device_store_uint8(const hrt_address addr, const uint8_t data)
61 my_env.store_8(addr, data);
65 ia_css_device_store_uint16(const hrt_address addr, const uint16_t data)
67 my_env.store_16(addr, data);
71 ia_css_device_store_uint32(const hrt_address addr, const uint32_t data)
73 my_env.store_32(addr, data);
77 ia_css_device_store_uint64(const hrt_address addr, const uint64_t data)
86 ia_css_device_load(const hrt_address addr, void *data, const size_t size)
88 my_env.load(addr, data, (uint32_t)size);
92 ia_css_device_store(const hrt_address addr, const void *data, const size_t size)
94 my_env.store(addr, data, (uint32_t)size);