1 /***************************************************************************//**
\r
2 * (c) Copyright 2007-2018 Microsemi SoC Products Group. All rights reserved.
\r
4 * Hardware registers access functions.
\r
5 * The implementation of these function is platform and toolchain specific.
\r
6 * The functions declared here are implemented using assembler as part of the
\r
7 * processor/toolchain specific HAL.
\r
9 * SVN $Revision: 9661 $
\r
10 * SVN $Date: 2018-01-15 16:13:33 +0530 (Mon, 15 Jan 2018) $
\r
14 .globl HW_set_32bit_reg
\r
15 .globl HW_get_32bit_reg
\r
16 .globl HW_set_32bit_reg_field
\r
17 .globl HW_get_32bit_reg_field
\r
18 .globl HW_set_16bit_reg
\r
19 .globl HW_get_16bit_reg
\r
20 .globl HW_set_16bit_reg_field
\r
21 .globl HW_get_16bit_reg_field
\r
22 .globl HW_set_8bit_reg
\r
23 .globl HW_get_8bit_reg
\r
24 .globl HW_set_8bit_reg_field
\r
25 .globl HW_get_8bit_reg_field
\r
28 /***************************************************************************//**
\r
29 * HW_set_32bit_reg is used to write the content of a 32 bits wide peripheral
\r
32 * a0: addr_t reg_addr
\r
33 * a1: uint32_t value
\r
39 /***************************************************************************//**
\r
40 * HW_get_32bit_reg is used to read the content of a 32 bits wide peripheral
\r
43 * R0: addr_t reg_addr
\r
44 * @return 32 bits value read from the peripheral register.
\r
50 /***************************************************************************//**
\r
51 * HW_set_32bit_reg_field is used to set the content of a field in a 32 bits
\r
52 * wide peripheral register.
\r
54 * a0: addr_t reg_addr
\r
55 * a1: int_fast8_t shift
\r
57 * a3: uint32_t value
\r
59 HW_set_32bit_reg_field:
\r
71 /***************************************************************************//**
\r
72 * HW_get_32bit_reg_field is used to read the content of a field out of a
\r
73 * 32 bits wide peripheral register.
\r
75 * a0: addr_t reg_addr
\r
76 * a1: int_fast8_t shift
\r
79 * @return 32 bits value containing the register field value specified
\r
82 HW_get_32bit_reg_field:
\r
88 /***************************************************************************//**
\r
89 * HW_set_16bit_reg is used to write the content of a 16 bits wide peripheral
\r
92 * a0: addr_t reg_addr
\r
93 * a1: uint_fast16_t value
\r
99 /***************************************************************************//**
\r
100 * HW_get_16bit_reg is used to read the content of a 16 bits wide peripheral
\r
103 * a0: addr_t reg_addr
\r
104 * @return 16 bits value read from the peripheral register.
\r
110 /***************************************************************************//**
\r
111 * HW_set_16bit_reg_field is used to set the content of a field in a 16 bits
\r
112 * wide peripheral register.
\r
114 * a0: addr_t reg_addr
\r
115 * a1: int_fast8_t shift
\r
116 * a2: uint_fast16_t mask
\r
117 * a3: uint_fast16_t value
\r
118 * @param value Value to be written in the specified field.
\r
120 HW_set_16bit_reg_field:
\r
132 /***************************************************************************//**
\r
133 * HW_get_16bit_reg_field is used to read the content of a field from a
\r
134 * 16 bits wide peripheral register.
\r
136 * a0: addr_t reg_addr
\r
137 * a1: int_fast8_t shift
\r
138 * a2: uint_fast16_t mask
\r
140 * @return 16 bits value containing the register field value specified
\r
143 HW_get_16bit_reg_field:
\r
149 /***************************************************************************//**
\r
150 * HW_set_8bit_reg is used to write the content of a 8 bits wide peripheral
\r
153 * a0: addr_t reg_addr
\r
154 * a1: uint_fast8_t value
\r
160 /***************************************************************************//**
\r
161 * HW_get_8bit_reg is used to read the content of a 8 bits wide peripheral
\r
164 * a0: addr_t reg_addr
\r
165 * @return 8 bits value read from the peripheral register.
\r
171 /***************************************************************************//**
\r
172 * HW_set_8bit_reg_field is used to set the content of a field in a 8 bits
\r
173 * wide peripheral register.
\r
175 * a0: addr_t reg_addr,
\r
176 * a1: int_fast8_t shift
\r
177 * a2: uint_fast8_t mask
\r
178 * a3: uint_fast8_t value
\r
180 HW_set_8bit_reg_field:
\r
192 /***************************************************************************//**
\r
193 * HW_get_8bit_reg_field is used to read the content of a field from a
\r
194 * 8 bits wide peripheral register.
\r
196 * a0: addr_t reg_addr
\r
197 * a1: int_fast8_t shift
\r
198 * a2: uint_fast8_t mask
\r
200 * @return 8 bits value containing the register field value specified
\r
203 HW_get_8bit_reg_field:
\r