先看一下东华的4.3屏驱动程序:
/*
* drivers/video/s3c/s3cfb_lte480wv.c
*
* $Id: s3cfb_lte480wv.c,v 1.12 2008/06/05 02:13:24 jsgood Exp $
*
* Copyright (C) 2008 Jinsung Yang <jsgood.yang@samsung.com>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive for
* more details.
*
* S3C Frame Buffer Driver
* based on skeletonfb.c, sa1100fb.h, s3c2410fb.c
*/
#include <linux/wait.h>
#include <linux/fb.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include "s3cfb.h"
#define S3CFB_HFP 2 /* front porch */
#define S3CFB_HSW 41 /* hsync width */
#define S3CFB_HBP 2 /* back porch */
#define S3CFB_VFP 2 /* front porch */
#define S3CFB_VSW 10 /* vsync width */
#define S3CFB_VBP 2 /* back porch */
#define S3CFB_HRES 480 /* horizon pixel x resolition */
#define S3CFB_VRES 272 /* line cnt y resolution */
#define S3CFB_HRES_VIRTUAL 480 /* horizon pixel x resolition */
#define S3CFB_VRES_VIRTUAL 544 /* line cnt y resolution */
#define S3CFB_HRES_OSD 480 /* horizon pixel x resolition */
#define S3CFB_VRES_OSD 272 /* line cnt y resolution */
#define S3CFB_VFRAME_FREQ 60 /* frame rate freq */
#define S3CFB_PIXEL_CLOCK (S3CFB_VFRAME_FREQ * (S3CFB_HFP + S3CFB_HSW + S3CFB_HBP + S3CFB_HRES) * (S3CFB_VFP + S3CFB_VSW + S3CFB_VBP + S3CFB_VRES))
static void s3cfb_set_fimd_info(void)
{
s3cfb_fimd.vidcon1 = S3C_VIDCON1_IHSYNC_INVERT | S3C_VIDCON1_IVSYNC_INVERT | S3C_VIDCON1_IVDEN_NORMAL;
s3cfb_fimd.vidtcon0 = S3C_VIDTCON0_VBPD(S3CFB_VBP - 1) | S3C_VIDTCON0_VFPD(S3CFB_VFP - 1) | S3C_VIDTCON0_VSPW(S3CFB_VSW - 1);
s3cfb_fimd.vidtcon1 = S3C_VIDTCON1_HBPD(S3CFB_HBP - 1) | S3C_VIDTCON1_HFPD(S3CFB_HFP - 1) | S3C_VIDTCON1_HSPW(S3CFB_HSW - 1);
s3cfb_fimd.vidtcon2 = S3C_VIDTCON2_LINEVAL(S3CFB_VRES - 1) | S3C_VIDTCON2_HOZVAL(S3CFB_HRES - 1);
s3cfb_fimd.vidosd0a = S3C_VIDOSDxA_OSD_LTX_F(0) | S3C_VIDOSDxA_OSD_LTY_F(0);
s3cfb_fimd.vidosd0b = S3C_VIDOSDxB_OSD_RBX_F(S3CFB_HRES - 1) | S3C_VIDOSDxB_OSD_RBY_F(S3CFB_VRES - 1);
s3cfb_fimd.vidosd1a = S3C_VIDOSDxA_OSD_LTX_F(0) | S3C_VIDOSDxA_OSD_LTY_F(0);
s3cfb_fimd.vidosd1b = S3C_VIDOSDxB_OSD_RBX_F(S3CFB_HRES_OSD - 1) | S3C_VIDOSDxB_OSD_RBY_F(S3CFB_VRES_OSD - 1);
s3cfb_fimd.width = S3CFB_HRES;
s3cfb_fimd.height = S3CFB_VRES;
s3cfb_fimd.xres = S3CFB_HRES;
s3cfb_fimd.yres = S3CFB_VRES;
#if defined(CONFIG_FB_S3C_EXT_VIRTUAL_SCREEN)
s3cfb_fimd.xres_virtual = S3CFB_HRES_VIRTUAL;
s3cfb_fimd.yres_virtual = S3CFB_VRES_VIRTUAL;
#else
s3cfb_fimd.xres_virtual = S3CFB_HRES;
s3cfb_fimd.yres_virtual = S3CFB_VRES;
#endif
s3cfb_fimd.osd_width = S3CFB_HRES_OSD;
s3cfb_fimd.osd_height = S3CFB_VRES_OSD;
s3cfb_fimd.osd_xres = S3CFB_HRES_OSD;
s3cfb_fimd.osd_yres = S3CFB_VRES_OSD;
s3cfb_fimd.osd_xres_virtual = S3CFB_HRES_OSD;
s3cfb_fimd.osd_yres_virtual = S3CFB_VRES_OSD;
s3cfb_fimd.pixclock = S3CFB_PIXEL_CLOCK;
s3cfb_fimd.hsync_len = S3CFB_HSW;
s3cfb_fimd.vsync_len = S3CFB_VSW;
s3cfb_fimd.left_margin = S3CFB_HFP;
s3cfb_fimd.upper_margin = S3CFB_VFP;
s3cfb_fimd.right_margin = S3CFB_HBP;
s3cfb_fimd.lower_margin = S3CFB_VBP;
}
void s3cfb_init_hw_43(void)
{
printk(KERN_INFO "LCD TYPE :: LTE480WV will be initialized\n");
s3cfb_set_fimd_info();
s3cfb_set_gpio();
}
看头文件:
#include <linux/wait.h>
#include <linux/fb.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <mach/regs-gpio.h>
#include <mach/regs-lcd.h>
#include "s3cfb.h"
其中除了s3cfb.h其它都是原生态的……就好好研究一下它的来源!mini6410与samsung对比:
mini6410与samsung对比:
由上图可以看出:s3cfb.h各家都做了很大的改动,因此在LCD移植过程中,s3cfb.h也将是重点移植对象!!
而原生态内核中根本就没有这一头文件: