Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pll.h
Go to the documentation of this file.
1 #ifndef __NVBIOS_PLL_H__
2 #define __NVBIOS_PLL_H__
3 
4 /*XXX: kill me */
6  union {
7  struct {
8 #ifdef __BIG_ENDIAN
9  uint8_t N1, M1, N2, M2;
10 #else
12 #endif
13  };
14  struct {
16  } __attribute__((packed));
17  };
18  int log2P;
19 
20  int refclk;
21 };
22 
23 struct nouveau_bios;
24 
25 /* these match types in pll limits table version 0x40,
26  * nouveau uses them on all chipsets internally where a
27  * specific pll needs to be referenced, but the exact
28  * register isn't known.
29  */
31  PLL_CORE = 0x01,
32  PLL_SHADER = 0x02,
33  PLL_UNK03 = 0x03,
34  PLL_MEMORY = 0x04,
35  PLL_VDEC = 0x05,
36  PLL_UNK40 = 0x40,
37  PLL_UNK41 = 0x41,
38  PLL_UNK42 = 0x42,
39  PLL_VPLL0 = 0x80,
40  PLL_VPLL1 = 0x81,
41  PLL_MAX = 0xff
42 };
43 
44 struct nvbios_pll {
48 
52 
53  /*
54  * for most pre nv50 cards setting a log2P of 7 (the common max_log2p
55  * value) is no different to 6 (at least for vplls) so allowing the MNP
56  * calc to use 7 causes the generated clock to be out by a factor of 2.
57  * however, max_log2p cannot be fixed-up during parsing as the
58  * unmodified max_log2p value is still needed for setting mplls, hence
59  * an additional max_usable_log2p member
60  */
62 
63  struct {
72  } vco1, vco2;
73 };
74 
75 int nvbios_pll_parse(struct nouveau_bios *, u32 type, struct nvbios_pll *);
76 
77 #endif