--- zzzz-none-000/linux-2.6.28.10/kernel/irq/manage.c 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/kernel/irq/manage.c 2012-02-14 14:37:49.000000000 +0000 @@ -15,6 +15,10 @@ #include "internals.h" +#if defined (CONFIG_FUSIV_VX185) && defined (CONFIG_CPU_MIPSR2_IRQ_VI) +#include +#endif + #ifdef CONFIG_SMP cpumask_t irq_default_affinity = CPU_MASK_ALL; @@ -624,6 +628,16 @@ } #endif kfree(action); + +#if defined (CONFIG_FUSIV_VX185) && defined (CONFIG_CPU_MIPSR2_IRQ_VI) + if(cpu_has_vint) { + if(dev_id != NULL) + shutdown_ipc_src(((fusiv_irq_params_t *) dev_id)->ipc_src); + else + printk(KERN_ERR "%s: ERROR unable to free ipc source...\n", + __FUNCTION__); + } +#endif return; } printk(KERN_ERR "Trying to free already-free IRQ %d\n", irq); @@ -685,6 +699,11 @@ * which interrupt is which (messes up the interrupt freeing * logic etc). */ +#if 0 //defined (CONFIG_FUSIV_VX185) && defined (CONFIG_CPU_MIPSR2_IRQ_VI) + if(cpu_has_vint && !(irqflags & IRQF_SHARED)) + return -EINVAL; +#endif + if ((irqflags & IRQF_SHARED) && !dev_id) return -EINVAL; @@ -731,6 +750,14 @@ enable_irq(irq); } #endif +#if defined (CONFIG_FUSIV_VX185) && defined (CONFIG_CPU_MIPSR2_IRQ_VI) + if(cpu_has_vint) { + printk("\nThe devId registered is %s ipc_src: %d \n",devname, ((fusiv_irq_params_t *) dev_id)->ipc_src); + //dump_stack(); + if (!retval) + startup_ipc_src(((fusiv_irq_params_t *) dev_id)->ipc_src); + } +#endif return retval; } EXPORT_SYMBOL(request_irq);