Xtensa port: Removed duplicate file and renamed to sys_io.h as other platforms.
Change-Id: I293bfa9ff8c5e641c727612c56968cec901dbfec Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This commit is contained in:
parent
5718676aad
commit
aacfd63331
3 changed files with 3 additions and 114 deletions
|
@ -20,6 +20,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#if !defined(_ASMLANGUAGE) && !defined(__ASSEMBLER__)
|
||||
#include "sys_io.h" /* Include from the very same folder of this file */
|
||||
#include <stdint.h>
|
||||
#include <sw_isr_table.h>
|
||||
#include <arch/xtensa/xtensa_irq.h>
|
||||
|
|
|
@ -43,6 +43,7 @@ static ALWAYS_INLINE void sys_clear_bit(mem_addr_t addr, unsigned int bit)
|
|||
static ALWAYS_INLINE int sys_test_bit(mem_addr_t addr, unsigned int bit)
|
||||
{
|
||||
int temp = *(volatile int *)addr;
|
||||
|
||||
return (int)(temp & (1 << bit));
|
||||
}
|
||||
|
||||
|
@ -53,7 +54,8 @@ static ALWAYS_INLINE int sys_test_and_set_bit(mem_addr_t addr, unsigned int bit)
|
|||
return retval;
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE int sys_test_and_clear_bit(mem_addr_t addr, unsigned int bit)
|
||||
static ALWAYS_INLINE
|
||||
int sys_test_and_clear_bit(mem_addr_t addr, unsigned int bit)
|
||||
{
|
||||
int retval = (*(volatile int *)addr) & (1 << bit);
|
||||
*(volatile int *)addr = (*(volatile int *)addr) & ~(1 << bit);
|
Loading…
Add table
Add a link
Reference in a new issue