Juston Li | 919ca7c | 2015-07-14 21:14:43 -0700 | [diff] [blame] | 1 | #define USE_DVICHIP |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 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 | |
Edward Lipinsky | 2d17105 | 2016-07-23 11:57:25 -0700 | [diff] [blame] | 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 | */ |
Juston Li | 259fef3 | 2015-07-14 21:14:45 -0700 | [diff] [blame] | 14 | static dvi_ctrl_device_t g_dcftSupportedDviController[] = { |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 15 | #ifdef DVI_CTRL_SII164 |
Juston Li | 7837653 | 2015-07-14 21:14:30 -0700 | [diff] [blame] | 16 | { |
| 17 | .pfnInit = sii164InitChip, |
| 18 | .pfnGetVendorId = sii164GetVendorID, |
| 19 | .pfnGetDeviceId = sii164GetDeviceID, |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 20 | #ifdef SII164_FULL_FUNCTIONS |
Juston Li | 7837653 | 2015-07-14 21:14:30 -0700 | [diff] [blame] | 21 | .pfnResetChip = sii164ResetChip, |
| 22 | .pfnGetChipString = sii164GetChipString, |
| 23 | .pfnSetPower = sii164SetPower, |
| 24 | .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection, |
| 25 | .pfnIsConnected = sii164IsConnected, |
| 26 | .pfnCheckInterrupt = sii164CheckInterrupt, |
| 27 | .pfnClearInterrupt = sii164ClearInterrupt, |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 28 | #endif |
Juston Li | 7837653 | 2015-07-14 21:14:30 -0700 | [diff] [blame] | 29 | }, |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 30 | #endif |
| 31 | }; |
| 32 | |
| 33 | |
| 34 | int dviInit( |
Juston Li | 7837653 | 2015-07-14 21:14:30 -0700 | [diff] [blame] | 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 |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 45 | ) |
| 46 | { |
| 47 | dvi_ctrl_device_t *pCurrentDviCtrl; |
Juston Li | 40403c1 | 2015-07-14 21:14:48 -0700 | [diff] [blame] | 48 | |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 49 | pCurrentDviCtrl = g_dcftSupportedDviController; |
Juston Li | 259fef3 | 2015-07-14 21:14:45 -0700 | [diff] [blame] | 50 | if (pCurrentDviCtrl->pfnInit != NULL) { |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 51 | return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable, |
Juston Li | 7837653 | 2015-07-14 21:14:30 -0700 | [diff] [blame] | 52 | vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable, |
| 53 | pllFilterEnable, pllFilterValue); |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 54 | } |
Juston Li | 5ee35ea | 2015-06-12 03:17:22 -0700 | [diff] [blame] | 55 | return -1; /* error */ |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 56 | } |
| 57 | |
Sudip Mukherjee | 81dee67 | 2015-03-03 16:21:06 +0530 | [diff] [blame] | 58 | #endif |
| 59 | |
| 60 | |