• Ma Jun's avatar
    irqchip/mgigen: Add platform device driver for mbigen device · 717c3dbc
    Ma Jun authored
    Mbigen means Message Based Interrupt Generator(MBIGEN).
    
    Its a kind of interrupt controller that collects
    the interrupts from external devices and generate msi interrupt.
    Mbigen is applied to reduce the number of wire connected interrupts.
    
    As the peripherals increasing, the interrupts lines needed is
    increasing much, especially on the Arm64 server SOC.
    
    Therefore, the interrupt pin in GIC is not enough to cover so
    many peripherals.
    
    Mbigen is designed to fix this problem.
    
    Mbigen chip locates in ITS or outside of ITS.
    
    Mbigen chip hardware structure shows as below:
    
    		mbigen chip
    |---------------------|-------------------|
    mgn_node0	  mgn_node1		mgn_node2
     |		 |-------|		|-------|------|
    dev1		dev1    dev2		dev1   dev3   dev4
    
    Each mbigen chip contains several mbigen nodes.
    
    External devices can connect to mbigen node through wire connecting way.
    
    Because a mbigen node only can support 128 interrupt maximum, depends
    on the interrupt lines number of devices, a device can connects to one
    more mbigen nodes.
    
    Also, several different devices can connect to a same mbigen node.
    
    When devices triggered interrupt,mbigen chip detects and collects
    the interrupts and generates the MBI interrupts by writing the ITS
    Translator register.
    
    To simplify mbigen driver,I used a new conception--mbigen device.
    Each mbigen device is initialized as a platform device.
    
    Mbigen device presents the parts(register, pin definition etc.) in
    mbigen chip corresponding to a peripheral device.
    
    So from software view, the structure likes below
    
    	            mbigen chip
         |---------------------|-----------------|
    mbigen device1       mbigen device2  mbigen device3
          |                   |                |
         dev1                dev2             dev3
    Reviewed-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    Signed-off-by: default avatarMa Jun <majun258@huawei.com>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    717c3dbc
Kconfig 3.37 KB