linux 3.6.移植教程,linux-3.6.6重新移植LCD及触摸屏驱动

1、模仿友坚恒天的6410 Android2.3的内核2.6.36来移植!

2、对比mach-smdk6410.c

static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,

unsigned int power)

{

if (power) {

gpio_direction_output(S3C64XX_GPF(13), 1);

//add by hcm

gpio_direction_output(S3C64XX_GPF(15), 1);  //pwm isn`t gpf14?

/* fire nRESET on power up */

gpio_direction_output(S3C64XX_GPN(5), 0);

msleep(10);

gpio_direction_output(S3C64XX_GPN(5), 1);

msleep(1);

} else {

gpio_direction_output(S3C64XX_GPF(13), 0);

//add by hcm

gpio_direction_output(S3C64XX_GPF(15), 0);

}

}

static struct map_desc smdk6410_iodesc[] =

{

{

/* LCD support */

.virtual    = (unsigned long)S3C_VA_LCD,

.pfn        = __phys_to_pfn(S3C_PA_FB),

.length    = SZ_16K,

.type      = MT_DEVICE,

},

};

在map-base.h中添加

#define S3C_VA_UART S3C_ADDR(0x01000000)/* UART */

//add by hcm

#define S3C_VA_LCD S3C_ADDR(0x01100000)

从友坚2.6.36中将drivers/video/samsung整个文件夹拷贝过来

vi drivers/video/Kconfig

第2068行增加

source "drivers/video/samsung/Kconfig"

vi drivers/video/Makefile

120行增加

obj-$(CONFIG_FB_S3C_EXT)      += samsung/

将Y:\ut6410_kernel_2.6.36\arch\arm\mach-s3c64xx\include\mach下的regs-lcd.h和regs-fb.h拷贝到Y:\linux-3.6.6\arch\arm\mach-s3c64xx\include\mach

Device Drivers --->

Graphics support --->

Support for frame buffer devices ---> (里面的都空选)一定的将< >  Samsung S3C framebuffer support空选(如果你默认的话后,后面添加的lcd驱动将无效)

Support for frame buffer devices --->

[ ] Backlight & LCD device support --->

S3C Framebuffer Support (eXtended)(修改Kconfig之后才有这个选)

Select LCD Type (4.3 inch 480x272 TFT LCD) --->

(X) 4.3 inch 480x272 TFT LCD

Advanced options for S3C Framebuffer

Select BPP(Bits Per Pixel) (16 BPP) --->

(4) Number of Framebuffers

[ ] Enable Virtual Screen

[*] Enable Double Buffering

Console display driver support --->

Framebuffer Console support

[*] Bootup logo --->(显示小企鹅)

[*] Standard 224-color Linux logo

最后烧写显示:

S3C_LCD clock got enabled :: 133.000 Mhz

LCD TYPE :: UT_LCD7inch will be initialized

Window[0] - FB1: map_video_memory: clear c885a000:00177000

Window[0] - FB2: map_video_memory: clear c8915800:000bb800

Console: switching to colour frame buffer device 100x30

fb0: s3cfb frame buffer device

Window[1] - FB1: map_video_memory: clear c89d2000:00177000

Window[1] - FB2: map_video_memory: clear c8a8d800:000bb800

fb1: s3cfb frame buffer device

Window[2] - FB1: map_video_memory: clear c8b4a000:000bb800

fb2: s3cfb frame buffer device

Window[3] - FB1: map_video_memory: clear c8c07000:000bb800

fb3: s3cfb frame buffer device

这就说明你的lcd成功了!

触摸屏调试0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值