[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-arm
Subject:    Re: bcm2835
From:       Warner Losh <imp () bsdimp ! com>
Date:       2021-05-20 23:15:33
Message-ID: CANCZdfrdzQo-J9KumrV92tObFjVKhBnwLL_H6FUi8hwdV-y0gw () mail ! gmail ! com
[Download RAW message or body]

In general, for the RPi stuff, if it isn't in the commit messages, it will
be hard to
know why things were added. The datasheets' completeness and availability
in the past has been spotty, and it's entirely possible the code was written
with an old version that indicated a longer timeout.

A bit of digging shows this was moved recently by Kyle, but the original
dates back
to gonzo@'s original commit in 2012. I've cc'd Oleksandr to see if he can
recall
why that was added...

Warner

On Wed, May 19, 2021 at 8:41 AM Kamal R. Prasad <kamalpr@gmail.com> wrote:

> the comment indicates that timeout value is too low. surely, there
> must be some place where the timing constraint is indicated because of
> which this quirk was put in. or is it that the datasheet doesn't
> require this -but in practice, the timeout needs to be increased? if
> someone else has added it -maybe they can tell me.
>
> thanks
> -kamal
>
> On Wed, May 19, 2021 at 6:50 PM Kyle Evans <kevans@freebsd.org> wrote:
> >
> > On Wed, May 19, 2021 at 8:12 AM Kamal R. Prasad <kamalpr@gmail.com>
> wrote:
> > > On Wed, May 19, 2021 at 6:08 PM Kyle Evans <kevans@freebsd.org> wrote:
> > > >
> > > > On Wed, May 19, 2021 at 12:27 AM Kamal R. Prasad <kamalpr@gmail.com>
> wrote:
> > > > >
> > > > > hello,
> > > > >
> > > > > in file
> > > > > sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
> > > > >
> > > > > there is a constant
> > > > > SDHCI_QUIRK_BROKEN_TIMEOUT_VAL
> > > > > can someone tell me why this was introduced and does it correspond
> to
> > > > > anything in the datasheet?
> > > > >
> > > >
> > > > Hi,
> > > >
> > > > This was added by gonzo@ back in r242321. It doesn't really
> correspond
> > > > to anything in the datasheet, but before I committed r354560 that
> > > > moved it around I did try to remove it and observed that it was still
> > > > a problem with either the RPi3 or RPi4.
> > > >
> > > > Thanks,
> > > >
> > > > Kyle Evans
> > >
> > > Hi!
> > >
> > > can you tell me more on why removing it was a problem for rpi3 or
> > > rpi4? i am trying to understand the significance of this #define.
> > >
> > > thanks
> > > -kamal
> > >
> >
> > You'll find better insight from the comment at its definition and
> > implementation:
> > http://bxr.su/FreeBSD/sys/dev/sdhci/sdhci.h#60
> > http://bxr.su/FreeBSD/sys/dev/sdhci/sdhci.c#1814
> >
> > My very vague recollection is that the advertised timeout is too low,
> > but it's probably an implementation issue.
> >
> > Thanks,
> >
> > Kyle Evans
>
>

[Attachment #3 (text/html)]

<div dir="ltr"><div>In general, for the RPi stuff, if it isn&#39;t in the commit \
messages, it will be hard to</div><div>know why things were added. The \
datasheets&#39; completeness and availability</div><div>in the past has been spotty, \
and it&#39;s entirely possible the code was written</div><div>with an old version \
that indicated a longer timeout.</div><div><br></div><div>A bit of digging shows this \
was moved recently by Kyle, but the original dates back</div><div>to gonzo@&#39;s \
original commit in 2012. I&#39;ve cc&#39;d Oleksandr to see if he can \
recall</div><div>why that was added...</div><div><br></div><div>Warner</div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 19, 2021 at 8:41 AM \
Kamal R. Prasad &lt;<a href="mailto:kamalpr@gmail.com">kamalpr@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">the comment indicates \
that timeout value is too low. surely, there<br> must be some place where the timing \
constraint is indicated because of<br> which this quirk was put in. or is it that the \
datasheet doesn&#39;t<br> require this -but in practice, the timeout needs to be \
increased? if<br> someone else has added it -maybe they can tell me.<br>
<br>
thanks<br>
-kamal<br>
<br>
On Wed, May 19, 2021 at 6:50 PM Kyle Evans &lt;<a href="mailto:kevans@freebsd.org" \
target="_blank">kevans@freebsd.org</a>&gt; wrote:<br> &gt;<br>
&gt; On Wed, May 19, 2021 at 8:12 AM Kamal R. Prasad &lt;<a \
href="mailto:kamalpr@gmail.com" target="_blank">kamalpr@gmail.com</a>&gt; wrote:<br> \
&gt; &gt; On Wed, May 19, 2021 at 6:08 PM Kyle Evans &lt;<a \
href="mailto:kevans@freebsd.org" target="_blank">kevans@freebsd.org</a>&gt; \
wrote:<br> &gt; &gt; &gt;<br>
&gt; &gt; &gt; On Wed, May 19, 2021 at 12:27 AM Kamal R. Prasad &lt;<a \
href="mailto:kamalpr@gmail.com" target="_blank">kamalpr@gmail.com</a>&gt; wrote:<br> \
&gt; &gt; &gt; &gt;<br> &gt; &gt; &gt; &gt; hello,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; in file<br>
&gt; &gt; &gt; &gt; sys/arm/broadcom/bcm2835/bcm2835_sdhci.c<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; there is a constant<br>
&gt; &gt; &gt; &gt; SDHCI_QUIRK_BROKEN_TIMEOUT_VAL<br>
&gt; &gt; &gt; &gt; can someone tell me why this was introduced and does it \
correspond to<br> &gt; &gt; &gt; &gt; anything in the datasheet?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; This was added by gonzo@ back in r242321. It doesn&#39;t really \
correspond<br> &gt; &gt; &gt; to anything in the datasheet, but before I committed \
r354560 that<br> &gt; &gt; &gt; moved it around I did try to remove it and observed \
that it was still<br> &gt; &gt; &gt; a problem with either the RPi3 or RPi4.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Kyle Evans<br>
&gt; &gt;<br>
&gt; &gt; Hi!<br>
&gt; &gt;<br>
&gt; &gt; can you tell me more on why removing it was a problem for rpi3 or<br>
&gt; &gt; rpi4? i am trying to understand the significance of this #define.<br>
&gt; &gt;<br>
&gt; &gt; thanks<br>
&gt; &gt; -kamal<br>
&gt; &gt;<br>
&gt;<br>
&gt; You&#39;ll find better insight from the comment at its definition and<br>
&gt; implementation:<br>
&gt; <a href="http://bxr.su/FreeBSD/sys/dev/sdhci/sdhci.h#60" rel="noreferrer" \
target="_blank">http://bxr.su/FreeBSD/sys/dev/sdhci/sdhci.h#60</a><br> &gt; <a \
href="http://bxr.su/FreeBSD/sys/dev/sdhci/sdhci.c#1814" rel="noreferrer" \
target="_blank">http://bxr.su/FreeBSD/sys/dev/sdhci/sdhci.c#1814</a><br> &gt;<br>
&gt; My very vague recollection is that the advertised timeout is too low,<br>
&gt; but it&#39;s probably an implementation issue.<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Kyle Evans<br>
<br>
</blockquote></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic