|
@@ -33,7 +33,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
33
|
33
|
*/
|
34
|
34
|
|
35
|
35
|
/** An ARM I/O qword */
|
36
|
|
-union arm_io_qword {
|
|
36
|
+union arm32_io_qword {
|
37
|
37
|
uint64_t qword;
|
38
|
38
|
uint32_t dword[2];
|
39
|
39
|
};
|
|
@@ -44,12 +44,12 @@ union arm_io_qword {
|
44
|
44
|
* @v io_addr I/O address
|
45
|
45
|
* @ret data Value read
|
46
|
46
|
*
|
47
|
|
- * This is not atomic for ARM.
|
|
47
|
+ * This is not atomic for ARM32.
|
48
|
48
|
*/
|
49
|
|
-static uint64_t arm_readq ( volatile uint64_t *io_addr ) {
|
50
|
|
- volatile union arm_io_qword *ptr =
|
51
|
|
- container_of ( io_addr, union arm_io_qword, qword );
|
52
|
|
- union arm_io_qword tmp;
|
|
49
|
+static uint64_t arm32_readq ( volatile uint64_t *io_addr ) {
|
|
50
|
+ volatile union arm32_io_qword *ptr =
|
|
51
|
+ container_of ( io_addr, union arm32_io_qword, qword );
|
|
52
|
+ union arm32_io_qword tmp;
|
53
|
53
|
|
54
|
54
|
tmp.dword[0] = readl ( &ptr->dword[0] );
|
55
|
55
|
tmp.dword[1] = readl ( &ptr->dword[1] );
|
|
@@ -62,12 +62,12 @@ static uint64_t arm_readq ( volatile uint64_t *io_addr ) {
|
62
|
62
|
* @v data Value to write
|
63
|
63
|
* @v io_addr I/O address
|
64
|
64
|
*
|
65
|
|
- * This is not atomic for ARM.
|
|
65
|
+ * This is not atomic for ARM32.
|
66
|
66
|
*/
|
67
|
|
-static void arm_writeq ( uint64_t data, volatile uint64_t *io_addr ) {
|
68
|
|
- volatile union arm_io_qword *ptr =
|
69
|
|
- container_of ( io_addr, union arm_io_qword, qword );
|
70
|
|
- union arm_io_qword tmp;
|
|
67
|
+static void arm32_writeq ( uint64_t data, volatile uint64_t *io_addr ) {
|
|
68
|
+ volatile union arm32_io_qword *ptr =
|
|
69
|
+ container_of ( io_addr, union arm32_io_qword, qword );
|
|
70
|
+ union arm32_io_qword tmp;
|
71
|
71
|
|
72
|
72
|
tmp.qword = data;
|
73
|
73
|
writel ( tmp.dword[0], &ptr->dword[0] );
|
|
@@ -84,5 +84,5 @@ PROVIDE_IOAPI_INLINE ( arm, writew );
|
84
|
84
|
PROVIDE_IOAPI_INLINE ( arm, writel );
|
85
|
85
|
PROVIDE_IOAPI_INLINE ( arm, iodelay );
|
86
|
86
|
PROVIDE_IOAPI_INLINE ( arm, mb );
|
87
|
|
-PROVIDE_IOAPI ( arm, readq, arm_readq );
|
88
|
|
-PROVIDE_IOAPI ( arm, writeq, arm_writeq );
|
|
87
|
+PROVIDE_IOAPI ( arm, readq, arm32_readq );
|
|
88
|
+PROVIDE_IOAPI ( arm, writeq, arm32_writeq );
|