1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 #ifndef M54XXPCI_H
  15 #define M54XXPCI_H
  16 
  17 
  18 
  19 
  20 
  21 #define PCIIDR          (CONFIG_MBAR + 0xb00)   
  22 #define PCISCR          (CONFIG_MBAR + 0xb04)   
  23 #define PCICCRIR        (CONFIG_MBAR + 0xb08)   
  24 #define PCICR1          (CONFIG_MBAR + 0xb0c)   
  25 #define PCIBAR0         (CONFIG_MBAR + 0xb10)   
  26 #define PCIBAR1         (CONFIG_MBAR + 0xb14)   
  27 #define PCICCPR         (CONFIG_MBAR + 0xb28)   
  28 #define PCISID          (CONFIG_MBAR + 0xb2c)   
  29 #define PCIERBAR        (CONFIG_MBAR + 0xb30)   
  30 #define PCICPR          (CONFIG_MBAR + 0xb34)   
  31 #define PCICR2          (CONFIG_MBAR + 0xb3c)   
  32 
  33 #define PCIGSCR         (CONFIG_MBAR + 0xb60)   
  34 #define PCITBATR0       (CONFIG_MBAR + 0xb64)   
  35 #define PCITBATR1       (CONFIG_MBAR + 0xb68)   
  36 #define PCITCR          (CONFIG_MBAR + 0xb6c)   
  37 #define PCIIW0BTAR      (CONFIG_MBAR + 0xb70)   
  38 #define PCIIW1BTAR      (CONFIG_MBAR + 0xb74)   
  39 #define PCIIW2BTAR      (CONFIG_MBAR + 0xb78)   
  40 #define PCIIWCR         (CONFIG_MBAR + 0xb80)   
  41 #define PCIICR          (CONFIG_MBAR + 0xb84)   
  42 #define PCIISR          (CONFIG_MBAR + 0xb88)   
  43 #define PCICAR          (CONFIG_MBAR + 0xbf8)   
  44 
  45 #define PCITPSR         (CONFIG_MBAR + 0x8400)  
  46 #define PCITSAR         (CONFIG_MBAR + 0x8404)  
  47 #define PCITTCR         (CONFIG_MBAR + 0x8408)  
  48 #define PCITER          (CONFIG_MBAR + 0x840c)  
  49 #define PCITNAR         (CONFIG_MBAR + 0x8410)  
  50 #define PCITLWR         (CONFIG_MBAR + 0x8414)  
  51 #define PCITDCR         (CONFIG_MBAR + 0x8418)  
  52 #define PCITSR          (CONFIG_MBAR + 0x841c)  
  53 #define PCITFDR         (CONFIG_MBAR + 0x8440)  
  54 #define PCITFSR         (CONFIG_MBAR + 0x8444)  
  55 #define PCITFCR         (CONFIG_MBAR + 0x8448)  
  56 #define PCITFAR         (CONFIG_MBAR + 0x844c)  
  57 #define PCITFRPR        (CONFIG_MBAR + 0x8450)  
  58 #define PCITFWPR        (CONFIG_MBAR + 0x8454)  
  59 
  60 #define PCIRPSR         (CONFIG_MBAR + 0x8480)  
  61 #define PCIRSAR         (CONFIG_MBAR + 0x8484)  
  62 #define PCIRTCR         (CONFIG_MBAR + 0x8488)  
  63 #define PCIRER          (CONFIG_MBAR + 0x848c)  
  64 #define PCIRNAR         (CONFIG_MBAR + 0x8490)  
  65 #define PCIRDCR         (CONFIG_MBAR + 0x8498)  
  66 #define PCIRSR          (CONFIG_MBAR + 0x849c)  
  67 #define PCIRFDR         (CONFIG_MBAR + 0x84c0)  
  68 #define PCIRFSR         (CONFIG_MBAR + 0x84c4)  
  69 #define PCIRFCR         (CONFIG_MBAR + 0x84c8)  
  70 #define PCIRFAR         (CONFIG_MBAR + 0x84cc)  
  71 #define PCIRFRPR        (CONFIG_MBAR + 0x84d0)  
  72 #define PCIRFWPR        (CONFIG_MBAR + 0x84d4)  
  73 
  74 #define PACR            (CONFIG_MBAR + 0xc00)   
  75 #define PASR            (CONFIG_MBAR + 0xc04)   
  76 
  77 
  78 
  79 
  80 #define PCIGSCR_PE      0x20000000              
  81 #define PCIGSCR_SE      0x10000000              
  82 #define PCIGSCR_XCLKBIN 0x07000000              
  83 #define PCIGSCR_PEE     0x00002000              
  84 #define PCIGSCR_SEE     0x00001000              
  85 #define PCIGSCR_RESET   0x00000001              
  86 
  87 
  88 
  89 
  90 #define PCICAR_E        0x80000000              
  91 #define PCICAR_BUSN     16                      
  92 #define PCICAR_DEVFNN   8                       
  93 #define PCICAR_DWORDN   0                       
  94 
  95 
  96 
  97 
  98 
  99 #define WXBTAR(hostaddr, pciaddr, size) \
 100                         (((hostaddr) & 0xff000000) | \
 101                         ((((size) - 1) & 0xff000000) >> 8) | \
 102                         (((pciaddr) & 0xff000000) >> 16))
 103 
 104 #define PCIIWCR_W0_MEM  0x00000000              
 105 #define PCIIWCR_W0_IO   0x08000000              
 106 #define PCIIWCR_W0_MRD  0x00000000              
 107 #define PCIIWCR_W0_MRDL 0x02000000              
 108 #define PCIIWCR_W0_MRDM 0x04000000              
 109 #define PCIIWCR_W0_E    0x01000000              
 110 
 111 #define PCIIWCR_W1_MEM  0x00000000              
 112 #define PCIIWCR_W1_IO   0x00080000              
 113 #define PCIIWCR_W1_MRD  0x00000000              
 114 #define PCIIWCR_W1_MRDL 0x00020000              
 115 #define PCIIWCR_W1_MRDM 0x00040000              
 116 #define PCIIWCR_W1_E    0x00010000              
 117 
 118 
 119 
 120 
 121 #define PCITBATR0_E     0x00000001              
 122 #define PCITBATR1_E     0x00000001              
 123 
 124 
 125 
 126 
 127 #define PACR_INTMPRI    0x00000001
 128 #define PACR_EXTMPRI(x) (((x) & 0x1f) << 1)
 129 #define PACR_INTMINTE   0x00010000
 130 #define PACR_EXTMINTE(x) (((x) & 0x1f) << 17)
 131 #define PACR_PKMD       0x40000000
 132 #define PACR_DS         0x80000000
 133 
 134 #define PCICR1_CL(x)    ((x) & 0xf)             
 135 #define PCICR1_LT(x)    (((x) & 0xff) << 8)     
 136 
 137 
 138 #endif