📄 2_6内核lcd驱动移植 - 我的文章 - we need more tips.htm
字号:
<asm/arch/fb.h><BR>否则会出现variable has
initializer but incomplete
type之类的错误。<BR>我现在记不太清楚到底该加哪些头文件了,我把我的头文件贴出来,大家差什么就自己加上去<BR>#include
<linux/kernel.h><BR>#include
<linux/types.h><BR>#include
<linux/interrupt.h><BR>#include
<linux/list.h><BR>#include
<linux/timer.h><BR>#include
<linux/init.h><BR>/*add by
tiplinky*/<BR>#include
<linux/device.h><BR>/*****************/<BR>#include
<asm/arch/s3c2410_ts.h><BR>#include
<asm/mach/arch.h><BR>#include
<asm/mach/map.h><BR>#include
<asm/mach/irq.h><BR>/*#include
<asm/arch/s3c2410_ts.h>*/<BR>#include
<asm/hardware.h><BR>#include
<asm/io.h><BR>#include
<asm/irq.h><BR>#include
<asm/mach-types.h></DIV>
<DIV>#include
<asm/arch/regs-serial.h><BR>#include
<asm/arch/regs-gpio.h><BR>#include
<asm/arch/regs-lcd.h><BR>#include
<asm/arch/regs-timer.h><BR>#include
<asm/arch/fb.h><BR>//#include
<asm/arch/udc.h><BR>//#include
<asm/arch/ts.h><BR>//#include
<asm/arch/lcd.h><BR>/*add by
tiplinky*/<BR>#include
<asm/arch/smdk2410.h><BR>#include
<asm/arch/regs-mem.h><BR>#include
<asm/arch/nand.h><BR>#include
<asm/arch/s3c2410_ts.h></DIV>
<DIV>#include <linux/mtd/mtd.h><BR>#include
<linux/mtd/nand.h><BR>#include
<linux/mtd/nand_ecc.h><BR>#include
<linux/mtd/partitions.h><BR>/*****************/<BR>#include
"devs.h"<BR>#include "cpu.h"<BR>/*add by
tiplinky*/<BR>#include
<asm/arch/usb-control.h><BR>#include
<asm/arch/regs-clock.h><BR>#include
<linux/device.h><BR>#include
<linux/delay.h></DIV>
<DIV>把s3c2410fb.c和s3c2410fb.h两个文件都放在/linux/driver/video目录下面。按hhcn论坛里seigpao大侠的做法,注释掉drivers\char\vt.c的blank_screen_t(unsigned
long dummy)的函数内容,否则,lcd会在10分钟左右关掉显示. </DIV>
<DIV> </DIV>
<DIV>在编译内核的时候选择224 color,在graphics
support中我把所有的选项都选了,除了vga
console,选了以后老编译不过去也不知道有什么用。然后从新启动系统就可以看到企鹅tux了。</DIV>
<DIV> </DIV>
<DIV>另外<FONT
color=#000066>seasea提到在启动参数里若增加console=tty0,结果串口显示到
freeing init
memory就没了.<BR>而lcd上可以显示信息,但是不能滚屏,信息会覆盖,而且不能自动换行,某些行显示到屏幕右端就没了,有时间可以试试。</FONT></DIV>
<DIV><BR> </DIV>
<DIV></DIV></DIV></TD></TR></TBODY></TABLE>
<P style="MARGIN: 5px; LINE-HEIGHT: 150%"></P></TD></TR>
<TR>
<TD align=middle height=25><FONT color=#295200>发表于:
2007-08-15,修改于: 2007-08-16 11:58,已浏览165次,有评论1条</FONT> <A
id=star title=推荐这篇文章
onclick="NewWindows(this.href);return false;"
href="http://blog.chinaunix.net/u2/star.php?blogid=30949&artid=360200">推荐</A>
<A id=complaint title=投诉这篇文章
onclick="NewWindows(this.href);return false;"
href="http://blog.chinaunix.net/u2/complaint.php?blogid=30949&artid=360200">投诉</A>
</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_left_buttom.gif"
border=0></TD>
<TD bgColor=#f3f3f3></TD>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_right_buttom.gif"
border=0></TD></TR></TBODY></TABLE>
<TR>
<TD width=11 height=11><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/g_left_bottom.gif"
border=0></TD>
<TD bgColor=#dddddd></TD>
<TD width=11 height=11><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/g_right_bottom.gif"
border=0></TD></TR></TBODY></TABLE><BR><BR>
<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0
width="100%" border=0>
<TBODY>
<TR>
<TD width=11 height=11><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/g_left_top.gif"
border=0></TD>
<TD width="99%" bgColor=#dddddd height=11></TD>
<TD width=11 height=11><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/g_right_top.gif"
border=0></TD></TR>
<TR>
<TD vAlign=top align=middle width="100%" bgColor=#dddddd
colSpan=3><B>网友评论</B> <BR>
<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0
width="96%" border=0>
<TBODY>
<TR>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_left_top.gif"
border=0></TD>
<TD width="100%" bgColor=#f3f3f3></TD>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_right_top.gif"
border=0></TD></TR>
<TR>
<TD align=middle bgColor=#f3f3f3 colSpan=3>
<TABLE style="COLOR: #02368d; BORDER-COLLAPSE: collapse"
cellSpacing=0 cellPadding=0 width=700 align=center border=0>
<TBODY>
<TR height=25>
<TD width=25><IMG height=8 alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/dot.gif"
width=8 border=0></TD>
<TD width=120>网友:<B> <A title=查看bairg521的BLOG
href="http://blog.chinaunix.net/jump/byuser.php?username=bairg521"
target=_blank>bairg521</A> </B></TD>
<TD style="COLOR: #aaaaaa" align=right
width=555>时间:2007-08-29 16:44:35 IP地址:60.12.143.★</TD></TR>
<TR>
<TD bgColor=#d2dee2 colSpan=3 height=1></TD></TR>
<TR>
<TD bgColor=#ffffff colSpan=3 height=1></TD></TR>
<TR>
<TD colSpan=3>
<TABLE
style="BORDER-COLLAPSE: collapse; WORD-WRAP: break-word"
borderColor=#111111 cellSpacing=0 cellPadding=0
width=700 border=0>
<TBODY>
<TR>
<TD vAlign=top width=20></TD>
<TD width=580><PRE style="MARGIN: 0px; LINE-HEIGHT: 150%" wrap="break-word"> 你好,不知道你有没有时间。我最近也在2410上移植2.6的lcd驱动,一个多星期了,可显示的总是彩色条纹,看了很多资料和贴子,源程序(2.4)也打印出来研究了一下,可是还是有些地方不明白:<BR>
1.下面这些寄存器的值究竟是根据什么确定的呢?和硬件的连接有关吗?<BR>
.lpcsel = 0xf82,<BR>
.gpccon = 0xaa955699,<BR>
.gpccon_mask = 0xffc003cc,<BR>
.gpcup = 0x0000ffff,<BR>
.gpcup_mask = 0xffffffff,<BR>
.gpdcon = 0xaa95aaa1,<BR>
.gpdcon_mask = 0xffc0fff0,<BR>
.gpdup = 0x0000faff,<BR>
.gpdup_mask = 0xffffffff,<BR>
.fixed_syncs = 1,<BR>
2.spi口的问题,在网上看到有些前辈在移植时,自己加入了模拟spi接口的程序,而有的前辈在移植时就没有这个过程,这是为什么呢?(lpc3600现在都不用了吧)<BR>
3.寄存器.lcdcon5的设置,是根据lcd数据手册的时序图中得出的吗,是不是跟硬件电路也有关系?我发现同一块屏不同的人设置的也不同,能否介绍一下你是如何做的?<BR>
我的屏是台湾WANXIN的3.5' TFT-LCD,买来后发现网上很少有人用这种屏,据说是三星屏的兼容产品<BR>
我是个学生,身边没人请教,看了你的文章有点启发,所以向你请教,希望没有打扰你,谢谢了!</PRE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD colSpan=3 height=15></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_left_buttom.gif"
border=0></TD>
<TD bgColor=#f3f3f3></TD>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_right_buttom.gif"
border=0></TD></TR></TBODY></TABLE><BR>
<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0
width="96%" border=0>
<TBODY>
<TR>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_left_top.gif"
border=0></TD>
<TD width="100%" bgColor=#f3f3f3></TD>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_right_top.gif"
border=0></TD></TR>
<TR>
<TD align=middle bgColor=#f3f3f3 colSpan=3>
<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0
cellPadding=0 width=700 align=center border=0>
<TBODY>
<TR>
<TD style="COLOR: #0000cc" height=25> 发表评论 </TD></TR>
<TR>
<TD height=25><IFRAME name=comment
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/comment.htm"
frameBorder=0 width=640
height=160></IFRAME></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_left_buttom.gif"
border=0></TD>
<TD bgColor=#f3f3f3></TD>
<TD width=7 height=7><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/w_right_buttom.gif"
border=0></TD></TR></TBODY></TABLE>
<TR>
<TD width=11 height=11><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/g_left_bottom.gif"
border=0></TD>
<TD bgColor=#dddddd></TD>
<TD width=11 height=11><IMG alt=""
src="2_6内核LCD驱动移植 - 我的文章 - we need more tips.files/g_right_bottom.gif"
border=0></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<CENTER></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -