Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Feb 2014 16:39:53 -0200
From:      Luiz Otavio O Souza <loos.br@gmail.com>
To:        Nathan Whitehorn <nwhitehorn@freebsd.org>
Cc:        Luiz Otavio O Souza <loos@FreeBSD.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r261842 - in head/sys: conf dev/gpio
Message-ID:  <88E87461-9039-471F-9BE2-02742FB98282@gmail.com>
In-Reply-To: <52FD321D.7010105@freebsd.org>
References:  <201402131708.s1DH8UJ7063297@svn.freebsd.org> <52FD321D.7010105@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 13, 2014, at 6:59 PM, Nathan Whitehorn <nwhitehorn@freebsd.org> =
wrote:
> On 02/13/14 11:08, Luiz Otavio O Souza wrote:
>> Author: loos
>> Date: Thu Feb 13 17:08:29 2014
>> New Revision: 261842
>> URL: http://svnweb.freebsd.org/changeset/base/261842
>>=20
>> Log:
>>   Add an OFW GPIO compatible bus.  This allows the use of the DTS =
files to
>>   describe GPIO bindings in the system.
>>      Move the GPIOBUS lock macros to gpiobusvar.h as they are now =
shared between
>>   the OFW and the non OFW versions of GPIO bus.
>>      Export gpiobus_print_pins() so it can also be used on the OFW =
GPIO bus.
>>      Approved by:	adrian (mentor, implicit)
>>=20
>> Added:
>>   head/sys/dev/gpio/ofw_gpiobus.c   (contents, props changed)
>> Modified:
>>   head/sys/conf/files
>>   head/sys/dev/gpio/gpiobus.c
>>   head/sys/dev/gpio/gpiobusvar.h
>>=20
>>=20
>>=20
>> Added: head/sys/dev/gpio/ofw_gpiobus.c
>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>> --- /dev/null	00:00:00 1970	(empty, because file is newly =
added)
>> +++ head/sys/dev/gpio/ofw_gpiobus.c	Thu Feb 13 17:08:29 2014	=
(r261842)
>> @@ -0,0 +1,338 @@
>> +/*-
>> + * Copyright (c) 2009, Nathan Whitehorn <nwhitehorn@FreeBSD.org>
>> + * Copyright (c) 2013, Luiz Otavio O Souza <loos@FreeBSD.org>
>> + * Copyright (c) 2013 The FreeBSD Foundation
>> + * All rights reserved.
>> + *
>> + * Redistribution and use in source and binary forms, with or =
without
>> + * modification, are permitted provided that the following =
conditions
>> + * are met:
>> + * 1. Redistributions of source code must retain the above copyright
>> + *    notice unmodified, this list of conditions, and the following
>> + *    disclaimer.
>> + * 2. Redistributions in binary form must reproduce the above =
copyright
>> + *    notice, this list of conditions and the following disclaimer =
in the
>> + *    documentation and/or other materials provided with the =
distribution.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS =
OR
>> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED =
WARRANTIES
>> + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE =
DISCLAIMED.
>> + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
>> + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES =
(INCLUDING, BUT
>> + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS =
OF USE,
>> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON =
ANY
>> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR =
TORT
>> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE =
USE OF
>> + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> + */
>> +
>> +#include <sys/cdefs.h>
>> +__FBSDID("$FreeBSD$");
>> +
>> +#include <sys/param.h>
>> +#include <sys/bus.h>
>> +#include <sys/gpio.h>
>> +#include <sys/kernel.h>
>> +#include <sys/libkern.h>
>> +#include <sys/lock.h>
>> +#include <sys/module.h>
>> +#include <sys/mutex.h>
>> +
>> +#include <dev/fdt/fdt_common.h>
>> +#include <dev/gpio/gpiobusvar.h>
>> +#include <dev/ofw/ofw_bus.h>
>> +#include <dev/ofw/openfirm.h>
>> +
>>=20
>=20
> is there a reason you include fdt_common.h here? Nothing here seems to =
be FDT specific, rather than for Open Firmware generally.
> -Nathan

oops. It was used with fdt_is_enabled() to verify if the child device =
was enabled, but it was removed in the last update of the code. This is =
a leftover from this update.

I=92ll check if it is okay to remove it and commit the fix.

Thanks for point that out.

Luiz=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?88E87461-9039-471F-9BE2-02742FB98282>