Altera_Forum
Honored Contributor
10 years agoAltera JTAG UART used by kernel does not match IRQ assignment made in Qsys
Hi all,
I'm currently developing a 3.10.31-ltsi kernel that running on a Nios II-based system. This system also contains several components including an Altera JTAG UART, USB host controller and a timer. In Qsys, I assigned the following Nios II interrupts for these system components: jtaguart: IRQ 0 timer: IRQ 1 usbhc: IRQ 2 The device tree binary (.dtb), U-boot and the kernel are built using these assignments and stored to flash. However, when the kernel boots, the interrupt for the Altera JTAG UART is remapped to IRQ 2 as seen in the following KERNEL DEBUG message: ttyJ0 at MMIO 0x1001840 (irq = 2) is a Altera JTAG UART When this happens, the kernel is no longer able to attach the USB host contoller (usbhc) to IRQ 2 and the following error messages come up: genirq: flags mismatch irq 2. 00000000 (altera_jtaguart) vs. 00000080 (sls-hcd: usb1) altera_jtaguart: unable to attach altera jtag uart 0 interrupt vector=2 I have some questions about this process that I'm hoping someone can explain: - When the Altera JTAG component / device is added, why is the interrupt remapped from IRQ 0 to IRQ 2? - Why isn't the usbhc controller remapped from IRQ 2 to something else? In addition, when I forced the Altera JTAG UART interrupt to IRQ 0 to match the Qsys setting by modifying the altera_jtaguart driver, when the kernel attempts to attach IRQ 0 to the JTAG UART, the following error message was displayed: altera_jtaguart: unable to attach Altera JTAG UART 0 interrupt vector=0[/I][/I] However, the usbhc component was correctly added and attached to IRQ 2 as indicated by the following message:sls-hcd sls-hcd.0: irq2, io mem 0xe1008000[/I][/I] Any feedback that would help explain what is happening with these interrupts during the kernel booting sequence would be appreciated. - Brad