zoukankan      html  css  js  c++  java
  • 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);

    }

  • 相关阅读:
    如何完全备份android在系统system分区和data分
    U3D游戏开发商思考
    安德鲁斯Toast它们的定义和防止重复显示器
    android反射组件 (一个)java 它们的定义annotation基础知识
    ZOJ 3794 Greedy Driver spfa
    [LeetCode OJ] Copy List with Random Pointer 扩大
    LAN公布java web项目的方法的外侧
    [RxJS] Creation operator: create()
    [RxJS] Creation operators: interval and timer
    [Unit Testing] Angular Test component with required
  • 原文地址:https://www.cnblogs.com/javawebsoa/p/3020097.html
Copyright © 2011-2022 走看看