Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[deliverable/linux.git] / drivers / staging / sm750fb / ddk750_chip.h
CommitLineData
81dee67e
SM
1#ifndef DDK750_CHIP_H__
2#define DDK750_CHIP_H__
3#define DEFAULT_INPUT_CLOCK 14318181 /* Default reference clock */
62fa8e10
SM
4#ifndef SM750LE_REVISION_ID
5#define SM750LE_REVISION_ID ((unsigned char)0xfe)
6#endif
81dee67e 7
f8b0dced
LS
8#include <linux/io.h>
9
81dee67e 10/* This is all the chips recognized by this library */
259fef35 11typedef enum _logical_chip_type_t {
63de0eb0
IA
12 SM_UNKNOWN,
13 SM718,
14 SM750,
15 SM750LE,
81dee67e
SM
16}
17logical_chip_type_t;
18
259fef35 19typedef enum _clock_type_t {
81dee67e
SM
20 MXCLK_PLL,
21 PRIMARY_PLL,
22 SECONDARY_PLL,
23 VGA0_PLL,
24 VGA1_PLL,
25}
26clock_type_t;
27
259fef35 28typedef struct _pll_value_t {
63de0eb0
IA
29 clock_type_t clockType;
30 unsigned long inputFreq; /* Input clock frequency to the PLL */
81dee67e 31
63de0eb0
IA
32 /* Use this when clockType = PANEL_PLL */
33 unsigned long M;
34 unsigned long N;
35 unsigned long OD;
36 unsigned long POD;
81dee67e
SM
37}
38pll_value_t;
39
40/* input struct to initChipParam() function */
259fef35 41typedef struct _initchip_param_t {
63de0eb0
IA
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
47 */
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
52 */
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
57 */
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
62 */
63 unsigned char resetMemory; /**
64 * 0 = Do not reset the memory controller
65 * 1 = Reset the memory controller
66 */
81dee67e 67
63de0eb0 68 /* More initialization parameter can be added if needed */
81dee67e
SM
69}
70initchip_param_t;
71
81dee67e 72logical_chip_type_t getChipType(void);
555a6b1e 73unsigned int calcPllValue(unsigned int request, pll_value_t *pll);
81dee67e 74unsigned int formatPllReg(pll_value_t *pPLL);
555a6b1e 75void ddk750_set_mmio(void __iomem *, unsigned short, char);
81dee67e
SM
76unsigned int ddk750_getVMSize(void);
77int ddk750_initHw(initchip_param_t *);
81dee67e 78
81dee67e 79#endif
This page took 0.193147 seconds and 5 git commands to generate.