summaryrefslogtreecommitdiffstats
path: root/board/davinci/ea20/ea20.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2012-10-04 10:00:42 -0700
committerTom Rini <trini@ti.com>2012-10-04 10:00:42 -0700
commit198166877768cf4d0197289a524df8a6ca0e2f19 (patch)
treed8fb2afc6d5b09ceeb4e3e62dc20b64d167ab346 /board/davinci/ea20/ea20.c
parent73c15c634dda388e21eaf0ebc85e324872df0d25 (diff)
parent777544085d2b417a36df50eb564bf037a044e60e (diff)
downloadblackbird-obmc-uboot-198166877768cf4d0197289a524df8a6ca0e2f19.tar.gz
blackbird-obmc-uboot-198166877768cf4d0197289a524df8a6ca0e2f19.zip
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'board/davinci/ea20/ea20.c')
-rw-r--r--board/davinci/ea20/ea20.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 7e000404ee..0edd910210 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -176,6 +176,9 @@ int board_early_init_f(void)
if (davinci_configure_pin_mux(gpio_pins, ARRAY_SIZE(gpio_pins)) != 0)
return 1;
+ /* Set DISP_ON high to enable LCD output*/
+ gpio_direction_output(97, 1);
+
/* Set the RESETOUTn low */
gpio_direction_output(111, 0);
@@ -188,9 +191,6 @@ int board_early_init_f(void)
/* Set LCD_B_PWR low to power down LCD Backlight*/
gpio_direction_output(102, 0);
- /* Set DISP_ON low to disable LCD output*/
- gpio_direction_output(97, 0);
-
#ifndef CONFIG_USE_IRQ
irq_init();
#endif
@@ -250,15 +250,19 @@ int board_early_init_f(void)
writel(readl(&davinci_syscfg_regs->mstpri[2]) & 0x0fffffff,
&davinci_syscfg_regs->mstpri[2]);
- /* Set LCD_B_PWR low to power up LCD Backlight*/
- gpio_set_value(102, 1);
-
- /* Set DISP_ON low to disable LCD output*/
- gpio_set_value(97, 1);
return 0;
}
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
+{
+ return 1;
+}
+
int board_init(void)
{
/* arch number of the board */
@@ -276,6 +280,9 @@ int board_init(void)
int board_late_init(void)
{
+ unsigned char buf[2];
+ int ret;
+
/* PinMux for HALTEN */
if (davinci_configure_pin_mux(halten_pin, ARRAY_SIZE(halten_pin)) != 0)
return 1;
@@ -283,8 +290,15 @@ int board_late_init(void)
/* Set HALTEN to high */
gpio_direction_output(134, 1);
- setenv("stdout", "serial");
+ /* Set fixed contrast settings for LCD via I2C potentiometer */
+ buf[0] = 0x00;
+ buf[1] = 0xd7;
+ ret = i2c_write(0x2e, 6, 1, buf, 2);
+ if (ret)
+ puts("\nContrast Settings FAILED\n");
+ /* Set LCD_B_PWR high to power up LCD Backlight*/
+ gpio_set_value(102, 1);
return 0;
}
#endif /* CONFIG_BOARD_LATE_INIT */
OpenPOWER on IntegriCloud