mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
PPC: e500: pci: Export slot2irq calculation
We need the calculation method to get from a PCI slot ID to its respective interrupt line twice. Once in the internal map function and once when assembling the device tree. So let's extract the calculation to a separate function that can be called by both users. Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
3bb7e02a97
commit
9e2c12988b
3 changed files with 15 additions and 2 deletions
9
hw/ppce500_pci.h
Normal file
9
hw/ppce500_pci.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef PPCE500_PCI_H
|
||||
#define PPCE500_PCI_H
|
||||
|
||||
static inline int ppce500_pci_map_irq_slot(int devno, int irq_num)
|
||||
{
|
||||
return (devno + irq_num) % 4;
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue