Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 2010 14:26:30 +0200
From:      Rafal Jaworowski <raj@semihalf.com>
To:        Norikatsu Shigemura <nork@FreeBSD.org>
Cc:        Alexander Motin <mav@FreeBSD.org>, Warner Losh <imp@FreeBSD.org>, freebsd-arm@FreeBSD.org
Subject:   Re: OpenRD-Client/Ultimate support
Message-ID:  <C53435FA-FE41-4087-BA39-C14BA45CD315@semihalf.com>
In-Reply-To: <20100621002635.d6d8876b.nork@FreeBSD.org>
References:  <20100620220302.8eb84547.nork@FreeBSD.org> <4C1E182C.9080009@FreeBSD.org> <20100621002635.d6d8876b.nork@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2010-06-20, at 17:26, Norikatsu Shigemura wrote:

> Hi mav.
>=20
> On Sun, 20 Jun 2010 16:31:24 +0300
> Alexander Motin <mav@FreeBSD.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C53435FA-FE41-4087-BA39-C14BA45CD315>