1#ifndef DDK750_CHIP_H__
2#define DDK750_CHIP_H__
3#define DEFAULT_INPUT_CLOCK 14318181
4#ifndef SM750LE_REVISION_ID
5#define SM750LE_REVISION_ID ((unsigned char)0xfe)
6#endif
7
8#include <linux/io.h>
9
10
11typedef enum _logical_chip_type_t {
12 SM_UNKNOWN,
13 SM718,
14 SM750,
15 SM750LE,
16}
17logical_chip_type_t;
18
19typedef enum _clock_type_t {
20 MXCLK_PLL,
21 PRIMARY_PLL,
22 SECONDARY_PLL,
23 VGA0_PLL,
24 VGA1_PLL,
25}
26clock_type_t;
27
28typedef struct _pll_value_t {
29 clock_type_t clockType;
30 unsigned long inputFreq;
31
32
33 unsigned long M;
34 unsigned long N;
35 unsigned long OD;
36 unsigned long POD;
37}
38pll_value_t;
39
40
41typedef struct _initchip_param_t {
42 unsigned short powerMode;
43 unsigned short chipClock;
44
45
46
47
48 unsigned short memClock;
49
50
51
52
53 unsigned short masterClock;
54
55
56
57
58 unsigned short setAllEngOff;
59
60
61
62
63 unsigned char resetMemory;
64
65
66
67
68
69}
70initchip_param_t;
71
72logical_chip_type_t getChipType(void);
73unsigned int calcPllValue(unsigned int request, pll_value_t *pll);
74unsigned int formatPllReg(pll_value_t *pPLL);
75void ddk750_set_mmio(void __iomem *, unsigned short, char);
76unsigned int ddk750_getVMSize(void);
77int ddk750_initHw(initchip_param_t *);
78
79#endif
80