1/*
2 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
3 * Permission to use, copy, modify, and/or distribute this software for
4 * any purpose with or without fee is hereby granted, provided that the
5 * above copyright notice and this permission notice appear in all copies.
6 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
12 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13 */
14
15
16
17#ifndef _ISISC_REG_ACCESS_H_
18#define _ISISC_REG_ACCESS_H_
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
24#include "common/sw.h"
25
26    sw_error_t
27    isisc_phy_get(a_uint32_t dev_id, a_uint32_t phy_addr,
28                 a_uint32_t reg, a_uint16_t * value);
29
30    sw_error_t
31    isisc_phy_set(a_uint32_t dev_id, a_uint32_t phy_addr,
32                 a_uint32_t reg, a_uint16_t value);
33
34    sw_error_t
35    isisc_reg_get(a_uint32_t dev_id, a_uint32_t reg_addr, a_uint8_t value[],
36                 a_uint32_t value_len);
37
38    sw_error_t
39    isisc_reg_set(a_uint32_t dev_id, a_uint32_t reg_addr, a_uint8_t value[],
40                 a_uint32_t value_len);
41
42    sw_error_t
43    isisc_reg_field_get(a_uint32_t dev_id, a_uint32_t reg_addr,
44                       a_uint32_t bit_offset, a_uint32_t field_len,
45                       a_uint8_t value[], a_uint32_t value_len);
46
47    sw_error_t
48    isisc_reg_field_set(a_uint32_t dev_id, a_uint32_t reg_addr,
49                       a_uint32_t bit_offset, a_uint32_t field_len,
50                       const a_uint8_t value[], a_uint32_t value_len);
51
52	HSL_LOCAL sw_error_t
53	isisc_regsiter_dump(a_uint32_t dev_id,a_uint32_t register_idx, fal_reg_dump_t * reg_dump);
54
55	HSL_LOCAL sw_error_t
56	isisc_debug_regsiter_dump(a_uint32_t dev_id, fal_debug_reg_dump_t * reg_dump);
57
58
59    sw_error_t
60    isisc_reg_access_init(a_uint32_t dev_id, hsl_access_mode mode);
61
62    sw_error_t
63    isisc_access_mode_set(a_uint32_t dev_id, hsl_access_mode mode);
64
65
66#ifdef __cplusplus
67}
68#endif /* __cplusplus */
69
70#endif /* _ISISC_REG_ACCESS_H_ */
71
72