]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/karo/tx6/tx6qdl.c
Merge branch 'tx6-devel' into uboot-merge
[karo-tx-uboot.git] / board / karo / tx6 / tx6qdl.c
index 0ba59ea785f758df70e0739457aaf04b19d6a9f2..5b95e59736e62cf890849660bddf4316099db1c5 100644 (file)
@@ -539,9 +539,6 @@ int board_mmc_init(bd_t *bis)
                struct tx6_esdhc_cfg *cfg = &tx6qdl_esdhc_cfg[i];
                int ret;
 
-               if (i >= CONFIG_SYS_FSL_ESDHC_NUM)
-                       break;
-
                cfg->cfg.sdhc_clk = mxc_get_clock(cfg->clkid);
                imx_iomux_v3_setup_multiple_pads(cfg->pads, cfg->num_pads);
 
@@ -881,6 +878,12 @@ static struct fb_videomode tx6_fb_modes[] = {
 };
 
 static int lcd_enabled = 1;
+static int lcd_bl_polarity;
+
+static int lcd_backlight_polarity(void)
+{
+       return lcd_bl_polarity;
+}
 
 void lcd_enable(void)
 {
@@ -899,7 +902,8 @@ void lcd_enable(void)
                udelay(100);
                gpio_set_value(TX6_LCD_RST_GPIO, 1);
                udelay(300000);
-               gpio_set_value(TX6_LCD_BACKLIGHT_GPIO, is_lvds());
+               gpio_set_value(TX6_LCD_BACKLIGHT_GPIO,
+                       lcd_backlight_polarity());
        }
 }
 
@@ -915,7 +919,8 @@ void lcd_panel_disable(void)
 {
        if (lcd_enabled) {
                debug("Switching LCD off\n");
-               gpio_set_value(TX6_LCD_BACKLIGHT_GPIO, !is_lvds());
+               gpio_set_value(TX6_LCD_BACKLIGHT_GPIO,
+                       !lcd_backlight_polarity());
                gpio_set_value(TX6_LCD_RST_GPIO, 0);
                gpio_set_value(TX6_LCD_PWR_GPIO, 0);
        }
@@ -993,6 +998,7 @@ void lcd_ctrl_init(void *lcdbase)
        }
 
        karo_fdt_move_fdt();
+       lcd_bl_polarity = karo_fdt_get_backlight_polarity(working_fdt);
 
        if (video_mode == NULL) {
                debug("Disabling LCD\n");