Bus Driver probe and attach device

From: B (yuka.muromachi_at_gmail.com)
Date: 07/22/05

  • Next message: Jeremie Le Hen: "Re: IPv4 Link Local support in FreeBSD"
    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"


  • Next message: Jeremie Le Hen: "Re: IPv4 Link Local support in FreeBSD"

    Relevant Pages

    • Re: Sound Driver for 82801FB
      ... someone to test your sound driver, I would be glad to test it for you. ... controller and the audio codec. ... As one controller can control multiple ... possible to have more than one audio codec controlled at the same ...
      (freebsd-current)
    • Re: Bus Driver probe and attach device
      ... >The HDA controller is a standard controller, ... I'm planning made it be a bus driver (azalia bus). ... Because it trys to attach azbus driver itself, not try to attach its child. ...
      (freebsd-hackers)
    • RAID ate my PCIe-PCI bridges MMIO address space (?)
      ... When I boot a live CD of the same distro with the same kernel the soundcard ... Note that fglrx or no fglrx, as well as Intel HDA driver or no HDA driver, ... 0000:00:12.0: OHCI Host Controller ... cannot reserve MMIO region ...
      (Linux-Kernel)
    • Re: Intel PRO/1000CTcontroller & SuSE Pro 8.2 (MSI 875P Neo-FIS2R)
      ... SuSE 8.2 fresh does not detect the integrated controller. ... driver separately. ... number of MP IRQ sources: ... ACPI: Power Resource ...
      (alt.os.linux.suse)
    • Re: 2.6.11-rc1-mm2
      ... CPU: Trace cache: 12K uops, ... PCI: PCI BIOS revision 2.10 entry at 0xf1e50, ... PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1 ... usbcore: registered new driver usbfs ...
      (Linux-Kernel)