AGESA F15: AMD family15 AGESA code
[coreboot.git] / src / vendorcode / amd / agesa / f15 / Proc / Mem / NB / HY / mnhy.h
1 /* $NoKeywords:$ */
2 /**
3  * @file
4  *
5  * mnhy.h
6  *
7  * Northbridge Hydra
8  *
9  * @xrefitem bom "File Content Label" "Release Content"
10  * @e project: AGESA
11  * @e sub-project: (Mem)
12  * @e \$Revision: 47408 $ @e \$Date: 2011-02-18 09:56:31 -0700 (Fri, 18 Feb 2011) $
13  *
14  **/
15 /*****************************************************************************
16   *
17  * Copyright (C) 2012 Advanced Micro Devices, Inc.
18  * All rights reserved.
19  *
20  * Redistribution and use in source and binary forms, with or without
21  * modification, are permitted provided that the following conditions are met:
22  *     * Redistributions of source code must retain the above copyright
23  *       notice, this list of conditions and the following disclaimer.
24  *     * Redistributions in binary form must reproduce the above copyright
25  *       notice, this list of conditions and the following disclaimer in the
26  *       documentation and/or other materials provided with the distribution.
27  *     * Neither the name of Advanced Micro Devices, Inc. nor the names of
28  *       its contributors may be used to endorse or promote products derived
29  *       from this software without specific prior written permission.
30  *
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
32  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
34  * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
35  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
36  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
37  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
38  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
40  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41   *
42   * ***************************************************************************
43   *
44  */
45
46 #ifndef _MNHY_H_
47 #define _MNHY_H_
48
49 /*----------------------------------------------------------------------------
50  *   Mixed (DEFINITIONS AND MACROS / TYPEDEFS, STRUCTURES, ENUMS)
51  *
52  *----------------------------------------------------------------------------
53  */
54 #define MAX_CHANNELS_PER_SOCKET_HY    4
55 #define MAX_DCTS_PER_NODE_HY          2
56 #define MAX_CHANNELS_PER_DCT_HY       1
57 #define MAX_NODES_SUPPORTED_HY        8
58
59 /*-----------------------------------------------------------------------------
60  *                         DEFINITIONS AND MACROS
61  *
62  *-----------------------------------------------------------------------------
63  */
64
65 /*----------------------------------------------------------------------------
66  *                         TYPEDEFS, STRUCTURES, ENUMS
67  *
68  *----------------------------------------------------------------------------
69  */
70
71 /*----------------------------------------------------------------------------
72  *                           FUNCTIONS PROTOTYPE
73  *
74  *----------------------------------------------------------------------------
75  */
76 BOOLEAN
77 MemConstructNBBlockHY (
78   IN OUT   MEM_NB_BLOCK *NBPtr,
79   IN OUT   MEM_DATA_STRUCT *MemPtr,
80   IN       MEM_FEAT_BLOCK_NB *FeatPtr,
81   IN       MEM_SHARED_DATA *SharedPtr,
82   IN       UINT8 NodeID
83   );
84
85 VOID
86 MemNInitNBDataHy (
87   IN OUT   MEM_NB_BLOCK *NBPtr
88   );
89
90 VOID
91 MemNInitDefaultsHY (
92   IN OUT   MEM_DATA_STRUCT *MemPtr
93   );
94
95 BOOLEAN
96 MemNInitializeMctHy (
97   IN OUT   MEM_NB_BLOCK *NBPtr
98   );
99
100 BOOLEAN
101 MemNFinalizeMctHy (
102   IN OUT   MEM_NB_BLOCK *NBPtr
103   );
104
105 VOID
106 MemNSendMrsCmdHy (
107   IN OUT   MEM_NB_BLOCK *NBPtr
108   );
109
110 BOOLEAN
111 MemNAutoConfigHy (
112   IN OUT   MEM_NB_BLOCK *NBPtr
113   );
114
115 BOOLEAN
116 MemNOtherTimingHy (
117   IN OUT   MEM_NB_BLOCK *NBPtr
118   );
119
120 VOID
121 MemNInitPhyCompHy (
122   IN OUT   MEM_NB_BLOCK *NBPtr
123   );
124
125 VOID
126 MemNWritePatternHy (
127   IN OUT   MEM_NB_BLOCK *NBPtr,
128   IN       UINT32 Address,
129   IN       UINT8 Pattern[],
130   IN       UINT16 ClCount
131   );
132
133 VOID
134 MemNReadPatternHy (
135   IN OUT   MEM_NB_BLOCK *NBPtr,
136   IN       UINT8 Buffer[],
137   IN       UINT32 Address,
138   IN       UINT16 ClCount
139   );
140
141 VOID
142 InitNBRegTableHy (
143   IN OUT   MEM_NB_BLOCK *NBPtr,
144   IN OUT   TSEFO NBRegTable[]
145   );
146
147 UINT8
148 MemNGetSocketRelativeChannelHy (
149   IN OUT   MEM_NB_BLOCK *NBPtr,
150   IN       UINT8 Dct,
151   IN       UINT8 Channel
152   );
153
154 BOOLEAN
155 MemNIsIdSupportedHy (
156   IN OUT   MEM_NB_BLOCK *NBPtr,
157   IN       CPU_LOGICAL_ID *LogicalIdPtr
158   );
159
160 VOID
161 MemNBeforeDramInitHy (
162   IN OUT   MEM_NB_BLOCK *NBPtr
163   );
164
165 BOOLEAN
166 MemNPlatformSpecificFormFactorInitHy (
167   IN OUT   MEM_NB_BLOCK *NBPtr
168   );
169
170 VOID
171 MemNEnDLLShutDownHy (
172   IN OUT   MEM_NB_BLOCK *NBPtr
173   );
174
175 UINT32
176 MemNCmnGetSetFieldHy (
177   IN OUT   MEM_NB_BLOCK *NBPtr,
178   IN       UINT8 IsSet,
179   IN       BIT_FIELD_NAME FieldName,
180   IN       UINT32 Field
181   );
182
183 VOID
184 MemNBeforePlatformSpecHy (
185   IN OUT   MEM_NB_BLOCK *NBPtr
186   );
187
188 BOOLEAN
189 memNEnableTrainSequenceHy (
190   IN OUT   MEM_NB_BLOCK *NBPtr
191   );
192
193 BOOLEAN
194 MemNSendMrsCmdPerCsHy (
195   IN OUT   MEM_NB_BLOCK *NBPtr,
196   IN OUT   VOID *DummyPtr
197   );
198
199 BOOLEAN
200 MemNInitExtMMIOAddrHy  (
201   IN OUT   MEM_NB_BLOCK *NBPtr,
202   IN OUT   VOID *OptParam
203   );
204
205 VOID
206 MemNBeforeDQSTrainingHy (
207   IN OUT   MEM_NB_BLOCK *NBPtr
208   );
209
210 #endif  /* _MNHY_H_ */
211
212