Go to the documentation of this file.
27 #ifndef _CRYSTALHD_HW_H_
28 #define _CRYSTALHD_HW_H_
33 #define DMA_ENGINE_CNT 2
34 #define MAX_PIB_Q_DEPTH 64
35 #define MIN_PIB_Q_DEPTH 2
36 #define WR_POINTER_OFF 4
38 #define ASPM_L1_ENABLE (BC_BIT(27))
43 #define FW_CMD_BUFF_SZ 64
44 #define TS_Host2CpuSnd 0x00000100
45 #define Hst2CpuMbx1 0x00100F00
46 #define Cpu2HstMbx1 0x00100F04
47 #define MbxStat1 0x00100F08
48 #define Stream2Host_Intr_Sts 0x00100F24
49 #define C011_RET_SUCCESS 0x0
52 #define TS_StreamAFIFOStatus 0x0010044C
53 #define TS_StreamBFIFOStatus 0x0010084C
56 #define UartSelectA 0x00100300
57 #define UartSelectB 0x00100304
59 #define BSVS_UART_DEC_NONE 0x00
60 #define BSVS_UART_DEC_OUTER 0x01
61 #define BSVS_UART_DEC_INNER 0x02
62 #define BSVS_UART_STREAM 0x03
65 #define REG_DecCA_RegCinCTL 0xa00
66 #define REG_DecCA_RegCinBase 0xa0c
67 #define REG_DecCA_RegCinEnd 0xa10
68 #define REG_DecCA_RegCinWrPtr 0xa04
69 #define REG_DecCA_RegCinRdPtr 0xa08
71 #define REG_Dec_TsUser0Base 0x100864
72 #define REG_Dec_TsUser0Rdptr 0x100868
73 #define REG_Dec_TsUser0Wrptr 0x10086C
74 #define REG_Dec_TsUser0End 0x100874
77 #define REG_Dec_TsAudCDB2Base 0x10036c
78 #define REG_Dec_TsAudCDB2Rdptr 0x100378
79 #define REG_Dec_TsAudCDB2Wrptr 0x100374
80 #define REG_Dec_TsAudCDB2End 0x100370
83 #define SDRAM_PARAM 0x00040804
84 #define SDRAM_PRECHARGE 0x000408B0
85 #define SDRAM_EXT_MODE 0x000408A4
86 #define SDRAM_MODE 0x000408A0
87 #define SDRAM_REFRESH 0x00040890
88 #define SDRAM_REF_PARAM 0x00040808
90 #define DecHt_PllACtl 0x34000C
91 #define DecHt_PllBCtl 0x340010
92 #define DecHt_PllCCtl 0x340014
93 #define DecHt_PllDCtl 0x340034
94 #define DecHt_PllECtl 0x340038
95 #define AUD_DSP_MISC_SOFT_RESET 0x00240104
96 #define AIO_MISC_PLL_RESET 0x0026000C
97 #define PCIE_CLK_REQ_REG 0xDC
98 #define PCI_CLK_REQ_ENABLE (BC_BIT(8))
103 #define BC_FWIMG_ST_ADDR 0x00000000
105 #define rotr32_1(x, n) (((x) >> n) | ((x) << (32 - n)))
106 #define bswap_32_1(x) ((rotr32_1((x), 24) & 0x00ff00ff) | (rotr32_1((x), 8) & 0xff00ff00))
108 #define DecHt_HostSwReset 0x340000
109 #define BC_DRAM_FW_CFG_ADDR 0x001c2000
323 #define CLOCK_PRESET 175
326 #define DMA_START_BIT MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK
328 #define GET_RX_INTR_MASK (INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_MASK | \
329 INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK | \
330 INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_MASK | \
331 INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK | \
332 INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_MASK | \
333 INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK | \
334 INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_MASK | \
335 INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK)
337 #define GET_Y0_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK | \
338 MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK | \
339 MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK | \
340 MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK)
342 #define GET_UV0_ERR_MSK (MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK | \
343 MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK | \
344 MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK | \
345 MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK)
347 #define GET_Y1_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK | \
348 MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK | \
349 MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK | \
350 MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK)
352 #define GET_UV1_ERR_MSK (MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK | \
353 MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK | \
354 MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK | \
355 MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK)