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
|
/*
* Copyright (C) ST-Ericsson SA 2010
*
* Author: Torbjorn Svensson <torbjorn.x.svensson@stericsson.com>
* for ST-Ericsson.
*
* License terms: GNU General Public License (GPL), version 2.
*/
#include <common.h>
#include <command.h>
#include <asm/arch/common.h>
#include "mcde_display.h"
#include "mcde_regs.h"
#include <malloc.h>
#include "mcde.h"
#include <linux/err.h>
#include <asm/arch/ab8500.h>
#include "common.h"
static int mcde_enable_gpio(void)
{
debug("%s: enter\n", __func__);
/* placeholder */
return 0;
}
int mcde_turn_on_display_dpi(void)
{
debug("Turn on display (dpi)!\n");
/* placeholder */
return 0;
}
static int mcde_display_power_init(void)
{
debug("%s: Entering\n", __func__);
/* placeholder */
return 0;
}
int dpi_display_platform_enable(void)
{
int res = 0;
debug("%s: Entering\n", __func__);
/* the gpios used to be enabled here */
return res;
}
void print_vmode(struct mcde_video_mode *vmode)
{
if (!vmode) {
printf("%s: vmode = NULL\n", __func__);
return;
}
debug("resolution: %dx%d\n", vmode->xres, vmode->yres);
debug(" pixclock: %d\n", vmode->pixclock);
debug(" hbp: %d\n", vmode->hbp);
debug(" hfp: %d\n", vmode->hfp);
debug(" hsw: %d\n", vmode->hsw);
debug(" vbp: %d\n", vmode->vbp1);
debug(" vfp: %d\n", vmode->vfp1);
debug(" vsw: %d\n", vmode->vsw);
debug("interlaced: %s\n", vmode->interlaced ? "true" : "false");
debug(" bckcol: (%d,%d,%d)\n",
vmode->bckcol[0], vmode->bckcol[1], vmode->bckcol[2]);
}
int mcde_startup_dpi(struct mcde_platform_data *pdata)
{
int ret;
debug("%s: Entering\n", __func__);
if (main_display.port->mode != MCDE_PORTMODE_VID) {
printf("%s: Only VIDEO mode supported\n", __func__);
return -ENODEV;
}
mcde_init();
ret = mcde_probe(1, pdata);
if (ret != 0) {
printf("%s: mcde_probe() -> %d\n", __func__, ret);
return ret;
}
ret = mcde_display_power_init();
if (ret != 0) {
printf("%s: mcde_display_power_init() -> %d\n", __func__, ret);
return ret;
}
ret = mcde_enable_gpio();
if (ret != 0) {
printf("%s: mcde_enable_gpio() -> %d\n", __func__, ret);
return ret;
}
ret = dpi_display_platform_enable();
if (ret != 0) {
printf("%s: dpi_display_platform_enable() -> %d\n",
__func__, ret);
return ret;
}
print_vmode(&video_mode);
return 0;
}
|