i try to write a video driver for ts7200 using s1d13506. now the lcd
has start, now the problem is i can write the data to the video
memeory however when i read the data i get the wrong value, what's
wrong with my code?
the **_mmap like this
s1d13xxx_mmap(struct fb_info *info, struct file *file, struct
vm_area_struct *vma)
{
unsigned long off, start;
u32 len;
unsigned long size = vma->vm_end - vma->vm_start;
off = vma->vm_pgoff << PAGE_SHIFT;
start = S1D_PHYSICAL_VMEM_ADDR;
unsigned long page, pos;
len = PAGE_ALIGN(start & ~PAGE_MASK) + S1D_PHYSICAL_VMEM_SIZE;
/*
S1D_PHYSICAL_VMEM_ADDR=0x20000000
S1D_PHYSICAL_VMEM_SIZE=0x200000L
*/
start &= PAGE_MASK;
if ((vma->vm_end - vma->vm_start + off) > len)
return -EINVAL;
off += start;
vma->vm_pgoff = off >> PAGE_SHIFT;
vma->vm_flags |= VM_IO;
start=vma->vm_start;
size=vma->vm_end - vma->vm_start;
pos=off;//S1D_PHYSICAL_VMEM_ADDR;
while(size>0)
while(size>0)
{
if (io_remap_page_range(start,pos,PAGE_SIZE,
PAGE_SHARED))
return -EAGAIN;
start += PAGE_SIZE;
pos += PAGE_SIZE;
if (size > PAGE_SIZE)
size -= PAGE_SIZE;
else
size = 0;
}
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|