Turns out I didn't need half that much. But it would have been easier to enter the LCD properties in a device tree rather than editing the driver. The following is what I did for a Hantronic HDA350-2S LCD panel,
Device Tree:
mxcfb2: fb@1 {
compatible = "fsl,mxc_sdc_fb";
disp_dev = "lcd";
interface_pix_fmt = "RGB24";
mode_str ="CLAA-QVGA";
default_bpp = <24>;
int_clk = <0>;
late_init = <0>;
status = "okay";
};
lcd@0 {
compatible = "fsl,lcd";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ipu1_1>;
ipu_id = <0>;
disp_id = <0>;
default_ifmt = "BGR24";
status = "okay";
};
And I modified the Kernel driver (from ArchARM sources):
static struct fb_videomode lcdif_modedb[] = {
{
/* 320x240 @ 56 Hz , pixel clk @ 6.5MHz */
"CLAA-QVGA", 60, 320, 240, 153846, 68, 20, 18, 4, 1, 1,
0,
FB_VMODE_NONINTERLACED,
0
},} }