pci.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /* MN10300 PCI definitions
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #ifndef _ASM_PCI_H
  12. #define _ASM_PCI_H
  13. #ifdef __KERNEL__
  14. #include <linux/mm.h> /* for struct page */
  15. #if 0
  16. #define __pcbdebug(FMT, ADDR, ...) \
  17. printk(KERN_DEBUG "PCIBRIDGE[%08x]: "FMT"\n", \
  18. (u32)(ADDR), ##__VA_ARGS__)
  19. #define __pcidebug(FMT, BUS, DEVFN, WHERE,...) \
  20. do { \
  21. printk(KERN_DEBUG "PCI[%02x:%02x.%x + %02x]: "FMT"\n", \
  22. (BUS)->number, \
  23. PCI_SLOT(DEVFN), \
  24. PCI_FUNC(DEVFN), \
  25. (u32)(WHERE), ##__VA_ARGS__); \
  26. } while (0)
  27. #else
  28. #define __pcbdebug(FMT, ADDR, ...) do {} while (0)
  29. #define __pcidebug(FMT, BUS, DEVFN, WHERE, ...) do {} while (0)
  30. #endif
  31. /* Can be used to override the logic in pci_scan_bus for skipping
  32. * already-configured bus numbers - to be used for buggy BIOSes or
  33. * architectures with incomplete PCI setup by the loader */
  34. #ifdef CONFIG_PCI
  35. #define pcibios_assign_all_busses() 1
  36. extern void unit_pci_init(void);
  37. #else
  38. #define pcibios_assign_all_busses() 0
  39. #endif
  40. #define PCIBIOS_MIN_IO 0xBE000004
  41. #define PCIBIOS_MIN_MEM 0xB8000000
  42. void pcibios_set_master(struct pci_dev *dev);
  43. /* Dynamic DMA mapping stuff.
  44. * i386 has everything mapped statically.
  45. */
  46. #include <linux/types.h>
  47. #include <linux/slab.h>
  48. #include <linux/scatterlist.h>
  49. #include <linux/string.h>
  50. #include <asm/io.h>
  51. struct pci_dev;
  52. /* The PCI address space does equal the physical memory
  53. * address space. The networking and block device layers use
  54. * this boolean for bounce buffer decisions.
  55. */
  56. #define PCI_DMA_BUS_IS_PHYS (1)
  57. /* Return the index of the PCI controller for device. */
  58. static inline int pci_controller_num(struct pci_dev *dev)
  59. {
  60. return 0;
  61. }
  62. #define HAVE_PCI_MMAP
  63. extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
  64. enum pci_mmap_state mmap_state,
  65. int write_combine);
  66. #endif /* __KERNEL__ */
  67. /* implement the pci_ DMA API in terms of the generic device dma_ one */
  68. #include <asm-generic/pci-dma-compat.h>
  69. static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
  70. {
  71. return channel ? 15 : 14;
  72. }
  73. #include <asm-generic/pci_iomap.h>
  74. #endif /* _ASM_PCI_H */