Skip to content

Commit

Permalink
adv7511_zc706: Added support for the Vivado project.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbogdan committed Apr 7, 2014
1 parent 04eea45 commit 25e47c4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adv7511/zc706/cf_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ void CLKGEN_CalcClkParams(unsigned long divider,
void CLKGEN_Write(unsigned long reg,
unsigned long val)
{
Xil_Out32(XPAR_AXI_CLKGEN_0_BASEADDR + reg, val);
Xil_Out32(CF_CLKGEN_BASEADDR + reg, val);
}

/***************************************************************************//**
Expand All @@ -484,7 +484,7 @@ void CLKGEN_Write(unsigned long reg,
static void CLKGEN_Read(unsigned long reg,
unsigned long *val)
{
*val = Xil_In32(XPAR_AXI_CLKGEN_0_BASEADDR + reg);
*val = Xil_In32(CF_CLKGEN_BASEADDR + reg);
}

/***************************************************************************//**
Expand Down Expand Up @@ -547,8 +547,8 @@ void CLKGEN_MMCMWrite(unsigned long reg,

reg_val |= AXI_CLKGEN_V2_DRP_CNTRL_SEL | (reg << 16) | (val & mask);

Xil_Out32(XPAR_AXI_CLKGEN_0_BASEADDR + AXI_CLKGEN_V2_REG_DRP_CNTRL, 0x00);
Xil_Out32(XPAR_AXI_CLKGEN_0_BASEADDR + AXI_CLKGEN_V2_REG_DRP_CNTRL, reg_val);
Xil_Out32(CF_CLKGEN_BASEADDR + AXI_CLKGEN_V2_REG_DRP_CNTRL, 0x00);
Xil_Out32(CF_CLKGEN_BASEADDR + AXI_CLKGEN_V2_REG_DRP_CNTRL, reg_val);
}

/***************************************************************************//**
Expand Down
16 changes: 16 additions & 0 deletions adv7511/zc706/cf_hdmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,28 @@
/******************************************************************************/
/************************** Macros Definitions ********************************/
/******************************************************************************/
#ifdef XPAR_AXI_CLKGEN_0_BASEADDR
#define CF_CLKGEN_BASEADDR XPAR_AXI_CLKGEN_0_BASEADDR
#else
#define CF_CLKGEN_BASEADDR XPAR_AXI_HDMI_CLKGEN_BASEADDR
#endif
#ifdef XPAR_AXI_HDMI_TX_0_BASEADDR
#define CFV_BASEADDR XPAR_AXI_HDMI_TX_0_BASEADDR
#else
#define CFV_BASEADDR XPAR_AXI_HDMI_CORE_BASEADDR
#endif
#ifdef XPAR_AXI_SPDIF_TX_0_BASEADDR
#define CFA_BASEADDR XPAR_AXI_SPDIF_TX_0_BASEADDR
#else
#define CFA_BASEADDR XPAR_AXI_SPDIF_TX_CORE_BASEADDR
#endif
#define DDR_BASEADDR XPAR_DDR_MEM_BASEADDR
#define UART_BASEADDR XPS_UART1_BASEADDR
#ifdef XPAR_AXI_VDMA_0_BASEADDR
#define VDMA_BASEADDR XPAR_AXI_VDMA_0_BASEADDR
#else
#define VDMA_BASEADDR XPAR_AXI_HDMI_DMA_BASEADDR
#endif
#define ADMA_DEVICE_ID XPAR_XDMAPS_1_DEVICE_ID
#define IIC_BASEADDR XPS_I2C0_BASEADDR
#define VIDEO_BASEADDR DDR_BASEADDR + 0x2000000
Expand Down
7 changes: 7 additions & 0 deletions adv7511/zc706/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,17 @@ int main()
Xil_ICacheEnable();
Xil_DCacheEnable();

#ifdef XPAR_AXI_IIC_0_BASEADDR
HAL_PlatformInit(XPAR_AXI_IIC_0_BASEADDR, /* Perform any required platform init */
XPAR_SCUTIMER_DEVICE_ID, /* including hardware reset to HDMI devices */
XPAR_SCUGIC_SINGLE_DEVICE_ID,
XPAR_SCUTIMER_INTR);
#else
HAL_PlatformInit(XPAR_AXI_IIC_MAIN_BASEADDR, /* Perform any required platform init */
XPAR_SCUTIMER_DEVICE_ID, /* including hardware reset to HDMI devices */
XPAR_SCUGIC_SINGLE_DEVICE_ID,
XPAR_SCUTIMER_INTR);
#endif

Xil_ExceptionEnable();

Expand Down

0 comments on commit 25e47c4

Please sign in to comment.