From owner-freebsd-arm@FreeBSD.ORG Mon Jun 21 12:26:34 2010 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39493106566C; Mon, 21 Jun 2010 12:26:34 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id CFE9F8FC1B; Mon, 21 Jun 2010 12:26:33 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 39C93C42DE; Mon, 21 Jun 2010 14:32:03 +0200 (CEST) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id 6Mlz1zlCxdLx; Mon, 21 Jun 2010 14:32:02 +0200 (CEST) Received: from [10.0.0.79] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id A5152C42D5; Mon, 21 Jun 2010 14:32:01 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Rafal Jaworowski In-Reply-To: <20100621002635.d6d8876b.nork@FreeBSD.org> Date: Mon, 21 Jun 2010 14:26:30 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20100620220302.8eb84547.nork@FreeBSD.org> <4C1E182C.9080009@FreeBSD.org> <20100621002635.d6d8876b.nork@FreeBSD.org> To: Norikatsu Shigemura X-Mailer: Apple Mail (2.1081) Cc: Alexander Motin , Warner Losh , freebsd-arm@FreeBSD.org Subject: Re: OpenRD-Client/Ultimate support X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2010 12:26:34 -0000 On 2010-06-20, at 17:26, Norikatsu Shigemura wrote: > Hi mav. >=20 > On Sun, 20 Jun 2010 16:31:24 +0300 > Alexander Motin wrote: >>> mvs(4): >>> 5. FDT-ish >> If I understand right, with FDT SOC part of mvs(4) driver is no = longer >> need to be named "sata" to attach to the bus. If possible, I would >> prefer it to be renamed to "mvs", same as PCI one. >=20 > like following? >=20 > mvs.c > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - - - - > + if (!ofw_bus_is_compatible(dev, "mvs")) > + return (ENXIO); > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - - - - >=20 > openrd-cl.dts > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - - - - > sata@80000 { > compatible =3D "mrvl,sata", "mvs"; > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - - - - >=20 > or >=20 > openrd-cl.dts > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - - - - > sata@80000 { > compatible =3D "mrvl,sata"; > device_type =3D "sata"; > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - - - - The mvs(4) probe should simply check for compatiblity with the = "mrvl,sata" and your original code was fine with this regard. Please = note the DTS (compatible prop in this case) merely describes the = hardware, which is the same no matter what FreeBSD storage driver = flavour will actually be used to run it. A device tree node represents = and describes hardware, and it cannot contain any FreeBSD driver = information like mvs, ata or anything else. As a general side notes when using FDT: - the "device_type" property is only allowed for selected and specific = nodes, which need to retain compatibility with some legacy (Linux) code, = and it's not allowed any longer - "compatible" property value string should follow a "myvendor,mydevice" = approach Rafal