diff mbox

[U-Boot,04/10] x86: Ignore function number when writing PIRQ routing table

Message ID BLU436-SMTP190EF019D8324EC9E865DDBFB80@phx.gbl
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng June 15, 2015, 7:59 a.m. UTC
In fill_irq_info() pci device's function number is written into
the table, however this is not really necessary. The function
number can be anything as OS doesn't care about this field,
neither does the PIRQ routing specification. Change to always
writing 0 as the function number.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 arch/x86/cpu/irq.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Simon Glass June 16, 2015, 2:46 a.m. UTC | #1
On 15 June 2015 at 01:59, Bin Meng <bmeng.cn@gmail.com> wrote:
> In fill_irq_info() pci device's function number is written into
> the table, however this is not really necessary. The function
> number can be anything as OS doesn't care about this field,
> neither does the PIRQ routing specification. Change to always
> writing 0 as the function number.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/cpu/irq.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index 7d5ccc1..df4300c 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -59,12 +59,12 @@  void pirq_assign_irq(int link, u8 irq)
 }
 
 static inline void fill_irq_info(struct irq_info **slotp, int *entries, u8 bus,
-				 u8 device, u8 func, u8 pin, u8 pirq)
+				 u8 device, u8 pin, u8 pirq)
 {
 	struct irq_info *slot = *slotp;
 
 	slot->bus = bus;
-	slot->devfn = (device << 3) | func;
+	slot->devfn = (device << 3) | 0;
 	slot->irq[pin - 1].link = LINK_N2V(pirq, irq_router.link_base);
 	slot->irq[pin - 1].bitmap = irq_router.irq_mask;
 	(*entries)++;
@@ -182,8 +182,7 @@  static int create_pirq_routing_table(void)
 		      PCI_FUNC(pr.bdf), 'A' + pr.pin - 1,
 		      'A' + pr.pirq);
 		fill_irq_info(&slot, &irq_entries, PCI_BUS(pr.bdf),
-			      PCI_DEV(pr.bdf), PCI_FUNC(pr.bdf),
-			      pr.pin, pr.pirq);
+			      PCI_DEV(pr.bdf), pr.pin, pr.pirq);
 		cell += sizeof(struct pirq_routing) / sizeof(u32);
 	}