Merge branch 'master' of git://git.denx.de/u-boot-fdt
[platform/kernel/u-boot.git] / include / mpc83xx.h
index 43553f5..fab3751 100644 (file)
 /* SICRL bits - MPC837x specific */
 #define SICRL_USB_A                    0xC0000000
 #define SICRL_USB_B                    0x30000000
+#define SICRL_USB_B_SD                 0x20000000
 #define SICRL_UART                     0x0C000000
 #define SICRL_GPIO_A                   0x02000000
 #define SICRL_GPIO_B                   0x01000000
 #define SICRH_GPIO2_C                  0x00002000
 #define SICRH_GPIO2_D                  0x00001000
 #define SICRH_GPIO2_E                  0x00000C00
+#define SICRH_GPIO2_E_SD               0x00000800
 #define SICRH_GPIO2_F                  0x00000300
 #define SICRH_GPIO2_G                  0x000000C0
 #define SICRH_GPIO2_H                  0x00000030
 #define SICRH_SPI                      0x00000003
+#define SICRH_SPI_SD                   0x00000001
 #endif
 
 /* SWCRR - System Watchdog Control Register
 #define SCCR_USBDRCM_2                 0x00800000
 #define SCCR_USBDRCM_3                 0x00c00000
 
-#define SCCR_PCIEXP1CM                 0x00300000
-#define SCCR_PCIEXP2CM                 0x000c0000
-
 #define SCCR_SATA1CM                   0x00003000
 #define SCCR_SATA1CM_SHIFT             12
 #define SCCR_SATACM                    0x00003c00
 #define SCCR_USBDRCM_2                 0x00800000
 #define SCCR_USBDRCM_3                 0x00c00000
 
+/* All of the four SATA controllers must have the same clock ratio */
+#define SCCR_SATA1CM                   0x000000c0
+#define SCCR_SATA1CM_SHIFT             6
+#define SCCR_SATACM                    0x000000ff
+#define SCCR_SATACM_SHIFT              0
+#define SCCR_SATACM_0                  0x00000000
+#define SCCR_SATACM_1                  0x00000055
+#define SCCR_SATACM_2                  0x000000aa
+#define SCCR_SATACM_3                  0x000000ff
+#endif
+
 #define SCCR_PCIEXP1CM                 0x00300000
 #define SCCR_PCIEXP1CM_SHIFT           20
 #define SCCR_PCIEXP1CM_0               0x00000000
 #define SCCR_PCIEXP2CM_2               0x00080000
 #define SCCR_PCIEXP2CM_3               0x000c0000
 
-/* All of the four SATA controllers must have the same clock ratio */
-#define SCCR_SATA1CM                   0x000000c0
-#define SCCR_SATA1CM_SHIFT             6
-#define SCCR_SATACM                    0x000000ff
-#define SCCR_SATACM_SHIFT              0
-#define SCCR_SATACM_0                  0x00000000
-#define SCCR_SATACM_1                  0x00000055
-#define SCCR_SATACM_2                  0x000000aa
-#define SCCR_SATACM_3                  0x000000ff
-#endif
-
 /* CSn_BDNS - Chip Select memory Bounds Register
  */
 #define CSBNDS_SA                      0x00FF0000
 #define TIMING_CFG1_CASLAT_30          0x00050000      /* CAS latency = 3.0 */
 #define TIMING_CFG1_CASLAT_35          0x00060000      /* CAS latency = 3.5 */
 #define TIMING_CFG1_CASLAT_40          0x00070000      /* CAS latency = 4.0 */
+#define TIMING_CFG1_CASLAT_45          0x00080000      /* CAS latency = 4.5 */
+#define TIMING_CFG1_CASLAT_50          0x00090000      /* CAS latency = 5.0 */
 
 /* TIMING_CFG_2 - DDR SDRAM Timing Configuration 2
  */
 #define DDRCDR_M_ODR           0x00000002
 #define DDRCDR_Q_DRN           0x00000001
 
+/* PCIE Bridge Register
+*/
+#define PEX_CSB_CTRL_OBPIOE    0x00000001
+#define PEX_CSB_CTRL_IBPIOE    0x00000002
+#define PEX_CSB_CTRL_WDMAE     0x00000004
+#define PEX_CSB_CTRL_RDMAE     0x00000008
+
+#define PEX_CSB_OBCTRL_PIOE    0x00000001
+#define PEX_CSB_OBCTRL_MEMWE   0x00000002
+#define PEX_CSB_OBCTRL_IOWE    0x00000004
+#define PEX_CSB_OBCTRL_CFGWE   0x00000008
+
+#define PEX_CSB_IBCTRL_PIOE    0x00000001
+
+#define PEX_OWAR_EN            0x00000001
+#define PEX_OWAR_TYPE_CFG      0x00000000
+#define PEX_OWAR_TYPE_IO       0x00000002
+#define PEX_OWAR_TYPE_MEM      0x00000004
+#define PEX_OWAR_RLXO          0x00000008
+#define PEX_OWAR_NANP          0x00000010
+#define PEX_OWAR_SIZE          0xFFFFF000
+
+#define PEX_IWAR_EN            0x00000001
+#define PEX_IWAR_TYPE_INT      0x00000000
+#define PEX_IWAR_TYPE_PF       0x00000004
+#define PEX_IWAR_TYPE_NO_PF    0x00000006
+#define PEX_IWAR_NSOV          0x00000008
+#define PEX_IWAR_NSNP          0x00000010
+#define PEX_IWAR_SIZE          0xFFFFF000
+#define PEX_IWAR_SIZE_1M       0x000FF000
+#define PEX_IWAR_SIZE_2M       0x001FF000
+#define PEX_IWAR_SIZE_4M       0x003FF000
+#define PEX_IWAR_SIZE_8M       0x007FF000
+#define PEX_IWAR_SIZE_16M      0x00FFF000
+#define PEX_IWAR_SIZE_32M      0x01FFF000
+#define PEX_IWAR_SIZE_64M      0x03FFF000
+#define PEX_IWAR_SIZE_128M     0x07FFF000
+#define PEX_IWAR_SIZE_256M     0x0FFFF000
+
+#define PEX_GCLK_RATIO         0x440
+
 #ifndef __ASSEMBLY__
 struct pci_region;
 void mpc83xx_pci_init(int num_buses, struct pci_region **reg, int warmboot);
+void mpc83xx_pcislave_unlock(int bus);
+void mpc83xx_pcie_init(int num_buses, struct pci_region **reg, int warmboot);
 #endif
 
 #endif /* __MPC83XX_H__ */