grlib: use cpu-independent routines for uncached access

Update #3678.
This commit is contained in:
Jiri Gaisler
2019-01-18 18:00:47 +01:00
committed by Sebastian Huber
parent 5981c8ca9f
commit 9b2b389e8d
10 changed files with 145 additions and 71 deletions

View File

@@ -59,15 +59,7 @@
#endif
#define READ_REG(address) (*(volatile unsigned int *)address)
#define READ_DMA(address) _BRM_REG_READ16((unsigned int)address)
static __inline__ unsigned short _BRM_REG_READ16(unsigned int addr) {
unsigned short tmp;
__asm__ (" lduha [%1]1, %0 "
: "=r"(tmp)
: "r"(addr)
);
return tmp;
}
#define READ_DMA(address) grlib_read_uncached16((unsigned int)address)
static rtems_device_driver brm_initialize(rtems_device_major_number major, rtems_device_minor_number minor, void *arg);
static rtems_device_driver brm_open(rtems_device_major_number major, rtems_device_minor_number minor, void *arg);