From owner-freebsd-mips@FreeBSD.ORG Wed May 9 16:32:26 2007 Return-Path: X-Original-To: freebsd-mips@FreeBSD.org Delivered-To: freebsd-mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0031916A406 for ; Wed, 9 May 2007 16:32:25 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id B85FA13C447 for ; Wed, 9 May 2007 16:32:25 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 6098821F2DE for ; Wed, 9 May 2007 12:34:02 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Wed, 09 May 2007 12:32:26 -0400 X-Sasl-enc: 4WK3/7fVpPFi71ZxH26HMzrCPdvZ3Ksiz9ljFKjXfrN/ 1178728345 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id 5A8DD37795 for ; Wed, 9 May 2007 12:32:25 -0400 (EDT) Message-ID: <4641F795.9030309@incunabulum.net> Date: Wed, 09 May 2007 17:32:21 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: freebsd-mips@FreeBSD.org References: <463F4F7D.6070001@incunabulum.net> <463FD2EB.7040504@incunabulum.net> <46412370.20002@incunabulum.net> In-Reply-To: <46412370.20002@incunabulum.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Broadcom MIPS progress X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2007 16:32:26 -0000 Bruce M. Simpson wrote: > > I am now scratching my head over how to attach child devices. This is kinda worked out, I now have newbus style children probing and trying to attach. This is cool, it means probe routines can be written in much the same way as for PCI; the siba bus driver will enumerate the bus, set vendor/device IDs in a devinfo structure, and export them to potential children via accessors just like pci(4) does. %%% siba0: at mem 0x18000000-0x18006fff on nexus0 siba_attach: entry nexus_release_resource: entry siba_cc0 on siba0 siba_alloc_resource: entry siba_cc0: unable to allocate memory device_attach: siba_cc0 attach returned 6 siba0: <0x4243, 0x0806 "Ethernet core"> not attached siba0: <0x4243, 0x080b "IPSEC accelerator"> not attached siba0: <0x4243, 0x0808 "USB host controller"> not attached siba_pcib0 on siba0 siba_alloc_resource: entry siba_pcib0: unable to allocate memory device_attach: siba_pcib0 attach returned 6 siba_mips0 on siba0 siba_alloc_resource: entry siba_mips0: unable to allocate memory device_attach: siba_mips0 attach returned 6 siba_sdram0 on siba0 siba_alloc_resource: entry siba_sdram0: unable to allocate memory device_attach: siba_sdram0 attach returned 6 %%% I just need to work out the kinks with resource allocation; siba will need to export a resource manager to its direct children for configuration space which it has already reserved, and proxy the allocations for bus space outside its own range further up. > > It seems likely that a full pci-style bus implementation will be > needed in siba (instance variables, devinfo etc) as it is likely that > architecture-independent code can be reused; in particular, ubsec(4), > uart(4) and bfe(4) for the onboard devices. I believe the onboard USB > host controller is OHCI. It looks as though this stuff is beginning to come together. I'd aim next to flesh out the basic ChipCommon functionality, determining the board clocks, setting up the UARTs and hooking them up to uart(4). Then, interrupt routing. After that stuff like bfe(4) can be dealt with. The OHCI controller on the WGT634U is not pinned out, there is a separate EHCI controller on the PCI bus to implement USB2. I believe the 4710 based systems are also using Siba so running on the WRT54G/S and WL-HDD2.5 should be feasible once we get bfe(4) hooked up to siba and stuff like ethercons is possible (as these systems have no UART which can be used for debugging the kernel during bringup, and their PMON firmware is primitive compared to CFE). Finally, getting the pci host bridge will be needed to access the Atheros 5213 MiniPCI card which ships in the WGT634U's PCI slot. Regards, BMS