Re: Writing a driver for a card reader controller - how?

From: M. Warner Losh (imp_at_bsdimp.com)
Date: 11/28/05

  • Next message: Ruslan Ermilov: "Re: Loading gzipped mfsroot"
    Date: Mon, 28 Nov 2005 10:11:19 -0700 (MST)
    To: jhb@freebsd.org
    
    

    In message: <200511281115.28735.jhb@freebsd.org>
                John Baldwin <jhb@freebsd.org> writes:
    : On Thursday 24 November 2005 01:26 pm, M. Warner Losh wrote:
    : > In message: <20051124111241.GB75190@mygiea.ham01.thiemo.net>
    : >
    : > Thiemo Nordenholz <listmember@thiemo.net> writes:
    : > : Hi Warner,
    : > :
    : > : > to be set. Can you send me a pointer to the winbond data*** you are
    : > : > using? IIRC, this chip has an odd API since it appears to be derived
    : > :
    : > : As I have to wait for some spare time before trying to use the hints I
    : > : have received here, for now I can only answer that question - I found a
    : > : data*** at
    : > : http://www.winbond.com/e-winbondhtm/partner/PDFresult.asp?Pname=863 which
    : > : is what I try to work with. (That page sends a file "PDFresult.asp",
    : > : which is actually a PDF.)
    : >
    : > I've read through this pdf. As far as I can find, it just talks about
    : > how to setup the base address for each of the sets of registers
    : > without actually talking about the sets of registers themselves. Nor
    : > can I find in the document a pointer to the different register sets.
    : > Do you have one of those as well? It looks fairly easy to program
    : > this device's base addresses or inquire what they are. It is done in
    : > much the same way that super I/O chips are programmed.
    :
    : For an ACPI device you want to use _PRS and _SRS. _PRS will give you a list
    : of candidate resource sets, possibly in groups via DPF tags. You then build
    : a resource and do an _SRS to set it. The problem is that our ACPI bus isn't
    : smart enough to allocate resources for a device when bus_alloc_resource() is
    : called to choose available resources when a device is not configured. This
    : is similar to how you fixed the PCI bus recently to allocate resources for
    : BARs that weren't already allocated by the BIOS.

    Ah, I see. Sounds like time to jump into the ACPI code and do
    someting similar...

    Warner
    _______________________________________________
    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: Ruslan Ermilov: "Re: Loading gzipped mfsroot"