Fix ifdef in plat-mxc/irc.c
Move ifdef under function brackets. This fixes compile crach when IRQ priorities are disabled. Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
This commit is contained in:
parent
3fa6dd6a7a
commit
3f2030163e
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
#define NR_IRQS (MXC_IPU_IRQ_START + MX3_IPU_IRQS)
|
#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 */
|
/* all normal IRQs can be FIQs */
|
||||||
#define FIQ_START 0
|
#define FIQ_START 0
|
||||||
|
|
|
@ -50,23 +50,27 @@
|
||||||
#define IIM_PROD_REV_SH 3
|
#define IIM_PROD_REV_SH 3
|
||||||
#define IIM_PROD_REV_LEN 5
|
#define IIM_PROD_REV_LEN 5
|
||||||
|
|
||||||
#ifdef CONFIG_MXC_IRQ_PRIOR
|
int imx_irq_set_priority(unsigned char irq, unsigned char prio)
|
||||||
void imx_irq_set_priority(unsigned char irq, unsigned char prio)
|
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_MXC_IRQ_PRIOR
|
||||||
unsigned int temp;
|
unsigned int temp;
|
||||||
unsigned int mask = 0x0F << irq % 8 * 4;
|
unsigned int mask = 0x0F << irq % 8 * 4;
|
||||||
|
|
||||||
if (irq > 63)
|
if (irq >= MXC_INTERNAL_IRQS)
|
||||||
return;
|
return -EINVAL;;
|
||||||
|
|
||||||
temp = __raw_readl(AVIC_NIPRIORITY(irq / 8));
|
temp = __raw_readl(AVIC_NIPRIORITY(irq / 8));
|
||||||
temp &= ~mask;
|
temp &= ~mask;
|
||||||
temp |= prio & mask;
|
temp |= prio & mask;
|
||||||
|
|
||||||
__raw_writel(temp, AVIC_NIPRIORITY(irq / 8));
|
__raw_writel(temp, AVIC_NIPRIORITY(irq / 8));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
return -ENOSYS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(imx_irq_set_priority);
|
EXPORT_SYMBOL(imx_irq_set_priority);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_FIQ
|
#ifdef CONFIG_FIQ
|
||||||
int mxc_set_irq_fiq(unsigned int irq, unsigned int type)
|
int mxc_set_irq_fiq(unsigned int irq, unsigned int type)
|
||||||
|
|
Loading…
Reference in New Issue