LCD transplantation of PXA270 (XScale core)

Source: Internet
Author: User

1. Configure the kernel

Graphics support --->

<*> Support for frame buffer devices --->

<M> pxa LCD framebuffer support

Consoledisplay driver support --->

<*> Framebuffer console support

 

2. Configure Resources

(1)

Static struct pxafb_mode_infonec_nl6448bc26_09c_mode = {

. Pixclock = 39722,

. Xres = 640,

. Yres = 480,

. Bpp = 16,

. Hsync_len = 56,

. Left_margin = 16,

. Right_margin = 88,

. Vsync_len = 2,

. Upper_margin = 12,

. Lower_margin = 31,

. Sync = 0,

};

 

Static struct pxafb_mode_infosharp_lq080v3dg01_mode = {

. Pixclock = 25000,

. Xres = 640,

. Yres = 480,

. Bpp = 16,

. Hsync_len = 64,

. Left_margin = 48,

. Right_margin = 16,

. Vsync_len = 1,

. Upper_margin = 34,

. Lower_margin = 7,

. Sync = 0,

};

 

Static struct pxafb_mach_infohepxa270_pxafb_info = {

. Modes = & nec_nl6448bc26_09c_mode,

. Num_modes = 1,

. LCD _conn = LCD _color_tft_16bpp | LCD _pclk_edge_fall,

};

 

(2)

Static struct resource pxafb_resources [] = {

[0] = {

. Start = 0x44000000,

. End = 0x4400ffff,

. Flags = ioresource_mem,

},

[1] = {

. Start = irq_ LCD,

. End = irq_ LCD,

. Flags = ioresource_irq,

},

};

 

Static u64 fb_dma_mask = ~ (U64) 0;

 

Struct platform_device pxa_device_fb = {

. Name = "pxa2xx-fb ",

. ID =-1,

. Dev = {

. Dma_mask = & fb_dma_mask,

. Coherent_dma_mask = 0 xffffffff,

},

. Num_resources = array_size (pxafb_resources ),

. Resource = pxafb_resources,

};

 

 

Call set_pxa_fb_info (& hepxa270_pxafb_info) to register platform devices and resources.

 

The source code of set_pxa_fb_info is as follows. In set_pxa_fb_info, pxa_register_device is called to register the platform device.

Void _ init set_pxa_fb_info (structpxafb_mach_info * info)

{

Pxa_register_device (& pxa_device_fb, Info );

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.