Add __iowrite32_copy() to the Linux kernel compatibility layer.
Reviewed by: hselasky
This commit is contained in:
parent
93fb610fe8
commit
8636496407
@ -201,6 +201,17 @@ void iounmap(void *addr);
|
||||
#define memcpy_fromio(a, b, c) memcpy((a), (b), (c))
|
||||
#define memcpy_toio(a, b, c) memcpy((a), (b), (c))
|
||||
|
||||
static inline void
|
||||
__iowrite32_copy(void *to, void *from, size_t count)
|
||||
{
|
||||
uint32_t *src;
|
||||
uint32_t *dst;
|
||||
int i;
|
||||
|
||||
for (i = 0, src = from, dst = to; i < count; i++, src++, dst++)
|
||||
__raw_writel(*src, dst);
|
||||
}
|
||||
|
||||
static inline void
|
||||
__iowrite64_copy(void *to, void *from, size_t count)
|
||||
{
|
||||
@ -212,13 +223,7 @@ __iowrite64_copy(void *to, void *from, size_t count)
|
||||
for (i = 0, src = from, dst = to; i < count; i++, src++, dst++)
|
||||
__raw_writeq(*src, dst);
|
||||
#else
|
||||
uint32_t *src;
|
||||
uint32_t *dst;
|
||||
int i;
|
||||
|
||||
count *= 2;
|
||||
for (i = 0, src = from, dst = to; i < count; i++, src++, dst++)
|
||||
__raw_writel(*src, dst);
|
||||
__iowrite32_copy(to, from, count * 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user