> -----Original Message----- > From: Mike Frysinger [mailto:vap...@gentoo.org] > Sent: Monday, March 16, 2009 3:28 PM > To: u-boot@lists.denx.de > Cc: Jean-Christophe PLAGNIOL-VILLARD; Hu Mingkai-B21284; > Fleming Andy-AFLEMING > Subject: Re: [U-Boot] [PATCH 3/7] eSPI: add eSPI controller support > > On Monday 16 March 2009 02:15:27 Jean-Christophe > PLAGNIOL-VILLARD wrote: > > On 10:52 Mon 16 Mar , Mingkai Hu wrote: > > > Add eSPI controller support under the SPI framework. > > > > > > Signed-off-by: Mingkai Hu <mingkai...@freescale.com> > > > --- > > > drivers/mtd/spi/spi_flash.c | 94 +++++++++++++++++- > > > drivers/spi/Makefile | 1 + > > > drivers/spi/fsl_espi.c | 232 > > > +++++++++++++++++++++++++++++++++++++++++++ include/spi.h > | > > > 30 ++++++ > > > 4 files changed, 354 insertions(+), 3 deletions(-) create mode > > > 100644 drivers/spi/fsl_espi.c > > > > please use the spi framework, their is no need to touch the > spi_flash > > support ti add and use the fsl_espi > > indeed ... i was so happy to see the spansion driver i > glossed over this ... > those spi_flash.c changes are almost assuredly wrong and > indicate you arent fitting into the framework correctly. > -mike >
There is difference between the SPI and eSPI chip select signal. Generally, the SPI chip select is controlled by GPIO, so SW can control when to assert the chip select signal and when to stop the chip select signal. But the eSPI controller integrate the chip select into the controller itself, it use the transfer length to control the duration of the chip select signal. The spi_flash_cmd_* function split the transfer into two steps: first the command transfer and then the data transfer. At the first step, the transfer length is set to the command length, and when transferred the command, the chip select will be negated, so the eSPI controller thinks the transfer is cancelled and doesn't transfer the data again. I'm in a dilemma on this issue and really need your suggestion :-) Thanks, Mingkai _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot