Step 1: Configure Kernel Parameters
Graphicssupport --->
<*> Support for frame buffer devices --->
<*> Samsung s3c framebuffer support
[*] Backlight & LCD device support --->
<*> Lowlevel LCD controls
<*> Samsung ltv350qv LCD Panel
<*> Platform LCD controls
<*> Lowlevel backlight controls
<*> Generic (aka sharp corgi) backlight driver
<*> Generic PWM Based backlight driver
Consoledisplay driver support --->
<*> Framebuffer console support
Step 2: Configure Resources
1. add the following code to the board-level configuration file. If you want to add the code, the answer is actually very simple. Look at the driver, when you look at the driver, you will find that the following parameters need to be set in the board-level configuration file according to the specific circuit. // The most important part to be modified during LCD transplantation is mainly in the following structure, static struct initi_fb_pd_win smdk6410_fb_win0 ={/ * this is to ensure we use win0 */. win_mode = {. left_margin = 0x03, // The number of real pixel clocks from the sync signal to the display. right_margin = 0x02, // Number of clocks from the real display pixel to the sync signal. upper_margin = 0x01 ,. lower_margin = 0x01 ,. hsync_len = 0x28, // The length of the horizontal sync signal. vsync_len = 0x01, // The length of the vertical sync signal. xres = 480, // xres, yres determines the screen visible resolution. yres = 272 ,},. max_bpp = 32, // maximum BPP. BPP is bits per pixel, which is The bit number of a pixel. The color that one pixel can express depends on BPP. In other words, the larger the bpp, the better the color. default_bpp = 16, // default BPP. virtual_y = 480*2, // virtual screen resolution. virtual_x = 272,}; static struct initi_fb_platdata smdk6410_ LCD _pdata _ initdata = {. setup_gpio = 89c64xx_fb_gpio_setup_24bpp ,. win [0] = & smdk6410_fb_win0, // these two values will be used in the driver to configure the registers vidcon0 and vidcon1, which are configured as the RGB output mode, configure the horizontal sync pulse and vertical sync pulse polarity to reverse. vidcon0 = vidcon0_vidout_rgb | vidcon0_pnrmode_rgb ,. vidcon1 = vidcon1_inv_hsync | Vidcon1_inv_vsync,}; 2. add the platform device static struct platform_device * smdk6410_devices [] _ initdata ={& initi_device_fb,} 3. add the following code to the map_io function to initialize the LCD/* set the LCD type */tmp = _ raw_readl (89c64xx_spcon); TMP & = ~ Bytes; TMP | = maid (TMP, 89c64xx_spxx_sel_rgb);/* remove the LCD bypass */tmp = _ raw_readl (s364xx_modem_mifpcon); TMP & = ~ Mifpcon_ LCD _bypass; __raw_writel (TMP, 89c64xx_modem_mifpcon );
Step 3: register the device
Call initi_fb_set_platdata (& smdk6410_ LCD _pdata) to add private LCD data.
Call platform_add_devices (smdk6410_devices, array_size (smdk6410_devices); register the platform device
Step 4: Test
Compile, download, and restart. You can see the LCD device FB in the/dev directory, indicating that the device is started normally. At this time, the screen may be a screen. How can we see the effect,
(1) execute the following command to clear the screen
Dd If =/dev/Zero of =/dev/fb0 BS = 240 COUNT = 320
(2)show an image (xxee.bmp is the image name)
Cat xxee.bmp>/dev/fb0
Migration error set:
The following error occurs during compilation:
Drivers/built-in.o :(. Data + 0x450): undefinedreference to 'soft _ cursor'
Cause of error: The following option is not added during Kernel configuration
<*> Framebuffer console support