blob: 39049984faf93e6c4e498b43ecae97434dbaacf2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
/** @file
Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _SSC_REG_H_
#define _SSC_REG_H_
// selection ID of the SSC selection table
typedef enum {
No_SSC=0,
M01_SSC,
M02_SSC,
M03_SSC,
M04_SSC,
M05_SSC
} SSC_SELECTION_TABLE;
// selection ID of the Clock bending selection table
typedef enum {
Clk_Bending_13=0,
Clk_Bending_06,
No_Clk_Bending,
Clk_Bending_M09
} CLK_BENDING_SELECTION_TABLE;
#define SSC_DEFAULT_SETTING M05_SSC
#define CLK_BENDING_DEFAULT_SETTING No_Clk_Bending
typedef struct _SSC_SETTING {
UINT8 Ssc_Selection_ID;
UINT32 Ssc_Cyc_To_Peak;
UINT32 Ffs_Frac_Step;
} SSC_SETTING;
typedef struct _CLOCK_BENDING_SETTING {
UINT8 Clk_Bending_Selection_ID;
UINT32 Pll_Ratio_Frac;
UINT32 Pll_Ratio_Int;
} CLOCK_BENDING_SETTING;
#define SSC_ENABLE 0x1
#define SSC_DISABLE 0x0
typedef union _LJ1PLL_CR_RW_CONTROL_1 {
UINT32 Data;
struct {
UINT32 ssc_en_ovr : 1; ///< [0] SSC enable override
UINT32 ssc_en : 1; ///< [1] SSC Enable
UINT32 ssc_b_cycles : 5; ///< [6:2] ssc_b_cycles
UINT32 ssc_b_step : 10; ///< [16:7] ssc_b_step
UINT32 ssc_a_cycles : 5; ///< [21:17] ssc_a_cycles
UINT32 ssc_a_step : 10; ///< [31:22] ssc_a_step
} Fields;
} LJ1PLL_CR_RW_CONTROL_1;
typedef union _LJ1PLL_CR_RW_CONTROL_2 {
UINT32 Data;
struct {
UINT32 ssc_cyc_to_peak_m1 : 9; ///< [8:0] cycle to peak
UINT32 ssc_mode : 2; ///< [10:9] SSC Mode
UINT32 spare : 1; ///< [11] Spare
UINT32 ssc_frac_step : 20; ///< [31:12] fractional step configuration
} Fields;
} LJ1PLL_CR_RW_CONTROL_2;
typedef union _LJ1PLL_CR_RW_CONTROL_5 {
UINT32 Data;
struct {
UINT32 pll_ratio_frac : 24; ///< [23:0] Clock Bending: fractional frequency multiplier
UINT32 pll_ratio_int : 8; ///< [31:24] Clock Bending: integer frequency multiplier
} Fields;
} LJ1PLL_CR_RW_CONTROL_5;
//The IPC command buffer for SSC
typedef struct _SSC_IPC_BUFFER {
LJ1PLL_CR_RW_CONTROL_1 LJ1PLL_CTRL_1;
LJ1PLL_CR_RW_CONTROL_2 LJ1PLL_CTRL_2;
UINT32 LJ1PLL_CTRL_3;
LJ1PLL_CR_RW_CONTROL_5 LJ1PLL_CTRL_5;
} SSC_IPC_BUFFER;
typedef union _LCPLL_CR_RW_CONTROL_1 {
UINT32 Data;
struct {
UINT32 ssc_en_ovr : 1; /// [0] SSC enable override
UINT32 ssc_en : 1; /// [1] SSC Enable
UINT32 RSVD : 30; /// [31:2] Reserved
} Fields;
} LCPLL_CR_RW_CONTROL_1;
typedef union _LCPLL_CR_RW_CONTROL_2 {
UINT32 Data;
struct {
UINT32 ssc_cyc_to_peak_m1 : 9; /// [8:0] cycle to peak
UINT32 ssc_mode : 2; /// [10:9] SSC Mode
UINT32 spare : 1; /// [11] Spare
UINT32 ssc_frac_step : 20; /// [31:12] fractional step configuration
} Fields;
} LCPLL_CR_RW_CONTROL_2;
typedef union _LCPLL_CR_RW_CONTROL_5 {
UINT32 Data;
struct {
UINT32 pll_ratio_frac : 24; /// [23:0] Clock Bending: fractional frequency multiplier
UINT32 pll_ratio_int : 8; /// [31:24] Clock Bending: integer frequency multiplier
} Fields;
} LCPLL_CR_RW_CONTROL_5;
#endif
|