On 27/04/13 06:58, Artyom Tarasenko wrote:
Hi Artyom,
Nice patchset!
> Every PCI Slot in PBM has 4 directly mapped IRQ lines.
> Use the IRQ routing schema 0bssnn (Bus, Slot, interrupt Number)
> described in Section 19.3.3 of UltraSPARC™-IIi User's Manual.
>
> Please note that this patch requires the QEMU counterpart patch.
>
> Signed-off-by: Artyom Tarasenko<atar4qemu(a)gmail.com>
> ---
> drivers/pci.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/pci.c b/drivers/pci.c
> index 5c487c1..ec1a810 100644
> --- a/drivers/pci.c
> +++ b/drivers/pci.c
> @@ -854,7 +854,14 @@ static void ob_pci_add_properties(phandle_t phandle,
> if (config->irq_pin) {
> OLDWORLD(set_int_property(dev, "AAPL,interrupts",
> config->irq_line));
> +#if defined(CONFIG_SPARC64)
> + /* direct mapping bssnn (Bus, Slot, interrupt Number */
> + set_int_property(get_cur_dev(), "interrupts",
Any reason why this invokes get_cur_dev() rather than just using dev as
per the OLDWORLD/NEWWORLD calls?
> + ((((config->dev>> 11)<< 2)
> + + config->irq_pin - 1)& 0x1f));
> +#else
> NEWWORLD(set_int_property(dev, "interrupts", config->irq_pin));
> +#endif
> }
>
> set_int_property(dev, "min-grant", pci_config_read8(addr, PCI_MIN_GNT));
ATB,
Mark.