Hi,

On 02/14/2017 09:18 AM, [email protected] wrote:
> Thank you for replying questions.
> I want to know how to modify ".irqchips".
> Jetson-tx1 datasheet show that Generic interrupt controller's address is 
> 0x50041000 but i don't understand ".pin_base" and ".pin_bitmap".
> Althogh i saw /proc/itnerrupts, i can't understand uart, ethernet and other 
> devices interrupt line number.
> 

As its name says, .pin_bitmap is a u32 bitmap, where the first u32
describes the first 32 Interrupt lines, the second u32 describes
Interrupts 32-63, ...  A zero bit means that the interrupt is not
redirected to the cell.  In total, the bitmap of one irqchip allows you
to describe 4*32 = 128 interrupts lines.  If you need higher interrupts,
add a second irqchip and offset the .pin_base.

The first irqchip starts at .pin_base=32 as the first 32 interrupts are
reserved for SGIs and PPIs.

Maybe the attached snippet of my own TK1 config helps to understand.
Find interrupt numbers in your /proc/interrupts, the device tree or the
Tegra K1 Technical Reference manual.

  Ralf
--
.irqchips = {
        /* GIC */ {
                .address = 0x50041000,
                .pin_base = 32,
                .pin_bitmap = {
                        /* 32, 33, 34, 35, 55, 87, 89, 125: GPIO */
                        /* 38: I2C-0 Interrupt */
                        /* 59: SPI@7000d400 */
                        /* 84: I2C-1 Interrupt */
                        /* 90: UART D Interrupt */
                        /* 104: APBDMA 0.0 (for SPI) */
                        /* 105: APBDMA 0.1 (for SPI) */
                        0,
                        (1 << (32 % 32)) | (1 << (33 % 32)) |
                        (1 << (34 % 32)) | (1 << (35 % 32)) |
                        (1 << (38 % 32)) | (1 << (55 % 32)) |
                        (1 << (59 % 32)),
                        (1 << (84 % 32)) | (1 << (87 % 32)) |
                        (1 << (89 % 32)) | (1 << (90 % 32)),
                        (1 << (104 % 32)) | (1 << (105 % 32)) |
                        (1 << (125 % 32)),
                },
        },
        /* GIC */ {
                .address = 0x50041000,
                .pin_base = 160,
                .pin_bitmap = {
                        1 << (152+32 - 160),
                },
        },
},

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to