Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12589 Discussions

Linux kernel attaches to wrong IRQ on nios II

Altera_Forum
Honored Contributor II
981 Views

Hello all, 

 

I have a system running on an Arria II FPGA that contains two (2) Nios II processors (hereafter referred to as Nios A & Nios B. Each of these processors are currently completely independent of each other and do not share any peripherals. Nios A runs linux (3.10.31-ltsi kernel) and has it's own own JTAG UART that will be used for the console output and is currently configured through Qsys to use interrupt zero (0). Nios B does not use an operating system and will communicate with it's peripherals using a HAL BSP. Nios B also has it's own JTAG UART is currently configured to use interrupt 2. These two interrupt chains are completely separated based on the system connections made in Qsys. 

 

My problem is that when Nios A boots linux, the console log in prompt is never reached. Instead, I'm receiving the following errors that are repeatedly generated: 

 

geniq: flags mismatch irq 2. 00000000 (altera_jtg uart) vs. 00000080 (sls-hcd: usb1) 

altera_jtaguart: unable to attach ALTERA JTAG UART 0 interrupt vector = 2 

[/I][/I] 

Since Nios A already has another peripheral that is connected to interrupt 2 (USB host controller - sls-hcd: usb1) there is a shared conflict for interrupt 2 and which causes these errors to appear.[/I][/I] 

 

Another clue is that during the linux booting process, the following message is displayed: ttyj0 at mmio 0x1001840 (irq = 2) is a altera jtag uart. the memory mapped address for listed for this jtag uart is correct (0x1001840) but for some reason the kernel is indicating that this jtag uart is actually using interrupt two instead of interrupt zero (0).  

[/I][/I] 

i have also checked the device tree source (dts) file that is generated by the sopc2dts utility and it does have the correct interrupt assignment for the nios a jtag_uart system component. 

[/I][/I] 

is there any way to force the kernel to attach the jtag uart to use interrupt zero (0) instead of interrupt 2? i have looked at the various options available under menuconfig but I haven't found anything that appears it will help.[/I][/I][/I][/I] 

 

Has anyone run into similar problem in the past? Any feedback would be appreciated and I look forward to a response.[/I][/I][/I][/I] 

 

- Brad[/I][/I][/I][/I]
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
259 Views

Hi Brad, 

 

I have faced the same problem when I was working with qsys system in Linux kernel v3.10, But I haven't faced it in earlier kernels. I have tried some workaround by moving JTAG IRQ from 1 to 4 in my case and it worked. You should give it try by moving JTAG IRQ to 3 or 4, It should resolve the IRQ conflict issue. Between, I am also looking for the actual cause of the issue. 

 

- Parth Shah
0 Kudos
Reply