On 2012-Apr-5 17:37 , Artyom Tarasenko wrote:
> I gave the following shot:
>
> 0> show-devs
> ffe1a2b0 /
> ( ... )
> ffe29140 /pci@1fe,0 (pci)
> ffe299a8 /pci@1fe,0/pci@1 (pci)
> ffe2a060 /pci@1fe,0/pci@1,1 (pci)
> ffe2aeb8 /pci@1fe,0/ebus@3
> ffe2bb00 /pci@1fe,0/ebus@3/su@0,1 (serial)
> ( ... )
>
> ok
> cd /pci@1fe,0/ebus
> 000001fe encode-int 020003f8 encode-int encode+ 1 encode-int encode+
> ffe29140 encode-int encode+ 2b encode-int encode+ " interrupt-map" property
>
> 0000001f encode-int 00ffffff encode-int encode+ 00000003 encode-int encode+
> " interrupt-map-mask" property
>
> cd /pci@1fe,0/ebus@3/su
> 1 encode-int " interrupts" property
> device-end
>
> And Linux's of_device_64 interprets it the following way:
>
> /pci@1f,0: direct translate 7f0 --> 1
> /pci@1f,0: direct translate 7ee --> 1
> /pci@1f,0: direct translate 7ef --> 1
> /pci@1f,0: direct translate 7e5 --> 1
>
> ^^^^^ This is strange but is the same regardless my interrupt-map try above.
>
> /pci@1f,0/ebus@3/su@1fe,20003f8: Apply [/pci@1f,0/ebus@3:1] imap --> [NULL:1]
>
> ^^^^^ Have I done something wrong, or more interrupt mappings is needed?
Well, it looks like Linux is correctly identifying that you want to
translate interrupt 1 from ebus to something else. That something else
is where it's getting hung up - what are your #address-cells and
#interrupt-cells?
Although I don't think you're using the right numbers.... It looks like
you set up a property containing:
1fe, 200.03f8, 1, ffe2.9140, 2b
The two cells at the front look wrong. I think you want the contents of
the reg property of the su node, and I'm pretty sure that doesn't have
"1fe". I recall ebus only has a one-cell address property, in which case
that should be:
20003f8, 1, ffe2.9140, 2b
The interrupt mask property should probably be 00ff.ffff, ff .