AnsweredAssumed Answered

Interrupt handler is not working in MPC 8323 RDB

Question asked by gangadhar rao on Apr 17, 2017
Latest reply on Apr 19, 2017 by Pavel Chubakov

I am adding below mentioned module into linux kernel.But CPU gets hanged when External interrupt is enabled.please suggest changes in the module

 


#include <linux/kernel.h> 
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h> 
#include <linux/irq.h> 
#include <asm/io.h>
unsigned char modname[] = "UART";


irqreturn_t irq_handler(int irq, void *dev_id, struct pt_regs *regs)
{

      printf("irq_handler");
      return IRQ_HANDLED;
}


static int __init uart_init(void) /* Constructor */
{
return request_irq(6,irq_handler,IRQF_SHARED, modname, &modname);
}

void cleanup_module()
{

 

free_irq(6, NULL);
}


MODULE_LICENSE("GPL");

Outcomes