forked from Imagelibrary/rtems
committed by
Sebastian Huber
parent
5981c8ca9f
commit
9b2b389e8d
@@ -152,32 +152,9 @@ void (*grspw_timecode_callback)
|
||||
#define _MEM_READ8(address) (*(volatile unsigned char *)(address))
|
||||
#define _MEM_READ32(address) (*(volatile unsigned int *)(address))
|
||||
#else
|
||||
static inline unsigned int _SPW_READ(volatile void *addr) {
|
||||
unsigned int tmp;
|
||||
__asm__ (" lda [%1]1, %0 "
|
||||
: "=r"(tmp)
|
||||
: "r"(addr)
|
||||
);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static inline unsigned int _MEM_READ8(volatile void *addr) {
|
||||
unsigned int tmp;
|
||||
__asm__ (" lduba [%1]1, %0 "
|
||||
: "=r"(tmp)
|
||||
: "r"(addr)
|
||||
);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static inline unsigned int _MEM_READ32(volatile void *addr) {
|
||||
unsigned int tmp;
|
||||
__asm__ (" lda [%1]1, %0 "
|
||||
: "=r"(tmp)
|
||||
: "r"(addr)
|
||||
);
|
||||
return tmp;
|
||||
}
|
||||
#define _SPW_READ(address) grlib_read_uncached32((unsigned int) address)
|
||||
#define _MEM_READ8(address) grlib_read_uncached8((unsigned int) address)
|
||||
#define _MEM_READ32(address) grlib_read_uncached32((unsigned int) address)
|
||||
#endif
|
||||
|
||||
#define MEM_READ8(addr) _MEM_READ8((volatile void *)(addr))
|
||||
|
||||
@@ -315,7 +315,7 @@ struct grspw_txbd {
|
||||
/* Memory and HW Registers Access routines. All 32-bit access routines */
|
||||
#define BD_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (unsigned int)(val))
|
||||
/*#define BD_READ(addr) (*(volatile unsigned int *)(addr))*/
|
||||
#define BD_READ(addr) leon_r32_no_cache((unsigned long)(addr))
|
||||
#define BD_READ(addr) grlib_read_uncached32((unsigned long)(addr))
|
||||
#define REG_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (unsigned int)(val))
|
||||
#define REG_READ(addr) (*(volatile unsigned int *)(addr))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user