/*!
******************************************************************************

 @Function				SECDEV_LocateDevice

 @Description
 This implementation can be called twice:
 Once for the main device under test, and once for a PDP subdevice on an ATLAS card

******************************************************************************/
IMG_RESULT SECDEV_LocateDevice(
	SECURE_sDev *			psInfo,
	SECDEV_eMapArea			eArea
)
{
	IMG_UINT32 ui32Result = IMG_SUCCESS;

	if(gpsInfo == NULL)
	{
        gpsInfo = psInfo;
	}
	
	/* Configure the device...*/
	ui32Result = memmappedio_DeviceAttach(psInfo->pszDeviceName, eArea);
	IMG_ASSERT(ui32Result == IMG_SUCCESS);

	if(ui32Result != IMG_SUCCESS)
	{
		return ui32Result;
	}

	//Save register pointer etc
	psInfo->paPhysRegBase = vdec_reg_paddr;
	psInfo->pvKmRegBase = vdec_reg_vaddr;
	psInfo->ui32RegSize	= vdec_reg_size;

	return ui32Result;
}
/*!
******************************************************************************

 @Function				MEMMAPPEDIO_LocateDevice

 @Description
 This implementation can be called twice:
 Once for the main device under test, and once for a PDP subdevice on an ATLAS card

******************************************************************************/
IMG_RESULT MEMMAPPEDIO_LocateDevice(
	MEMMAPPEDIO_sInfo *			psInfo,
	MEMMAPPEDIO_eMapArea        eArea
)
{
	//TARGET_sPciDevice * psPciDeviceBaseInfo = gsFullInfo.psPciDevice;
	IMG_UINT32 ui32Result = IMG_SUCCESS;

	if(gpsInfo == NULL)
	{
        gpsInfo = psInfo;
	}
	
	/* Configure the device...*/
	ui32Result = memmappedio_DeviceAttach(psInfo->sDevInfo.pszDeviceName, eArea);
	IMG_ASSERT(ui32Result == IMG_SUCCESS);

	if(ui32Result != IMG_SUCCESS)
	{
		return ui32Result;
	}

	//Save register pointer etc
	psInfo->uipPhysRegBase = module_reg_base;
	psInfo->pvKmRegBase = reg_base_addr;
	psInfo->ui32RegSize	= module_reg_size;

	return ui32Result;
}