Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Dec 2019 09:58:24 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        Luiz Otavio O Souza <loos@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r355444 - in head/sys: arm/mv arm64/conf conf
Message-ID:  <7160a41739e5b251b50defb44ad08f3c722ea9c7.camel@freebsd.org>
In-Reply-To: <201912061255.xB6CtdJw011374@repo.freebsd.org>
References:  <201912061255.xB6CtdJw011374@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2019-12-06 at 12:55 +0000, Luiz Otavio O Souza wrote:
> Author: loos
> Date: Fri Dec  6 12:55:39 2019
> New Revision: 355444
> URL: https://svnweb.freebsd.org/changeset/base/355444
> 
> Log:
>   Add the SPI driver for the Marvell Armada 37x0 SoC.
>   
>   Interrupt based driver, implements SPI mode and clock configuration.
>   
>   Tested on espressobin and SG-3200.
>   
>   Sponsored by:	Rubicon Communications, LLC (Netgate)
> 
> Added:
>   head/sys/arm/mv/a37x0_spi.c   (contents, props changed)
> Modified:
>   head/sys/arm64/conf/GENERIC
>   head/sys/conf/files.arm64
> 
> Added: head/sys/arm/mv/a37x0_spi.c
> 
> 
> +static int
> +a37x0_spi_detach(device_t dev)
> +{
> +	struct a37x0_spi_softc *sc;
> +
> +	bus_generic_detach(dev);
> 

It's possible for detaching children to fail (like if one of them
returns EBUSY from its detach), in which case you should bail on your
detach and return the error status.  Also, this needs a
device_destroy_children() here after detaching them, to remove the
spibus child added in attach (in case the module is unloaded then
reloaded, that avoids adding a second copy of the child).

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7160a41739e5b251b50defb44ad08f3c722ea9c7.camel>