svn commit: r355444 - in head/sys: arm/mv arm64/conf conf

Ian Lepore ian at freebsd.org
Fri Dec 6 16:58:29 UTC 2019


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




More information about the svn-src-head mailing list