Lines Matching refs:addr

16 static inline unsigned char litex_read8(unsigned long addr)  in litex_read8()  argument
19 return sys_read8(addr); in litex_read8()
25 static inline unsigned short litex_read16(unsigned long addr) in litex_read16() argument
28 return (sys_read8(addr) << 8) in litex_read16()
29 | sys_read8(addr + 0x4); in litex_read16()
31 return sys_read16(addr); in litex_read16()
37 static inline unsigned int litex_read32(unsigned long addr) in litex_read32() argument
40 return (sys_read8(addr) << 24) in litex_read32()
41 | (sys_read8(addr + 0x4) << 16) in litex_read32()
42 | (sys_read8(addr + 0x8) << 8) in litex_read32()
43 | sys_read8(addr + 0xc); in litex_read32()
45 return sys_read32(addr); in litex_read32()
51 static inline uint64_t litex_read64(unsigned long addr) in litex_read64() argument
54 return (((uint64_t)sys_read8(addr)) << 56) in litex_read64()
55 | ((uint64_t)sys_read8(addr + 0x4) << 48) in litex_read64()
56 | ((uint64_t)sys_read8(addr + 0x8) << 40) in litex_read64()
57 | ((uint64_t)sys_read8(addr + 0xc) << 32) in litex_read64()
58 | ((uint64_t)sys_read8(addr + 0x10) << 24) in litex_read64()
59 | ((uint64_t)sys_read8(addr + 0x14) << 16) in litex_read64()
60 | ((uint64_t)sys_read8(addr + 0x18) << 8) in litex_read64()
61 | (uint64_t)sys_read8(addr + 0x1c); in litex_read64()
63 return ((uint64_t)sys_read32(addr) << 32) | (uint64_t)sys_read32(addr + 0x4); in litex_read64()
65 return sys_read64(addr); in litex_read64()
71 static inline void litex_write8(unsigned char value, unsigned long addr) in litex_write8() argument
74 sys_write8(value, addr); in litex_write8()
80 static inline void litex_write16(unsigned short value, unsigned long addr) in litex_write16() argument
83 sys_write8(value >> 8, addr); in litex_write16()
84 sys_write8(value, addr + 0x4); in litex_write16()
86 sys_write16(value, addr); in litex_write16()
92 static inline void litex_write32(unsigned int value, unsigned long addr) in litex_write32() argument
95 sys_write8(value >> 24, addr); in litex_write32()
96 sys_write8(value >> 16, addr + 0x4); in litex_write32()
97 sys_write8(value >> 8, addr + 0x8); in litex_write32()
98 sys_write8(value, addr + 0xC); in litex_write32()
100 sys_write32(value, addr); in litex_write32()
106 static inline void litex_write64(uint64_t value, unsigned long addr) in litex_write64() argument
109 sys_write8(value >> 56, addr); in litex_write64()
110 sys_write8(value >> 48, addr + 0x4); in litex_write64()
111 sys_write8(value >> 40, addr + 0x8); in litex_write64()
112 sys_write8(value >> 32, addr + 0xC); in litex_write64()
113 sys_write8(value >> 24, addr + 0x10); in litex_write64()
114 sys_write8(value >> 16, addr + 0x14); in litex_write64()
115 sys_write8(value >> 8, addr + 0x18); in litex_write64()
116 sys_write8(value, addr + 0x1C); in litex_write64()
118 sys_write32(value >> 32, addr); in litex_write64()
119 sys_write32(value, addr + 0x4); in litex_write64()
121 sys_write64(value, addr); in litex_write64()
132 static inline void litex_write(uint32_t addr, uint32_t size, uint32_t value) in litex_write() argument
136 litex_write8(value, addr); in litex_write()
139 litex_write16(value, addr); in litex_write()
142 litex_write32(value, addr); in litex_write()
154 static inline uint32_t litex_read(uint32_t addr, uint32_t size) in litex_read() argument
158 return litex_read8(addr); in litex_read()
160 return litex_read16(addr); in litex_read()
162 return litex_read32(addr); in litex_read()