Hi Vignesh, On Fri, 18 Oct 2019 at 02:50, Vignesh Raghavendra <vigne...@ti.com> wrote: > [..]
> >>>> As it stands we don't actually use that uclass with this SPI flash > >>>> driver - it implements the SPI_FLASH interface directly. > >>>> > >>>> But given that I'm going to try to use the same ich.c driver this > >>>> should be easy enough. > >>>> > >>>> I've just found the weird mem_ops argument within struct dm_spi_ops...oh > >>>> dear. > >>>> > >>> > >>> The mem_ops was added by Vignesh. I believe that was derived from the > >>> Linux kernel. > > > > spi_mem_ops in U-Boot was added by Miquel while introducing SPI NAND > support in U-Boot, but I extended its usage to SPI NOR devices as well. > > > The problem is that it is ops within ops so doesn't follow driver model. > > Hmm, why is that so? > ops within ops is not unheard of and is common in kernel as well. This > actually allows to grouping of similar operations into simple structs > and thus improves readability. It is not used elsewhere in driver model though. Also there are no tests. How can we get some tests in there? Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot