From: vikas <vikas.manocha@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [v2 2/6] spi: cadence_qspi: remove sram polling from flash read
Date: Thu, 13 Aug 2015 18:05:57 -0700 [thread overview]
Message-ID: <55CD3EF5.5050405@st.com> (raw)
In-Reply-To: <201508140303.41206.marex@denx.de>
Hi,
On 08/13/2015 06:03 PM, Marek Vasut wrote:
> On Friday, August 14, 2015 at 02:46:20 AM, vikas wrote:
>> Hi,
>
> Hi,
>
> [...]
>
>>>>>>> I don't want to have two different codepaths in the codebase, one of
>>>>>>> which is buggy. So no, I disagree we should add this option. I also
>>>>>>> don't think it would be such a performance improvement, so I only see
>>>>>>> downsides in such a code.
>>>>>>
>>>>>> I expected the same answer :-) & agree also.
>>>>>
>>>>> Heh, thanks :-)
>>>>>
>>>>>> ok, the issue is SRAM Fill Level register is not being updated on my
>>>>>> SOC, seems like design issue. Any idea how can i add this fix (to
>>>>>> avoid sram level polling) to my soc in u-boot mainline.
>>>>>
>>>>> Mask all interrupts in the controller, set watermark to N bytes
>>>>> (depending on the length of your transfer) and poll the interrupt
>>>>> status register until the watermark is reached ? Is this possible ?
>>>>
>>>> Watermark is for sram level and might not work as well.
>>>> In general also for such soc/platform issues for any driver, any idea
>>>> how to apply fixes.
>>>
>>> That's a good question . Is there any way on the ST chip to avoid such
>>> direct blocking read which can stall the CPU core indefinitelly? Can you
>>> check with the chip designers ?
>>
>> I already checked & it does not exist in the hardware. Solution to that are
>> timeout interrupts in indirect mode or use only direct mode. In case of
>> direct mode, the u-boot driver can't be used.
>
> Why can't you use direct mode ? Wouldn't that solve your problem (with some
> performance penalty probably) ?
u-boot driver does not support direct mode.
>
>> But again, can we add some fix for stv0991 arch to avoid sram level.
>> Without that we will not be able to use the driver at all for stv0991.
>>
>> In general, again it seems not a unique problem. Any idea how to apply
>> fixes for such peripheral design bugs.
>
> What do you mean it's not unique please ?
SOCs have one or the other design bugs often & there should be some way to apply fixes/workrounds.
>
> One option would be to pull out the SRAM level check into a separate function
> and in that function check whether the controller is the one on ST chip (via
> compatible string) and if it is, return fake "full" SRAM level. You'd then
> fall back to the blocking read. I don't like the idea , but if there is no
> other way ...
It seems ok to me, I can send the patch for the same. Please let me know.
Rgds,
Vikas
>
> Best regards,
> Marek Vasut
> .
>
next prev parent reply other threads:[~2015-08-14 1:05 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 2:27 [U-Boot] [v2 0/6] spi: cadence_qspi: optimize & fix indirect rd-writes Vikas Manocha
2015-07-16 2:27 ` [U-Boot] [v2 1/6] spi: cadence_qspi: move trigger base configuration in init Vikas Manocha
2015-08-13 2:07 ` Marek Vasut
2015-08-13 15:50 ` vikasm
2015-08-13 17:35 ` Marek Vasut
2015-08-13 19:05 ` vikasm
2015-08-14 1:24 ` vikas
2015-08-14 1:43 ` Marek Vasut
2015-08-14 1:44 ` vikas
2015-08-14 1:55 ` Marek Vasut
2015-07-16 2:27 ` [U-Boot] [v2 2/6] spi: cadence_qspi: remove sram polling from flash read Vikas Manocha
2015-08-13 2:09 ` Marek Vasut
2015-08-13 16:27 ` vikasm
2015-08-13 17:33 ` Marek Vasut
2015-08-13 19:49 ` vikas
2015-08-13 20:35 ` Marek Vasut
2015-08-13 21:04 ` vikas
2015-08-13 22:47 ` Marek Vasut
2015-08-13 23:18 ` vikas
2015-08-13 23:46 ` Marek Vasut
2015-08-14 0:26 ` vikas
2015-08-14 0:44 ` Marek Vasut
2015-08-14 0:46 ` vikas
2015-08-14 1:03 ` Marek Vasut
2015-08-14 1:05 ` vikas [this message]
2015-08-14 3:54 ` Marek Vasut
2015-07-16 2:27 ` [U-Boot] [v2 3/6] spi: cadence_qspi: remove sram polling from flash write Vikas Manocha
2015-08-13 2:11 ` Marek Vasut
2015-08-13 16:30 ` vikasm
2015-08-13 17:34 ` Marek Vasut
2015-07-16 2:27 ` [U-Boot] [v2 4/6] spi: cadence_qspi: fix indirect read/write start address Vikas Manocha
2015-07-16 2:27 ` [U-Boot] [v2 5/6] spi: cadence_qspi: fix base trigger address & transfer " Vikas Manocha
2015-08-13 2:15 ` Marek Vasut
2015-08-13 16:42 ` vikasm
2015-08-13 21:36 ` vikas
2015-08-13 22:48 ` Marek Vasut
2015-08-14 0:37 ` vikas
2015-08-14 1:04 ` Marek Vasut
2015-08-14 1:39 ` vikas
2015-08-14 1:56 ` Marek Vasut
2015-08-14 2:14 ` Vikas MANOCHA
2015-07-16 2:27 ` [U-Boot] [v2 6/6] spi: cadence_qspi: get fifo width from device tree Vikas Manocha
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=55CD3EF5.5050405@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox