fixup-mpc30x.c 795 B

123456789101112131415161718192021222324252627282930313233343536
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * fixup-mpc30x.c, The Victor MP-C303/304 specific PCI fixups.
  4. *
  5. * Copyright (C) 2002,2004 Yoichi Yuasa <yuasa@linux-mips.org>
  6. */
  7. #include <linux/init.h>
  8. #include <linux/pci.h>
  9. #include <asm/vr41xx/mpc30x.h>
  10. static const int internal_func_irqs[] = {
  11. VRC4173_CASCADE_IRQ,
  12. VRC4173_AC97_IRQ,
  13. VRC4173_USB_IRQ,
  14. };
  15. static const int irq_tab_mpc30x[] = {
  16. [12] = VRC4173_PCMCIA1_IRQ,
  17. [13] = VRC4173_PCMCIA2_IRQ,
  18. [29] = MQ200_IRQ,
  19. };
  20. int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
  21. {
  22. if (slot == 30)
  23. return internal_func_irqs[PCI_FUNC(dev->devfn)];
  24. return irq_tab_mpc30x[slot];
  25. }
  26. /* Do platform specific device initialization at pci_enable_device() time */
  27. int pcibios_plat_dev_init(struct pci_dev *dev)
  28. {
  29. return 0;
  30. }