1 #ifndef DDK750_CHIP_H__
2 #define DDK750_CHIP_H__
3 #define DEFAULT_INPUT_CLOCK 14318181 /* Default reference clock */
4 #ifndef SM750LE_REVISION_ID
5 #define SM750LE_REVISION_ID ((unsigned char)0xfe)
10 /* This is all the chips recognized by this library */
11 typedef enum _logical_chip_type_t {
19 typedef enum _clock_type_t {
28 typedef struct _pll_value_t {
29 clock_type_t clockType;
30 unsigned long inputFreq; /* Input clock frequency to the PLL */
32 /* Use this when clockType = PANEL_PLL */
40 /* input struct to initChipParam() function */
41 typedef struct _initchip_param_t {
42 unsigned short powerMode; /* Use power mode 0 or 1 */
43 unsigned short chipClock; /**
44 * Speed of main chip clock in MHz unit
45 * 0 = keep the current clock setting
46 * Others = the new main chip clock
48 unsigned short memClock; /**
49 * Speed of memory clock in MHz unit
50 * 0 = keep the current clock setting
51 * Others = the new memory clock
53 unsigned short masterClock; /**
54 * Speed of master clock in MHz unit
55 * 0 = keep the current clock setting
56 * Others = the new master clock
58 unsigned short setAllEngOff; /**
59 * 0 = leave all engine state untouched.
60 * 1 = make sure they are off: 2D, Overlay,
61 * video alpha, alpha, hardware cursors
63 unsigned char resetMemory; /**
64 * 0 = Do not reset the memory controller
65 * 1 = Reset the memory controller
68 /* More initialization parameter can be added if needed */
72 logical_chip_type_t getChipType(void);
73 unsigned int calcPllValue(unsigned int request, pll_value_t *pll);
74 unsigned int formatPllReg(pll_value_t *pPLL);
75 void ddk750_set_mmio(void __iomem *, unsigned short, char);
76 unsigned int ddk750_getVMSize(void);
77 int ddk750_initHw(initchip_param_t *);