User`s guide
Supporting the i.MX53 Reference Board DISP0 LCD
i.MX53 System Development User’s Guide, Rev. 1
18-14 Freescale Semiconductor
};
Use this new mxc_fb_platform_data struct to register DISP0 in the mxc_init_fb() function, as follows.
static int __init mxc_init_fb(void)
{
...
memcpy(&fb_data[0], &CLAA057VA01CT_fb_data, sizeof(struct mxc_fb_platform_data));
mxc_register_device(&mxc_disp_devices[0], NULL);
...
return 0;
}
This code replaces the default WVGA panel settings with the new LCD entry.
18.4.5 Adding BSP Support for a New Boot Command to Select
CLAA057VA01CT LCD
To take advantage of the kernel boot process, use the kernel boot arguments to select the new LCD. Do
this by using the following steps to add extra code to the mxc53_<board name>.c file located at
<ltib dir>//rpm/BUILD/linux/arch/arm/mach-mx5/mxc53_<board name>.c
1. Select a new flag; this example code uses CLAA057VA01CT.
2. Create a variable to save if the CLAA057VA01CT flag has been included in the command line. In
this case 0 is the initial value and it means that flag is not present.
static int __initdata enable_CLAA057VA01CT = { 0 };
3. Use the following code to set the enable_CLAA057VA01CT variable if “CLAA057VA01CT” is
included on the command line.
static int __init CLAA057VA01CT_setup(char *__unused)
{
printk(KERN_INFO "CLAA057VA01CT flag\r\n");
enable_CLAA057VA01CT = 1;
return 1;
}
__setup("CLAA057VA01CT", CLAA057VA01CT_setup);
Once the enable_CLAA057VA01CT variable is set, it is easy to distinguish which LCD should be
used on DISP0 interface. The code looks like the following:
static int __init mxc_init_fb(void)
{
...
if(enable_CLAA057VA01CT)
{
memcpy(&fb_data[0], &CLAA057VA01CT_fb_data, sizeof(struct mxc_fb_platform_data));
mxc_register_device(&mxc_disp_devices[0], NULL);
printk(KERN_INFO "DI0 driving CLAA057VA01CT\n");
}
else
{
printk(KERN_INFO "DI0 driving CLAA-WVGA\n");
}
...