Date: Tue, 8 Jul 2014 15:54:36 -0700 (PDT) From: Don Lewis <truckman@FreeBSD.org> To: adrian@FreeBSD.org Cc: arch@FreeBSD.org Subject: Re: [patch] axe RF_TIMESHARE? Message-ID: <201407082254.s68MsaPS028312@gw.catspoiler.org> In-Reply-To: <CAJ-Vmong-1_k=TBugK5kvKnp-tUeJ3w5fXTzSXQsyYhD1UUf0w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6 Jul, Adrian Chadd wrote: > On 6 July 2014 17:47, Don Lewis <truckman@freebsd.org> wrote: >> On 6 Jul, Adrian Chadd wrote: >>> Hi, >>> >>> What's it supposed to be used for? >> >> My understanding it that it is supposed to be used to allow two more >> devices to claim the same resource, such as an I/O port range, but only >> one device can be active at a time. > > Interesting. I wonder what kinds of things would want to do this. Not much of anything that I can think of, which is probably why this feature was never used. The closest thing that I can think of is ISA, as Garrett mentioned. The thing that came to mind for me when I started looking at this is ISA attached COM ports. COM1 and COM3 both want to use IRQ 4, and COM2 and COM4 both want to use IRQ 3. The problem is that ISA IRQs can't be shared between slots, so it might be nice if RF_TIMESHARE could be used to share IRQ 3 between a modem card configured as COM4 and the COM2 serial port and then let the user pick the device to enable through software. Unfortunately this won't work because 16550-compatible UARTs don't have a way of disabling their IRQ pin drivers, so this has to be done with jumpers ... > There's a few interesting things like implementing the spibus using > this instead of the current way of calling a bus lock method before > doing any bus IO. The RF_TIMESHARE feature isn't a good fit for this because the resource being managed would be the address space on the SPI bus. If you had two slave devices that had the same starting SPI address, then you could use RF_TIMESHARE, but only if the address blocks occupied by both devices were also the same size (if not the resource manager considers the devices non-shareable), and there was some external way of enabling only one of the devices to listen to the SPI bus at a time.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407082254.s68MsaPS028312>