]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
karo: fdt: stub out DTB+LVDS related functions for nonDT resp. non-LVDS builds
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 6 Mar 2014 11:14:01 +0000 (12:14 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 6 Mar 2014 11:14:01 +0000 (12:14 +0100)
board/karo/common/fdt.c
board/karo/common/karo.h

index af85f0612b87416dc1ce79d6021203bb10b3256d..13fb03eed94eafe8c128da8e8e5e428c00966b0b 100644 (file)
@@ -734,6 +734,7 @@ int karo_fdt_update_fb_mode(void *blob, const char *name)
        return off;
 }
 
+#ifdef CONFIG_SYS_LVDS_IF
 int karo_fdt_get_lcd_bus_width(const void *blob, int default_width)
 {
        int off = fdt_path_offset(blob, "display");
@@ -786,6 +787,7 @@ u8 karo_fdt_get_lvds_channels(const void *blob)
        }
        return lvds_chan_mask;
 }
+#endif
 
 int karo_fdt_get_backlight_polarity(const void *blob)
 {
index dd2a723501c00a80b782b693f1c2e2dbd5c8e855..f2a9f92e903c708a7a7fdf914e6ad1d2e27653db 100644 (file)
@@ -37,9 +37,6 @@ int karo_fdt_get_fb_mode(void *blob, const char *name,
 int karo_fdt_update_fb_mode(void *blob, const char *name);
 int karo_fdt_create_fb_mode(void *blob, const char *name,
                        struct fb_videomode *mode);
-int karo_fdt_get_lcd_bus_width(const void *blob, int default_width);
-int karo_fdt_get_lvds_mapping(const void *blob, int default_mapping);
-u8 karo_fdt_get_lvds_channels(const void *blob);
 int karo_fdt_get_backlight_polarity(const void *blob);
 #else
 static inline void karo_fdt_remove_node(void *blob, const char *node)
@@ -82,6 +79,17 @@ static inline int karo_fdt_create_fb_mode(void *blob,
 {
        return 0;
 }
+static inline int karo_fdt_get_backlight_polarity(const void *blob)
+{
+       return getenv_yesno("backlight_polarity");
+}
+#endif
+
+#if defined(CONFIG_SYS_LVDS_IF) && defined(CONFIG_OF_LIBFDT)
+int karo_fdt_get_lcd_bus_width(const void *blob, int default_width);
+int karo_fdt_get_lvds_mapping(const void *blob, int default_mapping);
+u8 karo_fdt_get_lvds_channels(const void *blob);
+#else
 static inline int karo_fdt_get_lcd_bus_width(const void *blob, int default_width)
 {
        return default_width;
@@ -94,10 +102,6 @@ static inline u8 karo_fdt_get_lvds_channels(const void *blob)
 {
        return 0;
 }
-static inline int karo_fdt_get_backlight_polarity(const void *blob)
-{
-       return getenv_yesno("backlight_polarity");
-}
 #endif
 
 static inline const char *karo_get_vmode(const char *video_mode)