Date: Sun, 23 Jan 2000 23:56:36 +0100 From: "Joachim Jäckel" <Joachim.Jaeckel@d.kamp.net> To: asmodai@wxs.nl, nox@jelal.kn-bremen.de, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: How to write a device-driver? Message-ID: <388B8724.D3B9707C@d.kamp.net>
next in thread | raw e-mail | index | archive | help
Hello again, thanks for your answers, last week, I was really busy to work, gather information for the card, inspect the existing drivers and so on... Here´s some information to the card I'd like to support: It's a Miro DC10+ Video Grabber Card for Non-Linear Video-Editing. It uses a Siemens SAA7110, a Zoran 36060+36067 and a ADV???? chip to en- and decode the video-information. I got the specifications for the chips from Siemens and Zoran's Web-Sites and a first driver-skeleton was generated through the /usr/share/examples/drivers/make_pci... script for me. Currently I get a boot-message from my kernel, that he has found the card.(I read the pci_id and send a text-message :-) Additionally I found a linux-driver for this card (an early one...) but it is not fully compatible with the documentation, I got. The chip-documentation is a little bit hard to read for someone who is used to program commercial-applications. (and another thing at the moment is to understand, what is needed in the driver to communicate with these chips...) But I'm working on it... (I think that I could get it running one day...) Currently I'm reading the sources of the bktr- and meteor-device to examine the equals etc. Maybe you would allow me one question? (To get a little faster to the information than browsing through the source.) The card uses several registers in the "front-end" chip, the zoran 36067, which are described in the documentation. I found the pci_map_mem function, where I've to pass a virtual and a base address to the function which are usually defined in the softc structure. My softc structure should therefore look something like this: typedef struct mdcten_softc { struct zoran36067_regs *base; vm_offset_t phys_base; ... and the zoran36067_regs like: struct zoran36067_regs { u_int rega; u_int regb; etc. But how get's the zoran36067_regs structure the information from the chip? If I change the content of the structure, which function would change the registers on the chip accordingly? (Or is it done through the call of pci_map_mem? And is everything I change to the structure automatically changed on the card?) It would be nice if you would answer my question, to make it a little bit easier for me. Sorry, if these questions are real dumb ones! Thanks in advance. -- Joachim.Jaeckel@d.kamp.net -- http://home.kamp.net/home/joachim.jaeckel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?388B8724.D3B9707C>