阅读:1273回复:2
tvia 显卡驱动问题求助
本人开发tvia5000显卡驱动,却不能初始化,请高手帮忙!
tvia显卡将pci映射mem进行ioremap后,首地质+0x800000为i/o偏移(map_region->regs)。如果在0x102中写入0x01并read back为0x01,则enable vga ok!我未成功! 以下是我就tiva driver的调试过程: 1)driver code : cyber2000 2)测试方式:将driver 编译为 module 及 编译进内核 3)测试方法: a.setup vga : IOW map_region->regs(800000/8b0000)+0x46e8 = 0x18; b.enable vga: IOW map_region->regs(800000/8b0000)+0x102 = 0x01; c.read back : IOR map_region->regs(800000/8b0000)+0x102 = 0xff(shoule be 0x01); 以上可见,vga 初始化不对。 4)原因分析: a. 偏移不对: 我对b9000000至b9ffffff区间整个循环赋值(上述方式),read back 均为 0xff.所以排除这种可能。 b. 引角接触不良: 在driver中我可以调用pci_read_config_word()对配置寄存器进行读写,所以排除这种可能。 c. 地址不可用: 是否映射过程存在问题? 5)初始化后的tvia config register: 000000 ea 10 00 50 07 00 00 02 03 00 00 03 00 80 80 00 000010 00 00 00 19 00 00 00 00 00 00 00 00 00 00 00 00 000020 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 000030 00 00 00 00 00 00 00 00 00 00 00 00 04 01 00 00 000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 000100 6)more /proc/pci PCI devices found: Bus 0, device 16, function 0: Class 0200: PCI device 1282:9102 (rev 64). IRQ 4. Master Capable. Latency=128. Min Gnt=20.Max Lat=40. I/O at 0xbc000000 [0xbc0000ff]. Non-prefetchable 32 bit memory at 0xb8000000 [0xb80000ff]. Bus 0, device 17, function 0: Class 0300: PCI device 10ea:5000 (rev 3). IRQ 5. Master Capable. Latency=128. Non-prefetchable 32 bit memory at 0xb9000000 [0xb9ffffff]. Bus 0, device 17, function 1: Class 0401: PCI device 10ea:5050 (rev 3). IRQ 4. Master Capable. Latency=128. Non-prefetchable 32 bit memory at 0xba000000 [0xba000fff]. I/O at 0xbc000100 [0xbc0001ff]. Bus 0, device 18, function 0: Class 0c03: PCI device 104e:8888 (rev 0). IRQ 7. Non-prefetchable 32 bit memory at 0xbc020000 [0xbc02ffff]. 清高手指点 |
|
沙发#
发布于:2004-07-01 15:21
运行环境: linux
mips r3000 pci 33MHZ |
|
板凳#
发布于:2004-07-02 09:45
很想帮你,但linux我没有完过,一直跟着MS走了n多年,也许哪天MS跨了,也会去看看linux,哈哈要是那样我可惨了。
|
|
|