]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
karo: fdt: disable can1 interface also for LVDS modules
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 9 Jan 2014 10:51:08 +0000 (11:51 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 9 Jan 2014 10:51:08 +0000 (11:51 +0100)
board/karo/common/fdt.c

index b58bec5f56607113c4749a40ed91eb445228ddad..5f6fd4888df55e3beca975b97032474ecb520bca 100644 (file)
@@ -383,6 +383,7 @@ void karo_fdt_fixup_flexcan(void *blob, int xcvr_present)
 {
        int ret;
        const char *xcvr_status = xcvr_present ? "disabled" : NULL;
+       const char *otg_mode = getenv("otg_mode");
 
 #ifndef CONFIG_SYS_LVDS_IF
        if (xcvr_present) {
@@ -393,14 +394,12 @@ void karo_fdt_fixup_flexcan(void *blob, int xcvr_present)
                        karo_fdt_set_lcd_pins(blob, "lcdif_24bit_pins_a");
                }
        } else {
-               const char *otg_mode = getenv("otg_mode");
-
-               if (otg_mode && (strcmp(otg_mode, "host") == 0))
-                       karo_fdt_enable_node(blob, "can1", 0);
-
                karo_fdt_set_lcd_pins(blob, "lcdif_24bit_pins_a");
        }
 #endif
+       if (otg_mode && strcmp(otg_mode, "host") == 0)
+               karo_fdt_enable_node(blob, "can1", 0);
+
        if (xcvr_status) {
                debug("Disabling CAN XCVR\n");
                ret = fdt_find_and_setprop(blob, "reg_can_xcvr", "status",