m82xx_pci.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #ifndef _PPC_KERNEL_M82XX_PCI_H
  2. #define _PPC_KERNEL_M82XX_PCI_H
  3. #include <asm/m8260_pci.h>
  4. /*
  5. * Local->PCI map (from CPU) controlled by
  6. * MPC826x master window
  7. *
  8. * 0xF6000000 - 0xF7FFFFFF IO space
  9. * 0x80000000 - 0xBFFFFFFF CPU2PCI memory space PCIBR0
  10. *
  11. * 0x80000000 - 0x9FFFFFFF PCI Mem with prefetch (Outbound ATU #1)
  12. * 0xA0000000 - 0xBFFFFFFF PCI Mem w/o prefetch (Outbound ATU #2)
  13. * 0xF6000000 - 0xF7FFFFFF 32-bit PCI IO (Outbound ATU #3)
  14. *
  15. * PCI->Local map (from PCI)
  16. * MPC826x slave window controlled by
  17. *
  18. * 0x00000000 - 0x07FFFFFF MPC826x local memory (Inbound ATU #1)
  19. */
  20. /*
  21. * Slave window that allows PCI masters to access MPC826x local memory.
  22. * This window is set up using the first set of Inbound ATU registers
  23. */
  24. #ifndef M82xx_PCI_SLAVE_MEM_LOCAL
  25. #define M82xx_PCI_SLAVE_MEM_LOCAL (((struct bd_info *)__res)->bi_memstart)
  26. #define M82xx_PCI_SLAVE_MEM_BUS (((struct bd_info *)__res)->bi_memstart)
  27. #define M82xx_PCI_SLAVE_MEM_SIZE (((struct bd_info *)__res)->bi_memsize)
  28. #endif
  29. /*
  30. * This is the window that allows the CPU to access PCI address space.
  31. * It will be setup with the SIU PCIBR0 register. All three PCI master
  32. * windows, which allow the CPU to access PCI prefetch, non prefetch,
  33. * and IO space (see below), must all fit within this window.
  34. */
  35. #ifndef M82xx_PCI_LOWER_MEM
  36. #define M82xx_PCI_LOWER_MEM 0x80000000
  37. #define M82xx_PCI_UPPER_MEM 0x9fffffff
  38. #define M82xx_PCI_MEM_OFFSET 0x00000000
  39. #define M82xx_PCI_MEM_SIZE 0x20000000
  40. #endif
  41. #ifndef M82xx_PCI_LOWER_MMIO
  42. #define M82xx_PCI_LOWER_MMIO 0xa0000000
  43. #define M82xx_PCI_UPPER_MMIO 0xafffffff
  44. #define M82xx_PCI_MMIO_OFFSET 0x00000000
  45. #define M82xx_PCI_MMIO_SIZE 0x20000000
  46. #endif
  47. #ifndef M82xx_PCI_LOWER_IO
  48. #define M82xx_PCI_LOWER_IO 0x00000000
  49. #define M82xx_PCI_UPPER_IO 0x01ffffff
  50. #define M82xx_PCI_IO_BASE 0xf6000000
  51. #define M82xx_PCI_IO_SIZE 0x02000000
  52. #endif
  53. #ifndef M82xx_PCI_PRIM_WND_SIZE
  54. #define M82xx_PCI_PRIM_WND_SIZE ~(M82xx_PCI_IO_SIZE - 1U)
  55. #define M82xx_PCI_PRIM_WND_BASE (M82xx_PCI_IO_BASE)
  56. #endif
  57. #ifndef M82xx_PCI_SEC_WND_SIZE
  58. #define M82xx_PCI_SEC_WND_SIZE ~(M82xx_PCI_MEM_SIZE + M82xx_PCI_MMIO_SIZE - 1U)
  59. #define M82xx_PCI_SEC_WND_BASE (M82xx_PCI_LOWER_MEM)
  60. #endif
  61. #ifndef POTA_ADDR_SHIFT
  62. #define POTA_ADDR_SHIFT 12
  63. #endif
  64. #ifndef PITA_ADDR_SHIFT
  65. #define PITA_ADDR_SHIFT 12
  66. #endif
  67. #ifndef _IO_BASE
  68. #define _IO_BASE isa_io_base
  69. #endif
  70. #ifdef CONFIG_8260_PCI9
  71. struct pci_controller;
  72. extern void setup_m8260_indirect_pci(struct pci_controller* hose,
  73. u32 cfg_addr, u32 cfg_data);
  74. #else
  75. #define setup_m8260_indirect_pci setup_indirect_pci
  76. #endif
  77. #endif /* _PPC_KERNEL_M8260_PCI_H */