pci.c 962 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 <video/vga.h>
  12. #include <asm/irq.h>
  13. #include <asm/mach/pci.h>
  14. #include <asm/mach-types.h>
  15. static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
  16. {
  17. if (dev->bus->number == 0)
  18. if (dev->devfn == 0)
  19. return 255;
  20. else
  21. return 11;
  22. else
  23. return 255;
  24. }
  25. extern void __init via82c505_preinit(void);
  26. static struct hw_pci shark_pci __initdata = {
  27. .setup = via82c505_setup,
  28. .map_irq = shark_map_irq,
  29. .nr_controllers = 1,
  30. .ops = &via82c505_ops,
  31. .preinit = via82c505_preinit,
  32. };
  33. static int __init shark_pci_init(void)
  34. {
  35. if (!machine_is_shark())
  36. return;
  37. pcibios_min_io = 0x6000;
  38. pcibios_min_mem = 0x50000000;
  39. vga_base = 0xe8000000;
  40. pci_common_init(&shark_pci);
  41. return 0;
  42. }
  43. subsys_initcall(shark_pci_init);