-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 151148 b: refs/heads/master c: 8f86001 h: refs/heads/master v: v3
- Loading branch information
Mike Frysinger
committed
Jun 13, 2009
1 parent
2f73d36
commit f327571
Showing
5 changed files
with
78 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 538067c822e2512d9a165c71c0c5722168470304 | ||
refs/heads/master: 8f86001f76609f70bfcce34e7e2a11860e012ace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* interface to Blackfin CEC | ||
* | ||
* Copyright 2009 Analog Devices Inc. | ||
* Licensed under the GPL-2 or later. | ||
*/ | ||
|
||
#ifndef __ASM_BFIN_IRQFLAGS_H__ | ||
#define __ASM_BFIN_IRQFLAGS_H__ | ||
|
||
#ifdef CONFIG_SMP | ||
# include <asm/pda.h> | ||
# include <asm/processor.h> | ||
/* Forward decl needed due to cdef inter dependencies */ | ||
static inline uint32_t __pure bfin_dspid(void); | ||
# define blackfin_core_id() (bfin_dspid() & 0xff) | ||
# define bfin_irq_flags cpu_pda[blackfin_core_id()].imask | ||
#else | ||
extern unsigned long bfin_irq_flags; | ||
#endif | ||
|
||
static inline void bfin_sti(unsigned long flags) | ||
{ | ||
asm volatile("sti %0;" : : "d" (flags)); | ||
} | ||
|
||
static inline unsigned long bfin_cli(void) | ||
{ | ||
unsigned long flags; | ||
asm volatile("cli %0;" : "=d" (flags)); | ||
return flags; | ||
} | ||
|
||
static inline void raw_local_irq_disable(void) | ||
{ | ||
bfin_cli(); | ||
} | ||
static inline void raw_local_irq_enable(void) | ||
{ | ||
bfin_sti(bfin_irq_flags); | ||
} | ||
|
||
#define raw_local_save_flags(flags) do { (flags) = bfin_read_IMASK(); } while (0) | ||
|
||
#define raw_irqs_disabled_flags(flags) (((flags) & ~0x3f) == 0) | ||
|
||
static inline void raw_local_irq_restore(unsigned long flags) | ||
{ | ||
if (!raw_irqs_disabled_flags(flags)) | ||
raw_local_irq_enable(); | ||
} | ||
|
||
static inline unsigned long __raw_local_irq_save(void) | ||
{ | ||
unsigned long flags = bfin_cli(); | ||
#ifdef CONFIG_DEBUG_HWERR | ||
bfin_sti(0x3f); | ||
#endif | ||
return flags; | ||
} | ||
#define raw_local_irq_save(flags) do { (flags) = __raw_local_irq_save(); } while (0) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters