Path: blob/master/arch/sh/drivers/pci/fixups-snapgear.c
10819 views
/*1* arch/sh/drivers/pci/ops-snapgear.c2*3* Author: David McCullough <[email protected]>4*5* Ported to new API by Paul Mundt <[email protected]>6*7* Highly leveraged from pci-bigsur.c, written by Dustin McIntire.8*9* May be copied or modified under the terms of the GNU General Public10* License. See linux/COPYING for more information.11*12* PCI initialization for the SnapGear boards13*/14#include <linux/kernel.h>15#include <linux/types.h>16#include <linux/init.h>17#include <linux/pci.h>18#include "pci-sh4.h"1920int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)21{22int irq = -1;2324switch (slot) {25case 8: /* the PCI bridge */ break;26case 11: irq = 8; break; /* USB */27case 12: irq = 11; break; /* PCMCIA */28case 13: irq = 5; break; /* eth0 */29case 14: irq = 8; break; /* eth1 */30case 15: irq = 11; break; /* safenet (unused) */31}3233printk("PCI: Mapping SnapGear IRQ for slot %d, pin %c to irq %d\n",34slot, pin - 1 + 'A', irq);3536return irq;37}383940