#include <libfdt.h>
#include <fdt_support.h>
#include <nand.h>
+#include <mxcfb.h>
#include <linux/list.h>
#include <linux/fb.h>
#include <jffs2/load_kernel.h>
prop = fdt_getprop(blob, off, "vsync-active", NULL);
if (prop)
fb_mode->sync |= *prop ? FB_SYNC_VERT_HIGH_ACT : 0;
-#if 0
+#if defined(CONFIG_MX51) || defined(CONFIG_MX53) || defined(CONFIG_MX6)
prop = fdt_getprop(blob, off, "de-active", NULL);
if (prop)
- fb_mode->sync |= *prop ? FB_SYNC_DATA_ENABLE_HIGH_ACT : 0;
+ fb_mode->sync |= *prop ? 0 : FB_SYNC_OE_LOW_ACT;
prop = fdt_getprop(blob, off, "pixelclk-active", NULL);
if (prop)
- fb_mode->sync |= *prop ? FB_SYNC_DOTCLK_FALLING_ACT : 0;
+ fb_mode->sync |= *prop ? 0 : FB_SYNC_CLK_LAT_FALL;
#endif
return 0;
}
if (ret)
goto out;
- /* TOTO: make these configurable */
+#if defined(CONFIG_MX51) || defined(CONFIG_MX53) || defined(CONFIG_MX6)
+ ret = SET_FB_PROP("de-active",
+ !(fb_mode->sync & FB_SYNC_OE_LOW_ACT));
+ if (ret)
+ goto out;
+ ret = SET_FB_PROP("pixelclk-active",
+ !(fb_mode->sync & FB_SYNC_CLK_LAT_FALL));
+ if (ret)
+ goto out;
+#else
+ /* TODO: make these configurable */
ret = SET_FB_PROP("de-active", 1);
if (ret)
goto out;
ret = SET_FB_PROP("pixelclk-active", 1);
if (ret)
goto out;
-
+#endif
out:
karo_set_fdtsize(blob);
return ret;