【转载】linux-2.6.38到tiny6410的移植手册(连载3)__ LCD&触摸屏
来源:互联网 发布:oracle sql删除字段 编辑:程序博客网 时间:2024/05/29 18:15
原文作者:prettybxp 原文链接:http://www.arm9home.net/read.php?tid-14261.html
linux-2.6.38到tiny6410的移植手册(连载1)__nand flash
http://www.arm9home.net/read.php?tid-14196.html
linux-2.6.38到tiny6410的移植手册(连载2)__网卡&NFS
http://www.arm9home.net/read.php?tid-14211.html
这次lcd和触摸屏智能一起移植了,至于原因明天在开一贴详细说明,http://www.arm9home.net/read.php?tid-14273.html
主要是一线触摸的原因,它劫持了lcd的背光控制,这个花了我三天时间呀才发现, 友善真是的。。。。
先弄lcd屏吧
vi arch/arm/plat-samsung/include/plat/map-base.h
第39行
增加
#define S3C_VA_LCD S3C_ADDR(0x01100000) /* LCD */
从友善的源码中将arch/arm/mach-s3c64xx/include/mach/regs-lcd.h拷贝过来
从友善的源码中将drivers/video/samsung整个文件夹拷贝过来,是不是有点拿来主义,呵呵
vi drivers/video/Kconfig
第2068行增加
source "drivers/video/samsung/Kconfig"
vi drivers/video/Makefile
120行增加
obj-$(CONFIG_FB_S3C_EXT) += samsung/
vi arch/arm/mach-s3c64xx/mach-mini6410.c
48行增加
#include <linux/delay.h>
136行mini6410_lcd_power_set函数里的内容改成
if (power) {
gpio_direction_output(S3C64XX_GPF(13), 1); //GPF13是USBpower用的,与lcd无关
gpio_direction_output(S3C64XX_GPF(15), 1); //GPF15是是真正的一线控制线连PWM1
/* fire nRESET on power up */
gpio_direction_output(S3C64XX_GPN(5), 0); //GPN5好像与lcd也无关,先copy吧
msleep(10);
gpio_direction_output(S3C64XX_GPN(5), 1);
msleep(1);
} else {
gpio_direction_output(S3C64XX_GPF(15), 0);
gpio_direction_output(S3C64XX_GPF(13), 0);
}
190行
增加
{
/* LCD support */
.virtual = (unsigned long)S3C_VA_LCD,
.pfn = __phys_to_pfn(S3C_PA_FB),
.length = SZ_16K,
.type = MT_DEVICE,
},
437行增加
gpio_request(S3C64XX_GPN(5), "LCD power");
gpio_request(S3C64XX_GPF(13), "LCD power");
去掉gpio_request(S3C64XX_GPE(0), "LCD power");
make menuconfig
Power management options --->
[ ] Power Management support 一定要去掉,不然会有
drivers/video/samsung/s3cfb_fimd4x.c:1440:2: error: implicit declaration of function 's3c6410_pm_do_save'的错误,郁闷了半天
<*> Support for frame buffer devices --->
< > Samsung S3C framebuffer support
<*> S3C Framebuffer Support (eXtended)
Select LCD Type (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 (NEW)
[*] Enable Double Buffering
[ ] Backlight & LCD device support --->
Console display driver support --->
<*> Framebuffer Console support 这个也一定要选,不然会有
drivers/built-in.o:(.data+0x174): undefined reference to `soft_cursor'的错误,其中解决这些错误花了我不少时间。
[*] Bootup logo --->
[ ] Standard black and white Linux logo
[ ] Standard 16-color Linux logo
[*] Standard 224-color Linux logo
其他的默认就行
这时lcd的驱动其实已经移植好了,引导信息也正常,如
S3C_LCD clock got enabled :: 133.000 Mhz
LCD TYPE :: N43 will be initialized
Window[0] - FB1: map_video_memory: clear ff600000:0007f800
FB1: map_video_memory: dma=5d780000 cpu=ff600000 size=0007f800
Window[0] - FB2: map_video_memory: clear ff63fc00:0003fc00
FB2: map_video_memory: dma=5d7bfc00 cpu=ff63fc00 size=0003fc00
Console: switching to colour frame buffer device 60x34
fb0: s3cfb frame buffer device
Window[1] - FB1: map_video_memory: clear ff680000:0007f800
FB1: map_video_memory: dma=5cc00000 cpu=ff680000 size=0007f800
Window[1] - FB2: map_video_memory: clear ff6bfc00:0003fc00
FB2: map_video_memory: dma=5cc3fc00 cpu=ff6bfc00 size=0003fc00
fb1: s3cfb frame buffer device
Window[2] - FB1: map_video_memory: clear ff700000:0003fc00
FB1: map_video_memory: dma=5d740000 cpu=ff700000 size=0003fc00
fb2: s3cfb frame buffer device
Window[3] - FB1: map_video_memory: clear ff740000:0003fc00
FB1: map_video_memory: dma=5cc80000 cpu=ff740000 size=0003fc00
fb3: s3cfb frame buffer device
但lcd屏却没有反应,百思不得其解。后来终于发现了,过程明天在说
先做一线触摸的驱动
拷贝
arch/arm/mach-s3c64xx/dev-ts-mini6410.c
arch/arm/mach-s3c64xx/include/mach/ts.h
arch/arm/plat-samsung/include/plat/regs-adc.h
drivers/input/touchscreen/mini6410_1wire_host.c
drivers/input/touchscreen/mini6410-ts.c
drivers/input/touchscreen/ts-if.c
到相应目录
vi arch/arm/mach-s3c64xx/Makefile
末尾增加
obj-$(CONFIG_TOUCHSCREEN_MINI6410) += dev-ts-mini6410.o
vi drivers/input/touchscreen/Makefile
末尾加入
obj-$(CONFIG_TOUCHSCREEN_MINI6410) += mini6410-ts.o
obj-$(CONFIG_TOUCHSCREEN_1WIRE) += mini6410_1wire_host.o
obj-$(CONFIG_FB_S3C_EXT_TFT800480) += ts-if.o
obj-$(CONFIG_FB_S3C_EXT_TFT480272) += ts-if.o
obj-$(CONFIG_FB_S3C_EXT_X240320) += ts-if.o
vi drivers/input/touchscreen/Kconfig
190行左右加入
config TOUCHSCREEN_MINI6410
tristate "S3C touchscreen driver for Mini6410"
depends on ARCH_S3C2410 || ARCH_S3C64XX || ARCH_S5P64XX || ARCH_S5PC1XX
default y
help
Say Y here to enable the driver for the touchscreen on the
FriendlyARM Mini6410 development board.
If unsure, say N.
To compile this driver as a module, choose M here: the
module will be called mini6410-ts.
config TOUCHSCREEN_1WIRE
tristate "Mini6410 1-Wire host and Touch Screen Driver"
depends on MACH_MINI6410
help
Say Y here to enable the 1-Wire host and Touch Screen driver for
FriendlyARM Mini6410 development board.
If unsure, say N.
To compile this driver as a module, choose M here: the
module will be called mini6410_1wire_host.
vi arch/arm/mach-s3c64xx/mach-mini6410.c
44行 将#include <plat/ts.h>
改成#include <mach/ts.h>
320行将
static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
.delay = 10000,
.presc = 49,
.oversampling_shift = 2,
};
改成
static struct s3c_ts_mach_info s3c_ts_platform __initdata = {
.delay = 0xFFFF,
.presc = 0xFF,
.oversampling_shift = 2,
.resol_bit = 12,
.s3c_adc_con = ADC_TYPE_2,
};
436行将
s3c24xx_ts_set_platdata(&s3c_ts_platform);
改成 s3c_ts_set_platdata(&s3c_ts_platform);
vi arch/arm/plat-samsung/Makefile
60行
注释掉obj-$(CONFIG_SAMSUNG_DEV_TS) += dev-ts.o
不然会有multiple definition of `s3c_device_ts'的错误很奇怪,友善的源码CONFIG_SAMSUNG_DEV_TS=n,而我的源码出来后CONFIG_SAMSUNG_DEV_TS=y,还改不掉。。
vi drivers/input/touchscreen/mini6410-ts.c
增加头文件#include<linux/sched.h> 奇怪的是友善的mini6410-ts.c
里没这个头文件也能找到需要的东西。。。
Input device support --->
[*] Touchscreens --->
<*> S3C touchscreen driver for Mini6410
<*> Mini6410 1-Wire host and Touch Screen Driver
lcd好用了,开机出现了那只小企鹅,挂NFS后触摸屏也能用了。
- 【转载】linux-2.6.38到tiny6410的移植手册(连载3)__ LCD&触摸屏
- 【转载】 linux-2.6.38到tiny6410的移植手册(连载2)__网卡&NFS
- 【转】linux-2.6.38到tiny6410的移植手册(连载1)__nand flash
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植 (转)
- Tiny6410 lcd的移植
- PART1 linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植 (转)
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植
- 移植ads7846驱动到tiny6410(tiny6410)(ads7846)(移植)(触摸屏)(抖动)
- linux内核移植到tiny6410(1)
- linux内核移植到tiny6410(2)
- Tiny6410一线触摸屏tslib的移植
- ubuntu 7.04 s3c2410 LCD触摸屏移植 linux 2.6.22.6
- 移植ads7846驱动到tiny6410(tiny6410)
- 移植ads7846驱动到tiny6410(tiny6410)
- linux系统移植到tiny6410(简易过程)
- 关于2410上LCD移植方面的几点总结(含触摸屏)——转载
- 关于2410上LCD移植方面的几点总结(含触摸屏)——转载
- 64位WIN7系统搭建Android开发环境
- 里程碑Droid/Milestone/XT702官方正式2.2ROM刷机教程及刷机失败解决方法(含2.1底包)
- Axis2配置指南(翻译)
- 启动d2010就出现displayNotification: 内存不够
- 查看系统是windows x86还是x64
- 【转载】linux-2.6.38到tiny6410的移植手册(连载3)__ LCD&触摸屏
- /etc/inittab文件详解
- www 服务配置
- 关于GDI+,随便写写
- 【转载】POJ 计算几何入门题目推荐
- 使用Java操作CSV文件 .
- BusyBox init及其inittab文件分析
- Winform程序中设置DataGridView的列标题背景色不起作用怎么办
- 在eclipse中配置MOTO真机