<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Kinsey,</p>
    <p>Thanks for the feedback! I added the git config as recommended.</p>
    <p>Response to your comment is inline below.</p>
    <p>Regards,<br>
    </p>
    <p>-Rick<br>
    </p>
    <div class="moz-cite-prefix">On 3/23/23 10:26, Kinsey Moore wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPycBogttMMyGMQs9tnN+v6d_UPQ7T-KHBaZ5bp-+0=9Q9C+UQ@mail.gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hey Rick,</div>
        <div>This looks good for the most part and thanks for the
          contribution. <br>
        </div>
        <div><br>
        </div>
        <div>For future patches, please make sure you specify the
          repository in your subject line if the patch isn't for the
          RTEMS repository. This can be configured to occur
          automatically in your local per-repo git configuration using
          this:</div>
        <div>git config format.subjectprefix "PATCH rtems-libbsd"</div>
        <div><br>
        </div>
        <div>This should actually be referenced in the git docs for this
          project, but it appears that there's a mistake in the markup
          that I'm about to go fix.<br>
        </div>
        <div><br>
        </div>
        <div>Just one comment inline below:</div>
        <div><br>
        </div>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Wed, Mar 22, 2023 at
            7:02 PM <<a href="mailto:rvanderwal@bellsouth.net"
              moz-do-not-send="true" class="moz-txt-link-freetext">rvanderwal@bellsouth.net</a>>
            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">From: Rick VanderWal <<a
              href="mailto:rvanderwal@bellsouth.net" target="_blank"
              moz-do-not-send="true" class="moz-txt-link-freetext">rvanderwal@bellsouth.net</a>><br>
            <br>
            This fixes an issue where the card present signal doesn't
            stabilize<br>
            quickly and indicates present when no card is inserted in a
            removable<br>
            slot.<br>
            ---<br>
             rtemsbsd/sys/dev/sdhci/arasan_sdhci.c | 20
            ++++++++++++++++++++<br>
             1 file changed, 20 insertions(+)<br>
            <br>
            diff --git a/rtemsbsd/sys/dev/sdhci/arasan_sdhci.c
            b/rtemsbsd/sys/dev/sdhci/arasan_sdhci.c<br>
            index 0e87d903..7ac0a971 100644<br>
            --- a/rtemsbsd/sys/dev/sdhci/arasan_sdhci.c<br>
            +++ b/rtemsbsd/sys/dev/sdhci/arasan_sdhci.c<br>
            @@ -195,6 +195,26 @@ arasan_sdhci_get_card_present(device_t
            dev, struct sdhci_slot *slot)<br>
             {<br>
                    struct arasan_sdhci_softc *sc =
            device_get_softc(dev);<br>
            <br>
            +       // wait a maximum of 1 second for card stable to
            settle<br>
            +       const unsigned int max_tries = 20;<br>
            +       const rtems_interval sleep_ticks =<br>
            +               rtems_clock_get_ticks_per_second() /
            max_tries;<br>
            +<br>
            +       unsigned int count = 0;<br>
            +       while (!(RD4(sc, SDHCI_PRESENT_STATE) &
            SDHCI_CARD_STABLE) &&<br>
            +               (count < max_tries))<br>
            +       {<br>
            +               rtems_task_wake_after(sleep_ticks);<br>
            +               ++count;<br>
            +       }<br>
            +<br>
            +       if (!(RD4(sc, SDHCI_PRESENT_STATE) &
            SDHCI_CARD_STABLE))<br>
            +       {<br>
            +               device_printf(dev,<br>
            +                       "CD failed to stabilize, setting to
            not present.\n");<br>
          </blockquote>
          <div><br>
          </div>
          <div>What is "CD"? Should this be "SD"?<br>
          </div>
        </div>
      </div>
    </blockquote>
    <p>CD is the "Card Detect" signal line from the SD card socket. In
      this case it may be better to spell out to avoid confusion.<br>
    </p>
    <blockquote type="cite"
cite="mid:CAPycBogttMMyGMQs9tnN+v6d_UPQ7T-KHBaZ5bp-+0=9Q9C+UQ@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            +               return false;<br>
            +       }<br>
            +<br>
                    return (RD4(sc, SDHCI_PRESENT_STATE) &
            SDHCI_CARD_PRESENT);<br>
             }<br>
          </blockquote>
        </div>
      </div>
    </blockquote>
  </body>
</html>