Commit | Line | Data |
---|---|---|
919ca7c6 | 1 | #define USE_DVICHIP |
81dee67e SM |
2 | #ifdef USE_DVICHIP |
3 | #include "ddk750_help.h" | |
4 | #include "ddk750_reg.h" | |
5 | #include "ddk750_dvi.h" | |
6 | #include "ddk750_sii164.h" | |
7 | ||
8 | ||
2d17105e EL |
9 | /* |
10 | * This global variable contains all the supported driver and its corresponding | |
11 | * function API. Please set the function pointer to NULL whenever the function | |
12 | * is not supported. | |
13 | */ | |
259fef35 | 14 | static dvi_ctrl_device_t g_dcftSupportedDviController[] = { |
81dee67e | 15 | #ifdef DVI_CTRL_SII164 |
78376535 JL |
16 | { |
17 | .pfnInit = sii164InitChip, | |
18 | .pfnGetVendorId = sii164GetVendorID, | |
19 | .pfnGetDeviceId = sii164GetDeviceID, | |
81dee67e | 20 | #ifdef SII164_FULL_FUNCTIONS |
78376535 JL |
21 | .pfnResetChip = sii164ResetChip, |
22 | .pfnGetChipString = sii164GetChipString, | |
23 | .pfnSetPower = sii164SetPower, | |
24 | .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection, | |
25 | .pfnIsConnected = sii164IsConnected, | |
26 | .pfnCheckInterrupt = sii164CheckInterrupt, | |
27 | .pfnClearInterrupt = sii164ClearInterrupt, | |
81dee67e | 28 | #endif |
78376535 | 29 | }, |
81dee67e SM |
30 | #endif |
31 | }; | |
32 | ||
33 | ||
34 | int dviInit( | |
78376535 JL |
35 | unsigned char edgeSelect, |
36 | unsigned char busSelect, | |
37 | unsigned char dualEdgeClkSelect, | |
38 | unsigned char hsyncEnable, | |
39 | unsigned char vsyncEnable, | |
40 | unsigned char deskewEnable, | |
41 | unsigned char deskewSetting, | |
42 | unsigned char continuousSyncEnable, | |
43 | unsigned char pllFilterEnable, | |
44 | unsigned char pllFilterValue | |
81dee67e SM |
45 | ) |
46 | { | |
47 | dvi_ctrl_device_t *pCurrentDviCtrl; | |
40403c1b | 48 | |
81dee67e | 49 | pCurrentDviCtrl = g_dcftSupportedDviController; |
259fef35 | 50 | if (pCurrentDviCtrl->pfnInit != NULL) { |
81dee67e | 51 | return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable, |
78376535 JL |
52 | vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable, |
53 | pllFilterEnable, pllFilterValue); | |
81dee67e | 54 | } |
5ee35ea7 | 55 | return -1; /* error */ |
81dee67e SM |
56 | } |
57 | ||
81dee67e SM |
58 | #endif |
59 | ||
60 |