pnl_init.c revision f29dbc25
1f29dbc25Smrg/* Copyright (c) 2005 Advanced Micro Devices, Inc.
2f29dbc25Smrg *
3f29dbc25Smrg * Permission is hereby granted, free of charge, to any person obtaining a copy
4f29dbc25Smrg * of this software and associated documentation files (the "Software"), to
5f29dbc25Smrg * deal in the Software without restriction, including without limitation the
6f29dbc25Smrg * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7f29dbc25Smrg * sell copies of the Software, and to permit persons to whom the Software is
8f29dbc25Smrg * furnished to do so, subject to the following conditions:
9f29dbc25Smrg *
10f29dbc25Smrg * The above copyright notice and this permission notice shall be included in
11f29dbc25Smrg * all copies or substantial portions of the Software.
12f29dbc25Smrg *
13f29dbc25Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14f29dbc25Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15f29dbc25Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16f29dbc25Smrg * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17f29dbc25Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18f29dbc25Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19f29dbc25Smrg * IN THE SOFTWARE.
20f29dbc25Smrg *
21f29dbc25Smrg * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
22f29dbc25Smrg * contributors may be used to endorse or promote products derived from this
23f29dbc25Smrg * software without specific prior written permission.
24f29dbc25Smrg * */
25f29dbc25Smrg
26f29dbc25Smrg/*
27f29dbc25Smrg * File Contents:   This file contains the Geode frame buffer panel
28f29dbc25Smrg *                  intialization functions.
29f29dbc25Smrg *
30f29dbc25Smrg * SubModule:       Geode FlatPanel library
31f29dbc25Smrg * */
32f29dbc25Smrg
33f29dbc25Smrg#include "panel.h"
34f29dbc25Smrg#include "gfx_regs.h"
35f29dbc25Smrg#include "gfx_type.h"
36f29dbc25Smrg
37f29dbc25Smrg/* defaults
38f29dbc25Smrg * Panel: 		Enabled
39f29dbc25Smrg * Platform: 		Centaurus
40f29dbc25Smrg * 92xx Chip: 		9211 Rev. A
41f29dbc25Smrg * PanelType: 		DSTN
42f29dbc25Smrg * XResxYRes: 		800x600
43f29dbc25Smrg * Depth: 		16
44f29dbc25Smrg * Mono_Color: 		Color
45f29dbc25Smrg */
46f29dbc25Smrgstatic Pnl_PanelParams sPanelParam = {
47f29dbc25Smrg    0, 1, CENTAURUS_PLATFORM, PNL_9211_A,
48f29dbc25Smrg    {PNL_DSTN, 800, 600, 16, PNL_COLOR_PANEL}
49f29dbc25Smrg};
50f29dbc25Smrg
51f29dbc25Smrg#if PLATFORM_DRACO
52f29dbc25Smrg#include "drac9210.c"
53f29dbc25Smrg#endif
54f29dbc25Smrg
55f29dbc25Smrg#if PLATFORM_CENTAURUS
56f29dbc25Smrg#include "cen9211.c"
57f29dbc25Smrg#endif
58f29dbc25Smrg
59f29dbc25Smrg#if PLATFORM_DORADO
60f29dbc25Smrg#include "dora9211.c"
61f29dbc25Smrg#endif
62f29dbc25Smrg
63f29dbc25Smrg#if  PLATFORM_GX2BASED
64f29dbc25Smrg#include "gx2_9211.c"
65f29dbc25Smrg#endif
66f29dbc25Smrg#include "platform.c"
67f29dbc25Smrg
68f29dbc25Smrg/*
69f29dbc25Smrg *	return -1 - UnKnown
70f29dbc25Smrg *	0 - Draco has 9210
71f29dbc25Smrg *	1 - Centaurus has 9211 Rev. A
72f29dbc25Smrg *	2 - Dorado has 9211 Rev. C
73f29dbc25Smrg */
74f29dbc25Smrg
75f29dbc25Smrg/*-----------------------------------------------------------------
76f29dbc25Smrg * Pnl_SetPlatform
77f29dbc25Smrg *
78f29dbc25Smrg * Description:		This function sets the panel with hardware platform.
79f29dbc25Smrg *
80f29dbc25Smrg * parameters:
81f29dbc25Smrg *		platform:	It specify the platform.
82f29dbc25Smrg *
83f29dbc25Smrg * return:			none.
84f29dbc25Smrg *-----------------------------------------------------------------*/
85f29dbc25Smrgvoid
86f29dbc25SmrgPnl_SetPlatform(int platform)
87f29dbc25Smrg{
88f29dbc25Smrg    /* To Be Implemented */
89f29dbc25Smrg    sPanelParam.Platform = platform;
90f29dbc25Smrg
91f29dbc25Smrg}
92f29dbc25Smrg
93f29dbc25Smrg/*-----------------------------------------------------------------
94f29dbc25Smrg * Pnl_GetPlatform
95f29dbc25Smrg *
96f29dbc25Smrg * Description:		This function returns the panel platform.
97f29dbc25Smrg *
98f29dbc25Smrg * parameters:		none.
99f29dbc25Smrg *
100f29dbc25Smrg * return:			On success it returns the panel platform.
101f29dbc25Smrg *-----------------------------------------------------------------*/
102f29dbc25Smrgint
103f29dbc25SmrgPnl_GetPlatform(void)
104f29dbc25Smrg{
105f29dbc25Smrg    sPanelParam.Platform = Detect_Platform();
106f29dbc25Smrg
107f29dbc25Smrg    return sPanelParam.Platform;
108f29dbc25Smrg
109f29dbc25Smrg}
110f29dbc25Smrg
111f29dbc25Smrg/*-----------------------------------------------------------------
112f29dbc25Smrg * Pnl_IsPanelPresent
113f29dbc25Smrg *
114f29dbc25Smrg * Description:		This function specifies whether the panel is prsent
115f29dbc25Smrg *					or not.
116f29dbc25Smrg *
117f29dbc25Smrg * parameters: 		none.
118f29dbc25Smrg *
119f29dbc25Smrg * return: 			On success it returns an integer panel present value.
120f29dbc25Smrg *-----------------------------------------------------------------*/
121f29dbc25Smrgint
122f29dbc25SmrgPnl_IsPanelPresent(void)
123f29dbc25Smrg{
124f29dbc25Smrg    /* To Be Implemented */
125f29dbc25Smrg    return sPanelParam.PanelPresent;
126f29dbc25Smrg}
127f29dbc25Smrg
128f29dbc25Smrg/*-----------------------------------------------------------------
129f29dbc25Smrg * Pnl_SetPanelPresent
130f29dbc25Smrg *
131f29dbc25Smrg * Description:		This function sets the panel_present parameter.
132f29dbc25Smrg *
133f29dbc25Smrg * parameters:
134f29dbc25Smrg * 		present:	It specifies the panel present value.
135f29dbc25Smrg *
136f29dbc25Smrg * return:			none.
137f29dbc25Smrg *-----------------------------------------------------------------*/
138f29dbc25Smrgvoid
139f29dbc25SmrgPnl_SetPanelPresent(int present)
140f29dbc25Smrg{
141f29dbc25Smrg    /* To Be Implemented */
142f29dbc25Smrg    sPanelParam.PanelPresent = present;
143f29dbc25Smrg}
144f29dbc25Smrg
145f29dbc25Smrg/*-----------------------------------------------------------------
146f29dbc25Smrg * Pnl_SetPanelParam
147f29dbc25Smrg *
148f29dbc25Smrg * Description:		This function sets the panel parameters
149f29dbc25Smrg *
150f29dbc25Smrg * parameters:
151f29dbc25Smrg *		pParam:		It specifies the elements of the panel parameter
152f29dbc25Smrg *					structure.
153f29dbc25Smrg *
154f29dbc25Smrg * return:	none.
155f29dbc25Smrg *-----------------------------------------------------------------*/
156f29dbc25Smrgvoid
157f29dbc25SmrgPnl_SetPanelParam(Pnl_PanelParams * pParam)
158f29dbc25Smrg{
159f29dbc25Smrg    if (pParam->Flags & PNL_PANELPRESENT) {
160f29dbc25Smrg        Pnl_SetPanelPresent(pParam->PanelPresent);
161f29dbc25Smrg    }
162f29dbc25Smrg    if (pParam->Flags & PNL_PLATFORM) {
163f29dbc25Smrg        Pnl_SetPlatform(pParam->Platform);
164f29dbc25Smrg    }
165f29dbc25Smrg    if (pParam->Flags & PNL_PANELCHIP) {
166f29dbc25Smrg        Pnl_SetPanelChip(pParam->PanelChip);
167f29dbc25Smrg    }
168f29dbc25Smrg    if (pParam->Flags & PNL_PANELSTAT) {
169f29dbc25Smrg        sPanelParam.PanelStat.XRes = pParam->PanelStat.XRes;
170f29dbc25Smrg        sPanelParam.PanelStat.YRes = pParam->PanelStat.YRes;
171f29dbc25Smrg        sPanelParam.PanelStat.Depth = pParam->PanelStat.Depth;
172f29dbc25Smrg        sPanelParam.PanelStat.MonoColor = pParam->PanelStat.MonoColor;
173f29dbc25Smrg        sPanelParam.PanelStat.Type = pParam->PanelStat.Type;
174f29dbc25Smrg    }
175f29dbc25Smrg}
176f29dbc25Smrg
177f29dbc25Smrg/*-----------------------------------------------------------------
178f29dbc25Smrg * Pnl_PowerUp
179f29dbc25Smrg *
180f29dbc25Smrg * Description:		This function sets the power based on the
181f29dbc25Smrg *					hardware platforms dorado or centaraus.
182f29dbc25Smrg *
183f29dbc25Smrg * parameters:		none.
184f29dbc25Smrg *
185f29dbc25Smrg * return:			none.
186f29dbc25Smrg *-----------------------------------------------------------------*/
187f29dbc25Smrgvoid
188f29dbc25SmrgPnl_PowerUp(void)
189f29dbc25Smrg{
190f29dbc25Smrg    int Platform;
191f29dbc25Smrg    unsigned long dcfg, hw_video;
192f29dbc25Smrg
193f29dbc25Smrg    Platform = Pnl_GetPlatform();
194f29dbc25Smrg
195f29dbc25Smrg#if PLATFORM_CENTAURUS
196f29dbc25Smrg    if (Platform == CENTAURUS_PLATFORM) {
197f29dbc25Smrg        Centaurus_Power_Up();
198f29dbc25Smrg        return;
199f29dbc25Smrg    }
200f29dbc25Smrg#endif
201f29dbc25Smrg
202f29dbc25Smrg#if PLATFORM_DORADO
203f29dbc25Smrg    if (Platform == DORADO_PLATFORM) {
204f29dbc25Smrg        Dorado_Power_Up();
205f29dbc25Smrg        return;
206f29dbc25Smrg    }
207f29dbc25Smrg#endif
208f29dbc25Smrg
209f29dbc25Smrg#if PLATFORM_GX2BASED
210f29dbc25Smrg    if (Platform == REDCLOUD_PLATFORM) {
211f29dbc25Smrg    }
212f29dbc25Smrg#endif
213f29dbc25Smrg
214f29dbc25Smrg    hw_video = gfx_detect_video();
215f29dbc25Smrg
216f29dbc25Smrg    if (hw_video == GFX_VID_CS5530) {
217f29dbc25Smrg        /* READ DISPLAY CONFIG FROM CX5530 */
218f29dbc25Smrg        dcfg = READ_VID32(CS5530_DISPLAY_CONFIG);
219f29dbc25Smrg
220f29dbc25Smrg        /* SET RELEVANT FIELDS */
221f29dbc25Smrg        dcfg |= (CS5530_DCFG_FP_PWR_EN | CS5530_DCFG_FP_DATA_EN);
222f29dbc25Smrg        /* Enable the flatpanel power and data */
223f29dbc25Smrg        WRITE_VID32(CS5530_DISPLAY_CONFIG, dcfg);
224f29dbc25Smrg    } else if (hw_video == GFX_VID_SC1200) {
225f29dbc25Smrg        /* READ DISPLAY CONFIG FROM SC1200 */
226f29dbc25Smrg        dcfg = READ_VID32(SC1200_DISPLAY_CONFIG);
227f29dbc25Smrg
228f29dbc25Smrg        /* SET RELEVANT FIELDS */
229f29dbc25Smrg        dcfg |= (SC1200_DCFG_FP_PWR_EN | SC1200_DCFG_FP_DATA_EN);
230f29dbc25Smrg        /* Enable the flatpanel power and data */
231f29dbc25Smrg        WRITE_VID32(SC1200_DISPLAY_CONFIG, dcfg);
232f29dbc25Smrg    } else if (hw_video == GFX_VID_REDCLOUD) {
233f29dbc25Smrg        /* READ DISPLAY CONFIG FROM REDCLOUD */
234f29dbc25Smrg        dcfg = READ_VID32(RCDF_DISPLAY_CONFIG);
235f29dbc25Smrg
236f29dbc25Smrg        /* SET RELEVANT FIELDS */
237f29dbc25Smrg        dcfg |= (RCDF_DCFG_FP_PWR_EN | RCDF_DCFG_FP_DATA_EN);
238f29dbc25Smrg        /* Enable the flatpanel power and data */
239f29dbc25Smrg        WRITE_VID32(RCDF_DISPLAY_CONFIG, dcfg);
240f29dbc25Smrg    }
241f29dbc25Smrg
242f29dbc25Smrg}
243f29dbc25Smrg
244f29dbc25Smrg/*-----------------------------------------------------------------
245f29dbc25Smrg * Pnl_PowerDown
246f29dbc25Smrg *
247f29dbc25Smrg * Description:		This function make power down based on the
248f29dbc25Smrg *					hardware platforms dorado or centaraus.
249f29dbc25Smrg *
250f29dbc25Smrg * parameters:		none.
251f29dbc25Smrg *
252f29dbc25Smrg * return:			none.
253f29dbc25Smrg *-----------------------------------------------------------------*/
254f29dbc25Smrgvoid
255f29dbc25SmrgPnl_PowerDown(void)
256f29dbc25Smrg{
257f29dbc25Smrg    int Platform;
258f29dbc25Smrg    unsigned long dcfg, hw_video;
259f29dbc25Smrg
260f29dbc25Smrg    Platform = Pnl_GetPlatform();
261f29dbc25Smrg
262f29dbc25Smrg#if PLATFORM_CENTAURUS
263f29dbc25Smrg    if (Platform == CENTAURUS_PLATFORM) {
264f29dbc25Smrg        Centaurus_Power_Down();
265f29dbc25Smrg        return;
266f29dbc25Smrg    }
267f29dbc25Smrg#endif
268f29dbc25Smrg#if PLATFORM_DORADO
269f29dbc25Smrg    if (Platform == DORADO_PLATFORM) {
270f29dbc25Smrg        Dorado_Power_Down();
271f29dbc25Smrg        return;
272f29dbc25Smrg    }
273f29dbc25Smrg#endif
274f29dbc25Smrg
275f29dbc25Smrg#if PLATFORM_GX2BASED
276f29dbc25Smrg    if (Platform == REDCLOUD_PLATFORM) {
277f29dbc25Smrg    }
278f29dbc25Smrg#endif
279f29dbc25Smrg
280f29dbc25Smrg    hw_video = gfx_detect_video();
281f29dbc25Smrg
282f29dbc25Smrg    if (hw_video == GFX_VID_CS5530) {
283f29dbc25Smrg        /* READ DISPLAY CONFIG FROM CX5530 */
284f29dbc25Smrg        dcfg = READ_VID32(CS5530_DISPLAY_CONFIG);
285f29dbc25Smrg
286f29dbc25Smrg        /* CLEAR RELEVANT FIELDS */
287f29dbc25Smrg        dcfg &= ~(CS5530_DCFG_FP_PWR_EN | CS5530_DCFG_FP_DATA_EN);
288f29dbc25Smrg        /* Disable the flatpanel power and data */
289f29dbc25Smrg        WRITE_VID32(CS5530_DISPLAY_CONFIG, dcfg);
290f29dbc25Smrg    } else if (hw_video == GFX_VID_SC1200) {
291f29dbc25Smrg        /* READ DISPLAY CONFIG FROM SC1200 */
292f29dbc25Smrg        dcfg = READ_VID32(SC1200_DISPLAY_CONFIG);
293f29dbc25Smrg
294f29dbc25Smrg        /* CLEAR RELEVANT FIELDS */
295f29dbc25Smrg        dcfg &= ~(SC1200_DCFG_FP_PWR_EN | SC1200_DCFG_FP_DATA_EN);
296f29dbc25Smrg        /* Disable the flatpanel power and data */
297f29dbc25Smrg        WRITE_VID32(SC1200_DISPLAY_CONFIG, dcfg);
298f29dbc25Smrg    } else if (hw_video == GFX_VID_REDCLOUD) {
299f29dbc25Smrg        /* READ DISPLAY CONFIG FROM REDCLOUD */
300f29dbc25Smrg        dcfg = READ_VID32(RCDF_DISPLAY_CONFIG);
301f29dbc25Smrg
302f29dbc25Smrg        /* CLEAR RELEVANT FIELDS */
303f29dbc25Smrg        dcfg &= ~(RCDF_DCFG_FP_PWR_EN | RCDF_DCFG_FP_DATA_EN);
304f29dbc25Smrg        /* Disable the flatpanel power and data */
305f29dbc25Smrg        WRITE_VID32(RCDF_DISPLAY_CONFIG, dcfg);
306f29dbc25Smrg    }
307f29dbc25Smrg}
308f29dbc25Smrg
309f29dbc25Smrg/*-----------------------------------------------------------------
310f29dbc25Smrg * Pnl_SavePanelState
311f29dbc25Smrg *
312f29dbc25Smrg * Description:		This function saves the panel state based on the
313f29dbc25Smrg *					hardware platforms dorado or centaraus.
314f29dbc25Smrg *
315f29dbc25Smrg * parameters:		none.
316f29dbc25Smrg *
317f29dbc25Smrg * return:			none.
318f29dbc25Smrg *-----------------------------------------------------------------*/
319f29dbc25Smrgvoid
320f29dbc25SmrgPnl_SavePanelState(void)
321f29dbc25Smrg{
322f29dbc25Smrg    int Platform;
323f29dbc25Smrg
324f29dbc25Smrg    Platform = Pnl_GetPlatform();
325f29dbc25Smrg
326f29dbc25Smrg#if PLATFORM_CENTAURUS
327f29dbc25Smrg    if (Platform == CENTAURUS_PLATFORM) {
328f29dbc25Smrg        Centaurus_Save_Panel_State();
329f29dbc25Smrg        return;
330f29dbc25Smrg    }
331f29dbc25Smrg#endif
332f29dbc25Smrg
333f29dbc25Smrg#if PLATFORM_DORADO
334f29dbc25Smrg    if (Platform == DORADO_PLATFORM) {
335f29dbc25Smrg        Dorado_Save_Panel_State();
336f29dbc25Smrg        return;
337f29dbc25Smrg    }
338f29dbc25Smrg#endif
339f29dbc25Smrg
340f29dbc25Smrg#if PLATFORM_GX2BASED
341f29dbc25Smrg    if (Platform == REDCLOUD_PLATFORM) {
342f29dbc25Smrg    }
343f29dbc25Smrg#endif
344f29dbc25Smrg}
345f29dbc25Smrg
346f29dbc25Smrg/*-----------------------------------------------------------------
347f29dbc25Smrg * Pnl_RestorePanelState
348f29dbc25Smrg *
349f29dbc25Smrg * Description:		This function restore the panel state based on the
350f29dbc25Smrg *					hardware platforms dorado or centaraus.
351f29dbc25Smrg *
352f29dbc25Smrg * parameters:		none.
353f29dbc25Smrg *
354f29dbc25Smrg * return:			none.
355f29dbc25Smrg *-----------------------------------------------------------------*/
356f29dbc25Smrgvoid
357f29dbc25SmrgPnl_RestorePanelState(void)
358f29dbc25Smrg{
359f29dbc25Smrg    int Platform;
360f29dbc25Smrg
361f29dbc25Smrg    Platform = Pnl_GetPlatform();
362f29dbc25Smrg#if PLATFORM_CENTAURUS
363f29dbc25Smrg    if (Platform == CENTAURUS_PLATFORM) {
364f29dbc25Smrg        Centaurus_Restore_Panel_State();
365f29dbc25Smrg        return;
366f29dbc25Smrg    }
367f29dbc25Smrg#endif
368f29dbc25Smrg
369f29dbc25Smrg#if PLATFORM_DORADO
370f29dbc25Smrg    if (Platform == DORADO_PLATFORM) {
371f29dbc25Smrg        Dorado_Restore_Panel_State();
372f29dbc25Smrg        return;
373f29dbc25Smrg    }
374f29dbc25Smrg#endif
375f29dbc25Smrg
376f29dbc25Smrg#if PLATFORM_GX2BASED
377f29dbc25Smrg    if (Platform == REDCLOUD_PLATFORM) {
378f29dbc25Smrg    }
379f29dbc25Smrg#endif
380f29dbc25Smrg}
381f29dbc25Smrg
382f29dbc25Smrg/*-----------------------------------------------------------------
383f29dbc25Smrg * Pnl_GetPanelParam
384f29dbc25Smrg *
385f29dbc25Smrg * Description:		This function gets the panel parameters from the
386f29dbc25Smrg *					hardware platforms dorado or centaraus.
387f29dbc25Smrg *
388f29dbc25Smrg * parameters:
389f29dbc25Smrg * 		pParam:		It specifies the elements of the panel parameter
390f29dbc25Smrg *					structure.
391f29dbc25Smrg *
392f29dbc25Smrg * return:			none.
393f29dbc25Smrg *-----------------------------------------------------------------*/
394f29dbc25Smrgvoid
395f29dbc25SmrgPnl_GetPanelParam(Pnl_PanelParams * pParam)
396f29dbc25Smrg{
397f29dbc25Smrg    if (pParam->Flags & PNL_PANELPRESENT) {
398f29dbc25Smrg        pParam->PanelPresent = Pnl_IsPanelPresent();
399f29dbc25Smrg    }
400f29dbc25Smrg    if (pParam->Flags & PNL_PLATFORM) {
401f29dbc25Smrg        pParam->Platform = Pnl_GetPlatform();
402f29dbc25Smrg    }
403f29dbc25Smrg    if ((pParam->Flags & PNL_PANELCHIP) || (pParam->Flags & PNL_PANELSTAT)) {
404f29dbc25Smrg#if PLATFORM_CENTAURUS
405f29dbc25Smrg        if (pParam->Platform == CENTAURUS_PLATFORM) {
406f29dbc25Smrg            Centaurus_Get_9211_Details(pParam->Flags, pParam);
407f29dbc25Smrg            return;
408f29dbc25Smrg        }
409f29dbc25Smrg#endif
410f29dbc25Smrg
411f29dbc25Smrg#if PLATFORM_DORADO
412f29dbc25Smrg        if (pParam->Platform == DORADO_PLATFORM) {
413f29dbc25Smrg            Dorado_Get_9211_Details(pParam->Flags, pParam);
414f29dbc25Smrg            return;
415f29dbc25Smrg        }
416f29dbc25Smrg#endif
417f29dbc25Smrg
418f29dbc25Smrg#if PLATFORM_GX2BASED
419f29dbc25Smrg        if (pParam->Platform == REDCLOUD_PLATFORM) {
420f29dbc25Smrg        }
421f29dbc25Smrg#endif
422f29dbc25Smrg
423f29dbc25Smrg        /* if unknown platform put unknown */
424f29dbc25Smrg        if (pParam->Flags & PNL_PANELCHIP)
425f29dbc25Smrg            pParam->PanelChip = PNL_UNKNOWN_CHIP;
426f29dbc25Smrg
427f29dbc25Smrg        if (pParam->Flags & PNL_PANELSTAT) {
428f29dbc25Smrg            pParam->PanelStat.XRes = 0;
429f29dbc25Smrg            pParam->PanelStat.YRes = 0;
430f29dbc25Smrg            pParam->PanelStat.Depth = 0;
431f29dbc25Smrg            pParam->PanelStat.MonoColor = PNL_UNKNOWN_COLOR;
432f29dbc25Smrg            pParam->PanelStat.Type = PNL_UNKNOWN_PANEL;
433f29dbc25Smrg        }
434f29dbc25Smrg    }
435f29dbc25Smrg}
436f29dbc25Smrg
437f29dbc25Smrg/*-----------------------------------------------------------------
438f29dbc25Smrg * Pnl_SetPanelChip
439f29dbc25Smrg *
440f29dbc25Smrg * Description:		This function sets the panelchip parameter of panel
441f29dbc25Smrg *					structure.
442f29dbc25Smrg *
443f29dbc25Smrg * parameters:
444f29dbc25Smrg *   	panelChip:	It specifies the panelChip value.
445f29dbc25Smrg *
446f29dbc25Smrg * return:			none.
447f29dbc25Smrg *-----------------------------------------------------------------*/
448f29dbc25Smrg
449f29dbc25Smrgvoid
450f29dbc25SmrgPnl_SetPanelChip(int panelChip)
451f29dbc25Smrg{
452f29dbc25Smrg    /* To Be Implemented */
453f29dbc25Smrg    sPanelParam.PanelChip = panelChip;
454f29dbc25Smrg
455f29dbc25Smrg}
456f29dbc25Smrg
457f29dbc25Smrg/*-----------------------------------------------------------------
458f29dbc25Smrg * Pnl_GetPanelChip
459f29dbc25Smrg *
460f29dbc25Smrg * Description:		This function gets the panelchip parameter of panel
461f29dbc25Smrg *					structure.
462f29dbc25Smrg *
463f29dbc25Smrg * parameters:		none
464f29dbc25Smrg *
465f29dbc25Smrg * return:			On success it returns the panelchip.
466f29dbc25Smrg *-----------------------------------------------------------------*/
467f29dbc25Smrgint
468f29dbc25SmrgPnl_GetPanelChip(void)
469f29dbc25Smrg{
470f29dbc25Smrg    /* To Be Implemented */
471f29dbc25Smrg    return sPanelParam.PanelChip;
472f29dbc25Smrg}
473f29dbc25Smrg
474f29dbc25Smrg/*-----------------------------------------------------------------
475f29dbc25Smrg * Pnl_InitPanel
476f29dbc25Smrg *
477f29dbc25Smrg * Description:		This function initializes the panel with
478f29dbc25Smrg *					hardware platforms dorado or centaraus.
479f29dbc25Smrg *
480f29dbc25Smrg * parameters:
481f29dbc25Smrg * 		pParam:		It specifies the elements of the panel parameter
482f29dbc25Smrg *					structure.
483f29dbc25Smrg *
484f29dbc25Smrg * return:			none.
485f29dbc25Smrg *-----------------------------------------------------------------*/
486f29dbc25Smrgint
487f29dbc25SmrgPnl_InitPanel(Pnl_PanelParams * pParam)
488f29dbc25Smrg{
489f29dbc25Smrg    Pnl_PanelParams *pPtr;
490f29dbc25Smrg
491f29dbc25Smrg    if (pParam == 0x0)                 /* NULL  use the static table */
492f29dbc25Smrg        pPtr = &sPanelParam;
493f29dbc25Smrg    else
494f29dbc25Smrg        pPtr = pParam;
495f29dbc25Smrg
496f29dbc25Smrg    if (!pPtr->PanelPresent) {
497f29dbc25Smrg        return -1;                     /* error */
498f29dbc25Smrg    } else {
499f29dbc25Smrg        if ((pPtr->PanelChip < 0) || (pPtr->Platform < 0))
500f29dbc25Smrg            return -1;                 /* error */
501f29dbc25Smrg
502f29dbc25Smrg#if PLATFORM_DRACO
503f29dbc25Smrg        /* check we are init. the right one */
504f29dbc25Smrg        if ((pPtr->Platform == DRACO_PLATFORM)
505f29dbc25Smrg            && (pPtr->PanelChip == PNL_9210)) {
506f29dbc25Smrg            Draco9210Init(&(pPtr->PanelStat));
507f29dbc25Smrg        }
508f29dbc25Smrg#endif
509f29dbc25Smrg
510f29dbc25Smrg#if PLATFORM_CENTAURUS
511f29dbc25Smrg        /* check we are init. the right one */
512f29dbc25Smrg        if (pPtr->Platform == CENTAURUS_PLATFORM) {
513f29dbc25Smrg            Centaurus_9211init(&(pPtr->PanelStat));
514f29dbc25Smrg        }
515f29dbc25Smrg#endif
516f29dbc25Smrg
517f29dbc25Smrg#if PLATFORM_DORADO
518f29dbc25Smrg        /* check we are init. the right one */
519f29dbc25Smrg        if ((pPtr->Platform == DORADO_PLATFORM) &&
520f29dbc25Smrg            (pPtr->PanelChip == PNL_9211_C)) {
521f29dbc25Smrg            Dorado9211Init(&(pPtr->PanelStat));
522f29dbc25Smrg        }
523f29dbc25Smrg#endif
524f29dbc25Smrg#if PLATFORM_GX2BASED
525f29dbc25Smrg        if (pPtr->Platform == REDCLOUD_PLATFORM) {
526f29dbc25Smrg            Redcloud_9211init(&(pPtr->PanelStat));
527f29dbc25Smrg        }
528f29dbc25Smrg#endif
529f29dbc25Smrg    }                                  /* else  end */
530f29dbc25Smrg    return 1;
531f29dbc25Smrg}
532