XilinxProcessorIPLib/drivers/csi2txss/src/xcsi2txss.c
static u32 Csi2TxSs_SubCoreInitDphy(XCsi2TxSs *CsiSsPtr)
{
	u32 Status;
	UINTPTR AbsAddr;
	XDphy_Config *ConfigPtr;

	/* Get core configuration */
	xdbg_printf(XDBG_DEBUG_GENERAL, "->Initializing DPHY ...\n\r");
	ConfigPtr = XDphy_LookupConfig(CsiSsPtr->Config.DphyInfo.DeviceId);
	if (!ConfigPtr) {
		xdbg_printf(XDBG_DEBUG_ERROR,
				"CSISS2TX ERR:: DPHY not found\n\r");
		return XST_FAILURE;
	}

	/* Compute absolute base address */
	AbsAddr = 0;
	Status = Csi2TxSs_ComputeSubCoreAbsAddr(CsiSsPtr->Config.BaseAddr,
					CsiSsPtr->Config.HighAddr,
					CsiSsPtr->Config.DphyInfo.AddrOffset,
					&AbsAddr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_ERROR,"CSISS2TX ERR:: DPHY core base"
			"address (0x%x) invalid %d\n\r", AbsAddr);
		return XST_FAILURE;
	}

	/* Initialize core */
	Status = XDphy_CfgInitialize(CsiSsPtr->DphyPtr, ConfigPtr, AbsAddr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_ERROR, "CSISS2TX ERR:: Dphy core"
			"Initialization failed\n\r");
		return XST_FAILURE;
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
* This function initializes the included sub-core to it's static configuration
*
* @param	CsiSsPtr is a pointer to the Subsystem instance to be worked.
*
* @return
*		- XST_SUCCESS If DPHY sub core is initialised sucessfully
*		- XST_FAILURE If DPHY sub core initialization failed
*
* @note		None
*
******************************************************************************/
This function initializes the included sub-core to it's static configuration
This function initializes the included sub - core to it ' s static configuration
static u32 Csi2TxSs_SubCoreInitDphy(XCsi2TxSs *CsiSsPtr)
{
	u32 Status;
	UINTPTR AbsAddr;
	XDphy_Config *ConfigPtr;
	xdbg_printf(XDBG_DEBUG_GENERAL, "->Initializing DPHY ...\n\r");
	ConfigPtr = XDphy_LookupConfig(CsiSsPtr->Config.DphyInfo.DeviceId);
	if (!ConfigPtr) {
		xdbg_printf(XDBG_DEBUG_ERROR,
				"CSISS2TX ERR:: DPHY not found\n\r");
		return XST_FAILURE;
	}
	AbsAddr = 0;
	Status = Csi2TxSs_ComputeSubCoreAbsAddr(CsiSsPtr->Config.BaseAddr,
					CsiSsPtr->Config.HighAddr,
					CsiSsPtr->Config.DphyInfo.AddrOffset,
					&AbsAddr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_ERROR,"CSISS2TX ERR:: DPHY core base"
			"address (0x%x) invalid %d\n\r", AbsAddr);
		return XST_FAILURE;
	}
	Status = XDphy_CfgInitialize(CsiSsPtr->DphyPtr, ConfigPtr, AbsAddr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_ERROR, "CSISS2TX ERR:: Dphy core"
			"Initialization failed\n\r");
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
static u32 Csi2TxSs_SubCoreInitDphy ( XCsi2TxSs * CsiSsPtr ) { u32 Status ; UINTPTR AbsAddr ; XDphy_Config * ConfigPtr ; xdbg_printf ( XDBG_DEBUG_GENERAL , " \n \r " ) ; ConfigPtr = XDphy_LookupConfig ( CsiSsPtr -> Config . DphyInfo . DeviceId ) ; if ( ! ConfigPtr ) { xdbg_printf ( XDBG_DEBUG_ERROR , " \n \r " ) ; return XST_FAILURE ; } AbsAddr = 0 ; Status = Csi2TxSs_ComputeSubCoreAbsAddr ( CsiSsPtr -> Config . BaseAddr , CsiSsPtr -> Config . HighAddr , CsiSsPtr -> Config . DphyInfo . AddrOffset , & AbsAddr ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_ERROR , " " " \n \r " , AbsAddr ) ; return XST_FAILURE ; } Status = XDphy_CfgInitialize ( CsiSsPtr -> DphyPtr , ConfigPtr , AbsAddr ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_ERROR , " " " \n \r " ) ; return XST_FAILURE ; } return XST_SUCCESS ; }
This function initializes the included sub-core to it's static configuration
This function initializes the included sub - core to it ' s static configuration
/* Get core configuration */ /* Compute absolute base address */ /* Initialize core */