From owner-freebsd-arm@freebsd.org Fri Nov 6 14:45:44 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47D13A28C02 for ; Fri, 6 Nov 2015 14:45:44 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 13AF31A43 for ; Fri, 6 Nov 2015 14:45:43 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from bender (global-5-141.nat-2.net.cam.ac.uk [131.111.5.141]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 70365D7905; Fri, 6 Nov 2015 14:45:12 +0000 (UTC) Date: Fri, 6 Nov 2015 14:45:11 +0000 From: Andrew Turner To: Zbigniew Bodek Cc: "freebsd-arm@freebsd.org" Subject: Re: HEADS UP: Cavium ThunderX support in the tree Message-ID: <20151106144511.3309d8b2@bender> In-Reply-To: References: <20151106094714.5e8632c6@bender.Home> <20151106113641.02e0f826@bender> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 14:45:44 -0000 On Fri, 6 Nov 2015 13:10:10 +0100 Zbigniew Bodek wrote: > 2015-11-06 12:36 GMT+01:00 Andrew Turner : > > On Fri, 6 Nov 2015 12:23:11 +0100 > > Zbigniew Bodek wrote: > >> Secondly, EFI that runs on the board needs to pass the correct DTB > >> to the kernel (it has to have PCIB, BGX, MDIO, PHYs nodes and they > >> need to be in the correct order [MDIO needs to attach before > >> BGX]). > > If this is the case the code is broken. It should just work with > > the vendor dtb and GENERIC. > > Thanks for quick evaluation but please see comment below. > > > > > We already have to handle this in other parts of the code by having > > the dependent drivers on an earlier pass than later drivers. > > MDIO is a platform device whereas BGX, NICPF (physical function) and > NICVF (virtual function) are devices on PCI. > Therefore if the PCIB is placed prior to MDIO in DTB all devices on > this PCI bridge will be attached before MDIO is attached. > As far as I know there is no straightforward way to create a logical > relation between device on PCI and platform devices enumerated using > DTB. > That is why we asked Cavium to change the order in their DTBs. > Of course if you know how to workaround that I would be happy to apply > this change to "unbreak" the existing code. No need, I've fixed it in r290448. Andrew