2015-07-15 04:14:43 +00:00
|
|
|
#define USE_DVICHIP
|
2015-03-03 10:51:06 +00:00
|
|
|
#ifdef USE_DVICHIP
|
|
|
|
#include "ddk750_help.h"
|
|
|
|
#include "ddk750_reg.h"
|
|
|
|
#include "ddk750_dvi.h"
|
|
|
|
#include "ddk750_sii164.h"
|
|
|
|
|
|
|
|
|
|
|
|
/* This global variable contains all the supported driver and its corresponding
|
|
|
|
function API. Please set the function pointer to NULL whenever the function
|
|
|
|
is not supported. */
|
2015-07-15 04:14:45 +00:00
|
|
|
static dvi_ctrl_device_t g_dcftSupportedDviController[] = {
|
2015-03-03 10:51:06 +00:00
|
|
|
#ifdef DVI_CTRL_SII164
|
2015-07-15 04:14:30 +00:00
|
|
|
{
|
|
|
|
.pfnInit = sii164InitChip,
|
|
|
|
.pfnGetVendorId = sii164GetVendorID,
|
|
|
|
.pfnGetDeviceId = sii164GetDeviceID,
|
2015-03-03 10:51:06 +00:00
|
|
|
#ifdef SII164_FULL_FUNCTIONS
|
2015-07-15 04:14:30 +00:00
|
|
|
.pfnResetChip = sii164ResetChip,
|
|
|
|
.pfnGetChipString = sii164GetChipString,
|
|
|
|
.pfnSetPower = sii164SetPower,
|
|
|
|
.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
|
|
|
|
.pfnIsConnected = sii164IsConnected,
|
|
|
|
.pfnCheckInterrupt = sii164CheckInterrupt,
|
|
|
|
.pfnClearInterrupt = sii164ClearInterrupt,
|
2015-03-03 10:51:06 +00:00
|
|
|
#endif
|
2015-07-15 04:14:30 +00:00
|
|
|
},
|
2015-03-03 10:51:06 +00:00
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
int dviInit(
|
2015-07-15 04:14:30 +00:00
|
|
|
unsigned char edgeSelect,
|
|
|
|
unsigned char busSelect,
|
|
|
|
unsigned char dualEdgeClkSelect,
|
|
|
|
unsigned char hsyncEnable,
|
|
|
|
unsigned char vsyncEnable,
|
|
|
|
unsigned char deskewEnable,
|
|
|
|
unsigned char deskewSetting,
|
|
|
|
unsigned char continuousSyncEnable,
|
|
|
|
unsigned char pllFilterEnable,
|
|
|
|
unsigned char pllFilterValue
|
2015-03-03 10:51:06 +00:00
|
|
|
)
|
|
|
|
{
|
|
|
|
dvi_ctrl_device_t *pCurrentDviCtrl;
|
2015-07-15 04:14:48 +00:00
|
|
|
|
2015-03-03 10:51:06 +00:00
|
|
|
pCurrentDviCtrl = g_dcftSupportedDviController;
|
2015-07-15 04:14:45 +00:00
|
|
|
if (pCurrentDviCtrl->pfnInit != NULL) {
|
2015-03-03 10:51:06 +00:00
|
|
|
return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
|
2015-07-15 04:14:30 +00:00
|
|
|
vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable,
|
|
|
|
pllFilterEnable, pllFilterValue);
|
2015-03-03 10:51:06 +00:00
|
|
|
}
|
2015-06-12 10:17:22 +00:00
|
|
|
return -1; /* error */
|
2015-03-03 10:51:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|