pci.c 870 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * linux/arch/arm/mach-shark/pci.c
  3. *
  4. * PCI bios-type initialisation for PCI machines
  5. *
  6. * Bits taken from various places.
  7. */
  8. #include <linux/kernel.h>
  9. #include <linux/pci.h>
  10. #include <linux/init.h>
  11. #include <asm/irq.h>
  12. #include <asm/mach/pci.h>
  13. #include <asm/mach-types.h>
  14. static int __init shark_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
  15. {
  16. if (dev->bus->number == 0)
  17. if (dev->devfn == 0) return 255;
  18. else return 11;
  19. else return 255;
  20. }
  21. extern void __init via82c505_preinit(void);
  22. static struct hw_pci shark_pci __initdata = {
  23. .setup = via82c505_setup,
  24. .swizzle = pci_std_swizzle,
  25. .map_irq = shark_map_irq,
  26. .nr_controllers = 1,
  27. .scan = via82c505_scan_bus,
  28. .preinit = via82c505_preinit,
  29. };
  30. static int __init shark_pci_init(void)
  31. {
  32. if (machine_is_shark())
  33. pci_common_init(&shark_pci);
  34. return 0;
  35. }
  36. subsys_initcall(shark_pci_init);