summaryrefslogtreecommitdiff
path: root/src/cpu/samsung/exynos5-common/s5p-dp-reg.c
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2013-04-09 14:39:34 -0700
committerRonald G. Minnich <rminnich@gmail.com>2013-04-10 17:37:25 +0200
commit7576f2515ed81a67e6271cb6a88fa94b626e2938 (patch)
tree34bee15a954e391ee7b01bfe803faf7f069af226 /src/cpu/samsung/exynos5-common/s5p-dp-reg.c
parent765ff76d8f1c09fefdc533b2facd0d99b1787eca (diff)
GOOGLE/SNOW: add edp support to ramstage
Add basic edp support to the ramstage. Not working. Change-Id: I15086e03417edca7426c214e67b51719d8ed9341 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/3055 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/cpu/samsung/exynos5-common/s5p-dp-reg.c')
-rw-r--r--src/cpu/samsung/exynos5-common/s5p-dp-reg.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/cpu/samsung/exynos5-common/s5p-dp-reg.c b/src/cpu/samsung/exynos5-common/s5p-dp-reg.c
index adb64a8e10..60e1398ba4 100644
--- a/src/cpu/samsung/exynos5-common/s5p-dp-reg.c
+++ b/src/cpu/samsung/exynos5-common/s5p-dp-reg.c
@@ -19,6 +19,8 @@
#include "cpu/samsung/exynos5250/fimd.h"
#include "s5p-dp-core.h"
+#include <console/console.h>
+
void s5p_dp_reset(struct s5p_dp_device *dp)
{
u32 reg;
@@ -127,7 +129,7 @@ int s5p_dp_init_analog_func(struct s5p_dp_device *dp)
start = get_timer(0);
while (s5p_dp_get_pll_lock_status(dp) == PLL_UNLOCKED) {
if (get_timer(start) > PLL_LOCK_TIMEOUT) {
- debug("%s: PLL is not locked yet\n", __func__);
+ printk(BIOS_DEBUG, "%s: PLL is not locked yet\n", __func__);
return -1;
}
}
@@ -174,6 +176,9 @@ int s5p_dp_start_aux_transaction(struct s5p_dp_device *dp)
/* Enable AUX CH operation */
setbits_le32(&base->aux_ch_ctl_2, AUX_EN);
+ printk(BIOS_DEBUG, "%s: base: 0x%p, &base->aux_ch_ctl_2: 0x%p, aux_ch_ctl_2: 0x%08x\n",
+ __func__, base, &base->aux_ch_ctl_2, readl(&base->aux_ch_ctl_2));
+
/* Is AUX CH command reply received? */
reg = readl(&base->dp_int_sta);
while (!(reg & RPLY_RECEIV))
@@ -184,6 +189,7 @@ int s5p_dp_start_aux_transaction(struct s5p_dp_device *dp)
/* Clear interrupt source for AUX CH access error */
reg = readl(&base->dp_int_sta);
+ printk(BIOS_DEBUG, "%s: dp_int_sta: 0x%02x\n", __func__, reg);
if (reg & AUX_ERR) {
writel(AUX_ERR, &base->dp_int_sta);
return -1;
@@ -192,7 +198,7 @@ int s5p_dp_start_aux_transaction(struct s5p_dp_device *dp)
/* Check AUX CH error access status */
reg = readl(&base->dp_int_sta);
if ((reg & AUX_STATUS_MASK) != 0) {
- debug("AUX CH error happens: %d\n\n",
+ printk(BIOS_DEBUG, "AUX CH error happens: %d\n\n",
reg & AUX_STATUS_MASK);
return -1;
}
@@ -241,7 +247,7 @@ int s5p_dp_write_byte_to_dpcd(struct s5p_dp_device *dp,
if (retval == 0)
break;
else
- debug("Aux Transaction fail!\n");
+ printk(BIOS_DEBUG, "Aux Transaction fail!\n");
}
return retval;
@@ -284,7 +290,7 @@ int s5p_dp_read_byte_from_dpcd(struct s5p_dp_device *dp,
if (retval == 0)
break;
else
- debug("Aux Transaction fail!\n");
+ printk(BIOS_DEBUG, "Aux Transaction fail!\n");
}
/* Read data buffer */
@@ -359,7 +365,7 @@ int s5p_dp_is_slave_video_stream_clock_on(struct s5p_dp_device *dp)
reg = readl(&base->sys_ctl_2);
if (reg & CHA_STA) {
- debug("Input stream clk is changing\n");
+ printk(BIOS_DEBUG, "Input stream clk is changing\n");
return -1;
}
@@ -433,7 +439,7 @@ int s5p_dp_is_video_stream_on(struct s5p_dp_device *dp)
} while (get_timer(start) <= STREAM_ON_TIMEOUT);
if (i != 4) {
- debug("s5p_dp_is_video_stream_on timeout\n");
+ printk(BIOS_DEBUG, "s5p_dp_is_video_stream_on timeout\n");
return -1;
}