From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 8 12:09:29 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5255D37B401; Fri, 8 Aug 2003 12:09:29 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06A8443FAF; Fri, 8 Aug 2003 12:09:28 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h78J97aK037018 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 8 Aug 2003 21:09:10 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.9/8.12.9) with ESMTP id h78J94A4025995 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Aug 2003 21:09:05 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h78J94NS047828; Fri, 8 Aug 2003 21:09:04 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h78J931M047827; Fri, 8 Aug 2003 21:09:03 +0200 (CEST) Date: Fri, 8 Aug 2003 21:09:03 +0200 From: Bernd Walter To: John Baldwin Message-ID: <20030808190902.GC46866@cicely12.cicely.de> References: <6421.1060328648@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: ticso@cicely12.cicely.de cc: Poul-Henning Kamp cc: freebsd-hackers@FreeBSD.org cc: ticso@cicely.de Subject: Re: How to get a device_t X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2003 19:09:29 -0000 On Fri, Aug 08, 2003 at 02:27:30PM -0400, John Baldwin wrote: > > On 08-Aug-2003 Poul-Henning Kamp wrote: > > In message <20030808083617.E7321@freebsd1.cimlogic.com.au>, John Birrell writes > >: > > > >>I'm not convinced that any hacking is required other than passing the > >>device_t parent to nexus_pcib_is_host_bridge (in STABLE) as Bernd says. > >>I traced the boot on my system and the MMCR is initialised early (when > >>the Timecounter "ELAN" output occurs). Immediately following that > >>initialisation, 'pcib' is added as a child of 'nexus'. I don't see why > >>'mmcr' couldn't be added as a child of 'nexus' too. At this point, > >>nexus isn't walking through it's children so there shouldn't be a problem. > >>Then the ELAN specific devices (like GPIO and flash) can attach to 'mmcr'. > >> > >>This seems straight forward. Maybe I'm missing something. 8-) > > > > That's my take too. And MMCR belongs on nexus not on legacy from an > > architectural point of view. > > Well, that would be a major pain on current since nexus is already > finished attaching many of its drivers by the time it gets to here. > Also, if you use ACPI and if ACPI exists, then this function _won't_ > _ever_ _be_ _called_. If you use a hostb PCI driver, then it will > work both for ACPI and legacy. I agree with this point and if I understood correct this is what John Birrel already had done. However - I would still like to know why device_add_child(nexus, "elanbb", -1); results in an elanbb instance numer 1 connected to pci0. And why I don't get any iicbb childs. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de