Bus Driver probe and attach device
From: B (yuka.muromachi_at_gmail.com)
Date: 07/22/05
- Previous message: Sam Leffler: "Re: Atheros, hardware access layer, collisions"
- Next in thread: takawata_at_jp.freebsd.org: "Re: Bus Driver probe and attach device"
- Reply: takawata_at_jp.freebsd.org: "Re: Bus Driver probe and attach device"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 22 Jul 2005 14:38:32 +0800 To: freebsd-hackers@freebsd.org
Hi:
I'm trying to written Azalia (HD Audio) driver for freebsd now.
The HDA controller is a standard controller, which can take max
15 codecs. I'm planning made it be a bus driver (azalia bus).
I tried to read the PCI, USB and Firewire driver code be sample.
It looks:
1. Detect codec which already connected to azalia controller.
2. call device_add_child(azbus_dev, NULL, -1); to create a child
device, which attach to azalia bus driver.
3. allocate memory to put codec info (e.g. device id, vendor id,
revision..etc), and call device_set_ivars(codec_dev, codec_info);
save the codec_info ptr into device's ivars.
4. Continue 1 ~ 3, untin all available codecs be added.
After all codecs be added, I call the device_probe_and_attach(azbus_dev);,
but there is no thing happend.
Then I try to call bus_generic_attach(azbus_dev);, the codecs driver probe
function be called.
Is this correct (use bus_generic_attach()), and I'm interested the detail.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Sam Leffler: "Re: Atheros, hardware access layer, collisions"
- Next in thread: takawata_at_jp.freebsd.org: "Re: Bus Driver probe and attach device"
- Reply: takawata_at_jp.freebsd.org: "Re: Bus Driver probe and attach device"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|