阅读 66

pxa270(Xscale核)的LCD移植

一,配置内核

              Graphics support  ---> 

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

                            <M>   PXA LCD framebuffer support 

                     Consoledisplay driver support  --->

                            <*>Framebuffer Console support

 

二,配置资源

(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= 0xffffffff,

       },

       .num_resources      = ARRAY_SIZE(pxafb_resources),

       .resource = pxafb_resources,

};

调用set_pxa_fb_info(&hepxa270_pxafb_info);注册平台设备和资源

set_pxa_fb_info源码如下,set_pxa_fb_info中调用pxa_register_device注册平台设备

void __init set_pxa_fb_info(structpxafb_mach_info *info)

{

       pxa_register_device(&pxa_device_fb,info);

}


文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐