[U-Boot-Users] [PATCH v2 1/3] New i.MX31 SPI driver

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Fri May 9 11:24:47 CEST 2008


Wolfgang Denk <wd at denx.de> wrote:
> In message <20080508181708.60e8b3e9 at hskinnemo-gx620.norway.atmel.com> you wrote:
> >
> > Yes, perhaps we need that. But I was sort of thinking that once you
> > initialize a slave, it will just stick around until you boot an OS or
> > reset. Most drivers don't seem to have any cleanup hooks anyway, and
> > some don't even have init hooks. In the latter case, you can simply
> > keep a static struct spi_slave * around and if it's NULL, you
> > initialize it.  
> 
> Even if there is lots of bad examples, it is a design requirement to
> disable a hardware interface after use. See bullet 6 at
> http://www.denx.de/wiki/UBoot/DesignRequirements

I know. That's what the spi_claim_bus() and spi_release_bus() hooks are
supposed to do. I just don't see the point of deallocating the
spi_slave struct memory; this has nothing to do with disabling hardware.

Haavard




More information about the U-Boot mailing list