Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2003 11:30:11 +1000
From:      John Birrell <jb@cimlogic.com.au>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        ticso@cicely.de
Subject:   Re: How to get a device_t
Message-ID:  <20030807113011.B7321@freebsd1.cimlogic.com.au>
In-Reply-To: <20030806.175045.73337045.imp@bsdimp.com>; from imp@bsdimp.com on Wed, Aug 06, 2003 at 05:50:45PM -0600
References:  <20030806101148.GC32228@cicely12.cicely.de> <40313.1060165108@critter.freebsd.dk> <20030806.175045.73337045.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 06, 2003 at 05:50:45PM -0600, M. Warner Losh wrote:
> In message: <40313.1060165108@critter.freebsd.dk>
>             "Poul-Henning Kamp" <phk@phk.freebsd.dk> writes:
> : In fact what you may want to do is hang the entire MMCR off the nexus
> : as a bus, and hang the various drivers off that bus.

I have a card based on the SC520 too. (Note to Warner: this is the card I
needed the higher port numbers for)

I need to access the GPIO pins too. But before that, I need to get flash
drivers working. Access to the flash chips also requires the MMCR. Does
it really make sense to hang the flash devices off the MMCR "bus" when they
are mapped into ISA bus space?

> That certainly makes sense.  nexus is for things that hang off of the
> CPU or things directly connected to the cpu...

>From my reading of the AMD docs, only the CPU core is identifiable via the CPUID
instruction. The docs say that the first two bytes of the MMCR are the
REVID and those can be used to "identify the device itself". The second
byte is set to zero to "identify the product as the ElanSC520 microcontroller".
So if you know the MMCR is there, you can go to that byte and get confirmation!
Thanks AMD. It seems that the discovery via the host to PCI bridge is the only
reliable way to go.

My local hack is to make my flash drivers require the elan_mmcr option and then
they can just go use the elan_mmcr global variable. I just need the elan device
to be initialised earlier.

-- 
John Birrell



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030807113011.B7321>