LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 03-16-2017, 03:38 PM   #1
tomek_m2
LQ Newbie
 
Registered: Mar 2017
Posts: 1

Rep: Reputation: Disabled
What can be interrupt-controller in device tree?


I have fpga/asic device and I have very big problem with understaning what can perform role as interrupt-controller in device tree. Here is picture:
http://imgur.com/a/UtOma

Idea:
subinterrupts block should be defined in device tree with node, for example for subinterrupt block no. 23:

Code:
          subinterruptBlock23 {
                compatible = "uio-pdrv-genirq-modified-by-me";  //device driver for interrupt handling
                subint_mask_reg = <0x80b01014>;
                subint_status_reg = <0x80b01018>;
                interrupts = < 0 23 4 >; //none spi int, line nr 23, int active when high level on line
                interrupt-parent = <&mainIntBlock>;
            };
Then interrupt-controller is main interrupt block:
Code:
    mainIntBlock: interrupt-controller {
        compatible = "how to write platform driver for this one";
        reg = <int_status_reg_ADDR, 4>;
        interrupt-controller;
        #interrupt-cells = <3>;
    };
Is above good approach? Can we register main block 32 hw interrupt numbers into linux IRQ numbers (irq-domain)? Or it is not possible because only processor input interrupt pins can be registered to irq_domain (so in other words only processor pins can perfom role as interrupt-controller)?
If answer is that we can define main-block as interrupt-controller then:
1.) how to write platform driver in linux kernel space for this interrupt-controller? Is any generic platform driver based on which I can follow?
2.) what happen when I disable interrupt in processor? So there will be scenario that interrupt bit is set in subinterrupt block and main interrupt block but doesn't go to processor as interrupt is disabled in procesor register. Will interrupt handler be invoked in this case or not ebcause interrupt signal has to reach processor?
3.) Should I inform linux somehow to which processor pin main interrupt block is connected? If so how? - by defining interrupt-parent? How to write linux platform driver which handles interrupts on processor pins?

I ahve read a lot articles in website, many chapters in a books and I still don't understand the above. If someone could share his knowledge I would be grateful.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Doubt in interrupt number, how to decide device interrupted on sharing interrupt pin? ayyasprings Linux - Embedded & Single-board computer 1 06-22-2015 08:45 AM
Keeping device functionality in device controller instead of kernel. noman.butt31 Linux - Hardware 3 11-08-2012 06:39 AM
no load balancing for MSI-PCI interrupt controller on SMP linux jhwilliams Linux - General 0 09-10-2007 02:22 PM
Synchronization with the device interrupt Elliott-t Linux - Kernel 3 09-26-2006 03:50 AM
SvrWks CSB6 IDE RAID Controller, lost interrupt roroehl Linux - Hardware 4 11-25-2003 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration