On Mon, May 25, 2020 at 10:34 PM Simon Glass <s...@chromium.org> wrote: > > Hi Jagan, > > On Thu, 14 May 2020 at 07:19, Jagan Teki <ja...@amarulasolutions.com> wrote: > > > > UCLASS_SPI_FLASH driver at driver/mtd/spi is a generic > > spi flash driver to probe jedec,spi-nor flash chips. > > > > Technically a probe call in U_BOOT_DRIVER is local to that > > driver and not applicable to use it another driver or in > > another code. > > > > The apollolake SPL code using the generic probe by adding > > extra SPI flash driver, which make more confusion in terms > > of code readability and driver model structure. > > > > The fact that apollolake SPL requires a separate SPI flash > > driver to handle of-platdata via bind call, so move the > > bind call in the generic flash driver and drop the driver > > from apollolake code. > > > > I hope this wouldn't break generic code usage flash chips > > otherwise, we can handle this via driver data or a separate > > spi driver in drivers/mtd/spi. > > > > Cc: Bin Meng <bmeng...@gmail.com> > > Cc: Simon Glass <s...@chromium.org> > > Cc: Vignesh R <vigne...@ti.com> > > Signed-off-by: Jagan Teki <ja...@amarulasolutions.com> > > --- > > arch/x86/cpu/apollolake/spl.c | 60 ----------------------------------- > > drivers/mtd/spi/sf_probe.c | 29 ++++++++++++++++- > > include/spi_flash.h | 12 ------- > > 3 files changed, 28 insertions(+), 73 deletions(-) > > Unfortunately this stops TPL from booting. > > Could you expose the 'read' method properly, perhaps?
Not sure why it requires, read call seems very much similar to sf isn't it? Jagan.