All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vikas MANOCHA <vikas.manocha@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH RESEND 0/7] spi: cadence_qspi: optimize & fix indirect rd-writes
Date: Thu, 9 Jul 2015 03:29:48 +0200	[thread overview]
Message-ID: <9026814FBF99304F9FA3AC3FB72F3E2F02961452@SAFEX1MAIL4.st.com> (raw)
In-Reply-To: 5587C89A.6050209@denx.de

Hi Stefan,

> -----Original Message-----
> From: Vikas MANOCHA
> Sent: Wednesday, July 01, 2015 9:25 AM
> To: 'Stefan Roese'
> Cc: 'u-boot at lists.denx.de'; 'grmoore at opensource.altera.com';
> 'dinguyen at opensource.altera.com'; 'jteki at openedev.com'
> Subject: RE: [PATCH RESEND 0/7] spi: cadence_qspi: optimize & fix indirect
> rd-writes
> 
> Hi Stefan,
> 
> > -----Original Message-----
> > From: Vikas MANOCHA
> > Sent: Monday, June 22, 2015 4:31 PM
> > To: 'Stefan Roese'
> > Cc: u-boot at lists.denx.de; grmoore at opensource.altera.com;
> > dinguyen at opensource.altera.com; jteki at openedev.com
> > Subject: RE: [PATCH RESEND 0/7] spi: cadence_qspi: optimize & fix
> > indirect rd-writes
> >
> > Thanks Stefan,
> >
> > > -----Original Message-----
> > > From: Stefan Roese [mailto:sr at denx.de]
> > > Sent: Monday, June 22, 2015 1:35 AM
> > > To: Vikas MANOCHA
> > > Cc: u-boot at lists.denx.de; grmoore at opensource.altera.com;
> > > dinguyen at opensource.altera.com; jteki at openedev.com
> > > Subject: Re: [PATCH RESEND 0/7] spi: cadence_qspi: optimize & fix
> > > indirect rd-writes
> > >
> > > Hi Vikas,
> > >
> > > On 19.06.2015 23:38, Vikas MANOCHA wrote:
> > > >>> - git bisect or cherry-pick to find out which patch is breaking the
> > > >>>    read functionality.
> > > >>
> > > >> This one is the first introducing this breakage:
> > > >>
> > > >> spi: cadence_qspi: fix base trigger address & transfer start
> > > >> address
> > > >>
> > > >
> > > > Ok, can you confirm applying patches upto (& including)
> > > > "spi: cadence_qspi: fix indirect read/write start address" , read/write
> > > >   to flash are working fine.
> > >
> > > Please note that with this patch the code does not compile:
> > >
> > > drivers/spi/cadence_qspi_apb.c: In function
> 'qpsi_write_sram_fifo_push':
> > > drivers/spi/cadence_qspi_apb.c:227:32: error: 'struct
> > cadence_spi_platdata'
> > > has no member named 'trigger_base'
> > >    unsigned int *dest_addr = plat->trigger_base;
> > >
> > > I've manually fixed this trivial change (trigger_base -> ahbbase)
> > > and tests with these patches applied show some problems with "sf"
> > > stability
> > > (bit-flips):
> >
> > Sorry for this dumb mistake which happened during rebase :-(,  I will
> > correct in next patch series.
> >
> > >
> > > => sf update 400000 100000 100000
> > > 1048576 bytes written, 0 bytes skipped in 34.196s, speed 31395 B/s
> > > => sf read
> > > 500000 100000 100000
> > > SF: 1048576 bytes @ 0x100000 Read: OK => cmp.b 400000 500000 100000
> > > byte at 0x0040001e (0x9f) != byte at 0x0050001e (0x8f) Total of 30
> > > byte(s) were the same
> > >
> > > This is new - removing all your patches seems to solve this issue again.
> >
> > Thanks again Stefan for these tests. It is not easy for me to figure
> > out this instability without the board but I don 't see any logical error in the
> patches.
> > Off-course code is more optimized & fast with these patches. Access
> > timing in the log provided by you also confirms it.
> >
> > I can suggest following checks on the hardware:
> >
> > - Figure out the issue is with read or write, which means comparing
> > the flash with ram after read/write.
> > - Put some random microsecond delays in the read/write to confirm it
> > is timing issue.
> 
> Any update on it ?

In addition can you please check the patch causing this instability on socfpga. I don't like to bug you but 
to close this patchset, this info & tests mentioned above seems to be required.

I am ready to check it but would need the hardware platform.

Rgds,
Vikas

> 
> Rgds,
> Vikas
> 
> >
> > > So there seems to be something wrong with the previous patches as
> well.
> > > here the output with the patches reverted:
> > >
> > > => sf probe
> > > SF: Detected N25Q256 with page size 256 Bytes, erase size 4 KiB,
> > > total
> > > 32 MiB
> > > SF: Warning - Only lower 16MiB accessible, Full access #define
> > > CONFIG_SPI_FLASH_BAR => sf update 400000 100000 100000
> > > 1048576 bytes written, 0 bytes skipped in 35.872s, speed 29929 B/s
> > > => sf read
> > > 500000 100000 100000
> > > SF: 1048576 bytes @ 0x100000 Read: OK => cmp.b 400000 500000 100000
> > > Total of 1048576 byte(s) were the same
> > >
> > > > The point is if after applying above mentioned patch (...: fix
> > > > indirect read/write start address), Read/write are working fine,
> > > > then trigger_base value of 0xFFA00_0000 should also work fine.
> > > > Can you please modify the trigger_base value from 0x0 to
> > > > 0xFFA0_0000 in Socfpga.dtsi & check.
> > > > If it works, it would mean both (socfpga & stv0991) are behaving same.
> > >
> > > No. With this change, the "sf read" command crashes / hangs on the
> > > SoCFPGA board.
> >
> > Ok, I don't know why socfpga is not working with trigger_base to be
> > 0xFFA0_0000.
> > Normally it should work, Graham also thinks the same, Let's wait for
> > his discussion with the Altera designers.
> >
> > Rgds,
> > Vikas
> >
> > >
> > > Thanks,
> > > Stefan

  parent reply	other threads:[~2015-07-09  1:29 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17  2:14 [U-Boot] [PATCH RESEND 0/7] spi: cadence_qspi: optimize & fix indirect rd-writes Vikas Manocha
2015-06-17  2:14 ` [U-Boot] [PATCH RESEND 1/7] spi: cadence_qspi: remove sram polling from flash read Vikas Manocha
2015-06-17  2:14 ` [U-Boot] [PATCH RESEND 2/7] spi: cadence_qspi: read can be independent of fifo width Vikas Manocha
2015-06-17  2:14 ` [U-Boot] [PATCH RESEND 3/7] spi: cadence_qspi: remove sram polling from flash write Vikas Manocha
2015-06-17  2:14 ` [U-Boot] [PATCH RESEND 4/7] spi: cadence_qspi: move trigger base configuration in init Vikas Manocha
2015-06-17  2:14 ` [U-Boot] [PATCH RESEND 5/7] spi: cadence_qspi: fix indirect read/write start address Vikas Manocha
2015-06-17  2:14 ` [U-Boot] [PATCH RESEND 6/7] spi: cadence_qspi: fix base trigger address & transfer " Vikas Manocha
2015-06-17  2:14 ` [U-Boot] [PATCH RESEND 7/7] spi: cadence_qspi: get fifo width from device tree Vikas Manocha
2015-06-18 12:02 ` [U-Boot] [PATCH RESEND 0/7] spi: cadence_qspi: optimize & fix indirect rd-writes Stefan Roese
2015-06-18 18:05   ` Vikas MANOCHA
2015-06-19  6:16     ` Stefan Roese
2015-06-19 21:38       ` Vikas MANOCHA
2015-06-22  8:34         ` Stefan Roese
2015-06-22 23:31           ` Vikas MANOCHA
2015-06-23 14:36             ` Graham Moore
2015-06-23 14:51               ` Vikas MANOCHA
2015-07-02 17:50               ` Vikas MANOCHA
2015-07-06 17:56                 ` Graham Moore
2015-07-06 18:19                   ` Vikas MANOCHA
2015-07-01 16:24           ` Vikas MANOCHA
2015-07-09  1:29           ` Vikas MANOCHA [this message]
2015-07-13  9:00             ` Stefan Roese
2015-07-15 21:14               ` Vikas MANOCHA
2015-07-16  6:46                 ` Stefan Roese
2015-07-23 12:22                   ` Stefan Roese
2015-08-11 21:19                     ` vikasm
2015-08-12 11:36                       ` Stefan Roese
2015-08-12 12:01                         ` Jagan Teki
2015-08-12 17:52                           ` vikasm
2015-08-12 20:22                             ` Marek Vasut
2015-08-13  0:16                               ` vikasm
2015-08-13  0:26                                 ` Marek Vasut
2015-08-13  0:36                                   ` vikasm
2015-08-13  2:15                                     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9026814FBF99304F9FA3AC3FB72F3E2F02961452@SAFEX1MAIL4.st.com \
    --to=vikas.manocha@st.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.