Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android

This commit is contained in:
Mark Brown
2014-04-17 19:06:13 +01:00
4 changed files with 69 additions and 26 deletions

View File

@@ -0,0 +1,52 @@
/*
* ARM Ltd. Versatile Express
*
*/
/ {
panels {
panel@0 {
compatible = "panel";
mode = "VGA";
refresh = <60>;
xres = <640>;
yres = <480>;
pixclock = <39721>;
left_margin = <40>;
right_margin = <24>;
upper_margin = <32>;
lower_margin = <11>;
hsync_len = <96>;
vsync_len = <2>;
sync = <0>;
vmode = "FB_VMODE_NONINTERLACED";
tim2 = "TIM2_BCD", "TIM2_IPC";
cntl = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)";
caps = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888";
bpp = <16>;
};
panel@1 {
compatible = "panel";
mode = "XVGA";
refresh = <60>;
xres = <1024>;
yres = <768>;
pixclock = <15748>;
left_margin = <152>;
right_margin = <48>;
upper_margin = <23>;
lower_margin = <3>;
hsync_len = <104>;
vsync_len = <4>;
sync = <0>;
vmode = "FB_VMODE_NONINTERLACED";
tim2 = "TIM2_BCD", "TIM2_IPC";
cntl = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)";
caps = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888";
bpp = <16>;
};
};
};

View File

@@ -261,27 +261,6 @@
/include/ "rtsm_ve-motherboard.dtsi"
};
panels {
panel@0 {
compatible = "panel";
mode = "XVGA";
refresh = <60>;
xres = <1024>;
yres = <768>;
pixclock = <15748>;
left_margin = <152>;
right_margin = <48>;
upper_margin = <23>;
lower_margin = <3>;
hsync_len = <104>;
vsync_len = <4>;
sync = <0>;
vmode = "FB_VMODE_NONINTERLACED";
tim2 = "TIM2_BCD", "TIM2_IPC";
cntl = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)";
caps = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888";
bpp = <16>;
};
};
};
/include/ "clcd-panels.dtsi"

View File

@@ -157,3 +157,5 @@
/include/ "rtsm_ve-motherboard.dtsi"
};
};
/include/ "clcd-panels.dtsi"

View File

@@ -45,6 +45,8 @@
/* This is limited to 16 characters when displayed by X startup */
static const char *clcd_name = "CLCD FB";
static char *def_mode;
module_param_named(mode, def_mode, charp, 0);
/*
* Unfortunately, the enable/disable functions may be called either from
@@ -763,10 +765,18 @@ static int clcdfb_dt_init(struct clcd_fb *fb)
na = of_n_addr_cells(node);
ns = of_n_size_cells(node);
if (WARN_ON(of_property_read_string(node, "mode", &mode)))
return -ENODEV;
if (def_mode && strlen(def_mode) > 0) {
fb->panel = clcdfb_get_panel(def_mode);
if (!fb->panel)
printk(KERN_ERR "CLCD: invalid mode specified on the command line (%s)\n", def_mode);
}
if (!fb->panel) {
if (WARN_ON(of_property_read_string(node, "mode", &mode)))
return -ENODEV;
fb->panel = clcdfb_get_panel(mode);
}
fb->panel = clcdfb_get_panel(mode);
if (!fb->panel)
return -EINVAL;
fb->fb.fix.smem_len = fb->panel->mode.xres * fb->panel->mode.yres * 2;