[uClinux-dev] spurious interrupt problem on MCF5282

Wolf-Ruediger Juergens WJuergens at web.de
Wed Oct 12 10:53:32 EDT 2005


Hi,
I have a ST16c552 Uart connect to a SSV Dilnet-5282 Board. I have the serial.c modified  to work with MCF5282.
(setup of the external 3 and external 4 IRQ). 
This is working so far the UART is detected but the whole CPU is locked if I compile the serial.c in the kernel. 
If I compile a module I can load it with "insmod serial" and I see the problem. 

> insmod serial
Using /lib/modules/2.4.27-uc1/kernel/drivers/char/serial.o
Serial driver version 5.05c (2001-07-08) with no serial options enabled
serial: Init external IRQs on DNP5280
Testing ttyS0 (0x0000, 0x10000000)...
Spurious interrupt 1
Spurious interrupt 2
Spurious interrupt 3
Spurious interrupt 4
Spurious interrupt 5
Spurious interrupt 6
Spurious interrupt 7
Spurious interrupt 8
Spurious interrupt 9

this goes for ever. :-(

So far I have modified the mcf_reset_irq function as follows:


static inline void mcf_reset_irq(int irq)
{

        irq -= 64;
	if(irq < 1 || irq >= 32)
		return;
		
	*((volatile unsigned char * ) (MCF_IPSBAR + MCF5282_EPORT_EPFR))|=(1<<irq);

....
}

Here is the relevant part of my code in rs_init:
---------------
	/*  initialize the EPORTs on the DNP528x */
	printk("serial: Init external IRQs on DNP5280\n");

	*((volatile unsigned short * ) (MCF_IPSBAR + MCF5282_EPORT_EPPAR)) &= ~(0x03 << (3 * 2)); 
	*((volatile unsigned short * ) (MCF_IPSBAR + MCF5282_EPORT_EPPAR)) |= (1 << (3 * 2)); 
	
	*((volatile unsigned short * ) (MCF_IPSBAR + MCF5282_EPORT_EPPAR)) &= ~(0x03 << (4 * 2)); 
	*((volatile unsigned short * ) (MCF_IPSBAR + MCF5282_EPORT_EPPAR)) |= (1 << (4 * 2)); 
		
	*((volatile unsigned char * ) (MCF_IPSBAR + MCF5282_EPORT_EPIER)) &= ~(1<<3);
	*((volatile unsigned char * ) (MCF_IPSBAR + MCF5282_EPORT_EPIER)) |=  (1<<3);
	
	*((volatile unsigned char * ) (MCF_IPSBAR + MCF5282_EPORT_EPIER)) &= ~(1<<4);
	*((volatile unsigned char * ) (MCF_IPSBAR + MCF5282_EPORT_EPIER)) |=  (1<<4);
	
	/* Interrupt Mask Register - enable irq 3 & 4 */
	*((volatile unsigned long *) (MCF_MBAR + MCFICM_INTC0 + MCFINTC_IMRL)) &= ~(0x18|1); /* irq3 & irq4*/;
	
	
	*((volatile unsigned char * ) (MCF_IPSBAR + MCF5282_EPORT_EPFR))=(1<<3);
	*((volatile unsigned char * ) (MCF_IPSBAR + MCF5282_EPORT_EPFR))=(1<<4);

------------------
Is that ok, because I dont know how to find out whats going wrong here and I have never seen a sample code ?

Thanks for help
Best Regards
Wolf
______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!		
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130




More information about the uClinux-dev mailing list