From owner-freebsd-hackers Thu May 24 4:23:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from probity.mcc.ac.uk (probity.mcc.ac.uk [130.88.200.94]) by hub.freebsd.org (Postfix) with ESMTP id 7695E37B42C for ; Thu, 24 May 2001 04:23:39 -0700 (PDT) (envelope-from jcm@freebsd-uk.eu.org) Received: from dogma.freebsd-uk.eu.org ([130.88.200.97] ident=root) by probity.mcc.ac.uk with esmtp (Exim 2.05 #4) id 152tDN-000Lz2-00; Thu, 24 May 2001 12:23:37 +0100 Received: (from jcm@localhost) by dogma.freebsd-uk.eu.org (8.11.1/8.11.1) id f4OBNad87867; Thu, 24 May 2001 12:23:36 +0100 (BST) (envelope-from jcm) Date: Thu, 24 May 2001 12:23:35 +0100 From: j mckitrick To: Alexander Langer Cc: freebsd-hackers@freebsd.org Subject: Re: softc with resource sharing Message-ID: <20010524122335.A87551@dogma.freebsd-uk.eu.org> References: <20010524033453.A57329@dogma.freebsd-uk.eu.org> <20010524113815.C981@zerogravity.kawo2.rwth-aachen.d> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20010524113815.C981@zerogravity.kawo2.rwth-aachen.d>; from alex@big.endian.de on Thu, May 24, 2001 at 11:38:15AM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, May 24, 2001 at 11:38:15AM +0200, Alexander Langer wrote: | Thus spake j mckitrick (jcm@FreeBSD-uk.eu.org): | | > Any devices using the ppbus will end up sharing the hardware port. If i want | > to access this resource info, should i store it in my local driver's softc | > structure, or extract it from the parent device (ppbus)? | | What about bus_alloc_resource()? | Or is ppbus special? (Not that I know of). Well, all of the resources have already been allocated when the ppc device has been attached. The hardware port and interrupt have already been reserved and stored in the softc data structure for ppc. All devices attached to ppc, like ppbus, are currently calling macros that call hardcoded inb/outb calls in sys/isa/ppcreg.h. I am trying to figure out if i should rewrite the macros to use the correct bus_space calls, or store the info lower down, with each device's softc where it is more accessible. At this point, all access to the parallel port IO registers is passed to the ppc device, and i am wondering if this should change and be handled be each device instead. jcm -- "I drank WHAT ?!" - Socrates To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message