This source file includes following definitions.
- __raw_readsw
- __raw_writesw
- __raw_readsl
- __raw_writesl
1
2
3
4
5
6
7
8 #include <asm/io.h>
9
10
11
12
13
14
15
16
17
18 void __raw_readsw(const void __iomem *addr, void *data, int len)
19 {
20 const volatile short int *src = (short int *) addr;
21 short int *dst = (short int *) data;
22
23 if ((u32)data & 0x1)
24 panic("unaligned pointer to readsw");
25
26 while (len-- > 0)
27 *dst++ = *src;
28
29 }
30
31
32
33
34
35
36
37 void __raw_writesw(void __iomem *addr, const void *data, int len)
38 {
39 const short int *src = (short int *)data;
40 volatile short int *dst = (short int *)addr;
41
42 if ((u32)data & 0x1)
43 panic("unaligned pointer to writesw");
44
45 while (len-- > 0)
46 *dst = *src++;
47
48
49 }
50
51
52 void __raw_readsl(const void __iomem *addr, void *data, int len)
53 {
54 const volatile long *src = (long *) addr;
55 long *dst = (long *) data;
56
57 if ((u32)data & 0x3)
58 panic("unaligned pointer to readsl");
59
60 while (len-- > 0)
61 *dst++ = *src;
62
63
64 }
65
66 void __raw_writesl(void __iomem *addr, const void *data, int len)
67 {
68 const long *src = (long *)data;
69 volatile long *dst = (long *)addr;
70
71 if ((u32)data & 0x3)
72 panic("unaligned pointer to writesl");
73
74 while (len-- > 0)
75 *dst = *src++;
76
77
78 }