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

	/* Get core configuration */
	xdbg_printf(XDBG_DEBUG_GENERAL, "->Initializing CSI2 Tx Controller.\n\r");
	ConfigPtr = XCsi2Tx_LookupConfig(CsiSsPtr->Config.CsiInfo.DeviceId);
	if (ConfigPtr == NULL) {
		xdbg_printf(XDBG_DEBUG_ERROR,
			"CSISS2TX ERR:: CSI not found\n\r");
		return XST_FAILURE;
	}

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

	/* Initialize core */
	Status = XCsi2Tx_CfgInitialize(CsiSsPtr->CsiPtr, ConfigPtr, AbsAddr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_ERROR,
			"CSISS2TX ERR:: CSI 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 CSI sub core is initialised sucessfully
*		- XST_FAILURE If CSI sub core inititlization fails
*
* @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_SubCoreInitCsi(XCsi2TxSs *CsiSsPtr)
{
	u32 Status;
	UINTPTR AbsAddr;
	XCsi2Tx_Config *ConfigPtr;
	xdbg_printf(XDBG_DEBUG_GENERAL, "->Initializing CSI2 Tx Controller.\n\r");
	ConfigPtr = XCsi2Tx_LookupConfig(CsiSsPtr->Config.CsiInfo.DeviceId);
	if (ConfigPtr == NULL) {
		xdbg_printf(XDBG_DEBUG_ERROR,
			"CSISS2TX ERR:: CSI not found\n\r");
		return XST_FAILURE;
	}
	AbsAddr = 0;
	Status = Csi2TxSs_ComputeSubCoreAbsAddr(CsiSsPtr->Config.BaseAddr,
					CsiSsPtr->Config.HighAddr,
					CsiSsPtr->Config.CsiInfo.AddrOffset,
					&AbsAddr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_ERROR, "CSISS2TX ERR:: CSI core"
			"base address (0x%x) invalid %d\n\r", AbsAddr);
		return XST_FAILURE;
	}
	Status = XCsi2Tx_CfgInitialize(CsiSsPtr->CsiPtr, ConfigPtr, AbsAddr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_ERROR,
			"CSISS2TX ERR:: CSI core Initialization failed\n\r");
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
static u32 Csi2TxSs_SubCoreInitCsi ( XCsi2TxSs * CsiSsPtr ) { u32 Status ; UINTPTR AbsAddr ; XCsi2Tx_Config * ConfigPtr ; xdbg_printf ( XDBG_DEBUG_GENERAL , " \n \r " ) ; ConfigPtr = XCsi2Tx_LookupConfig ( CsiSsPtr -> Config . CsiInfo . DeviceId ) ; if ( ConfigPtr == NULL ) { xdbg_printf ( XDBG_DEBUG_ERROR , " \n \r " ) ; return XST_FAILURE ; } AbsAddr = 0 ; Status = Csi2TxSs_ComputeSubCoreAbsAddr ( CsiSsPtr -> Config . BaseAddr , CsiSsPtr -> Config . HighAddr , CsiSsPtr -> Config . CsiInfo . AddrOffset , & AbsAddr ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_ERROR , " " " \n \r " , AbsAddr ) ; return XST_FAILURE ; } Status = XCsi2Tx_CfgInitialize ( CsiSsPtr -> CsiPtr , 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 */