Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143565
b: refs/heads/master
c: 3f20301
h: refs/heads/master
i:
  143563: 389fac4
v: v3
  • Loading branch information
Darius Augulis authored and Sascha Hauer committed Apr 16, 2009
1 parent 7f76031 commit 7766897
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3fa6dd6a7aa7ce1a7d490ef88c2c8ec7db0f196b
refs/heads/master: 3f2030163efe4a7ee820ae56dab9a4db8c1ebb49
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-mxc/include/mach/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#define NR_IRQS (MXC_IPU_IRQ_START + MX3_IPU_IRQS)

extern void imx_irq_set_priority(unsigned char irq, unsigned char prio);
extern int imx_irq_set_priority(unsigned char irq, unsigned char prio);

/* all normal IRQs can be FIQs */
#define FIQ_START 0
Expand Down
14 changes: 9 additions & 5 deletions trunk/arch/arm/plat-mxc/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,27 @@
#define IIM_PROD_REV_SH 3
#define IIM_PROD_REV_LEN 5

#ifdef CONFIG_MXC_IRQ_PRIOR
void imx_irq_set_priority(unsigned char irq, unsigned char prio)
int imx_irq_set_priority(unsigned char irq, unsigned char prio)
{
#ifdef CONFIG_MXC_IRQ_PRIOR
unsigned int temp;
unsigned int mask = 0x0F << irq % 8 * 4;

if (irq > 63)
return;
if (irq >= MXC_INTERNAL_IRQS)
return -EINVAL;;

temp = __raw_readl(AVIC_NIPRIORITY(irq / 8));
temp &= ~mask;
temp |= prio & mask;

__raw_writel(temp, AVIC_NIPRIORITY(irq / 8));

return 0;
#else
return -ENOSYS;
#endif
}
EXPORT_SYMBOL(imx_irq_set_priority);
#endif

#ifdef CONFIG_FIQ
int mxc_set_irq_fiq(unsigned int irq, unsigned int type)
Expand Down

0 comments on commit 7766897

Please sign in to comment.