Path: blob/master/arch/sh/drivers/pci/fixups-snapgear.c
26481 views
// SPDX-License-Identifier: GPL-2.01/*2* arch/sh/drivers/pci/ops-snapgear.c3*4* Author: David McCullough <[email protected]>5*6* Ported to new API by Paul Mundt <[email protected]>7*8* Highly leveraged from pci-bigsur.c, written by Dustin McIntire.9*10* PCI initialization for the SnapGear boards11*/12#include <linux/kernel.h>13#include <linux/types.h>14#include <linux/init.h>15#include <linux/pci.h>16#include <linux/sh_intc.h>17#include "pci-sh4.h"1819int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)20{21int irq = -1;2223switch (slot) {24case 8: /* the PCI bridge */ break;25case 11: irq = evt2irq(0x300); break; /* USB */26case 12: irq = evt2irq(0x360); break; /* PCMCIA */27case 13: irq = evt2irq(0x2a0); break; /* eth0 */28case 14: irq = evt2irq(0x300); break; /* eth1 */29case 15: irq = evt2irq(0x360); break; /* safenet (unused) */30}3132printk("PCI: Mapping SnapGear IRQ for slot %d, pin %c to irq %d\n",33slot, pin - 1 + 'A', irq);3435return irq;36}373839