<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processorsのトピックmxc_mmc_force_detect usage</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/mxc-mmc-force-detect-usage/m-p/341358#M46877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have an IMX53 based platform running Android Gingerbread, Linux kernel 2.6.35.&lt;/P&gt;&lt;P&gt;I'm trying to force the mmc stack to detect and process the removal and insertion of an SDIO card via a software mechanism as opposed to a hardware mechanism. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looked like the function mxc_mmc_force_detect was doing just that and would forcing the card detect handler to run and detect the presence/absence of the card. It does not appear to work as I expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14115522258579548 jive_text_macro jive_macro_code" jivemacro_uid="_14115522258579548" modifiedtitle="true"&gt;
&lt;P&gt;void mxc_mmc_force_detect(int id)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct sdhci_host *host;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((id &amp;lt; 0) || (id &amp;gt;= MXC_SDHCI_NUM))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!mxc_fix_chips[id])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; host = mxc_fix_chips[id]-&amp;gt;hosts[0];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (host-&amp;gt;detect_irq)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; schedule_work(&amp;amp;host-&amp;gt;cd_wq);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the function is called, mxc_fix_chips[id] is zero and so it simply returns at this point. Secondly host-&amp;gt;detect_irq is non zero and so it would also return here.&lt;/P&gt;&lt;P&gt;So it looks like this only schedules the handler when in a certain state. Can anyone explain what this function does and when it should be called? Is this the appropriate function to achieve what I want or is there another way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Sep 2014 10:30:54 GMT</pubDate>
    <dc:creator>bdp42</dc:creator>
    <dc:date>2014-09-24T10:30:54Z</dc:date>
    <item>
      <title>mxc_mmc_force_detect usage</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mxc-mmc-force-detect-usage/m-p/341358#M46877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have an IMX53 based platform running Android Gingerbread, Linux kernel 2.6.35.&lt;/P&gt;&lt;P&gt;I'm trying to force the mmc stack to detect and process the removal and insertion of an SDIO card via a software mechanism as opposed to a hardware mechanism. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looked like the function mxc_mmc_force_detect was doing just that and would forcing the card detect handler to run and detect the presence/absence of the card. It does not appear to work as I expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14115522258579548 jive_text_macro jive_macro_code" jivemacro_uid="_14115522258579548" modifiedtitle="true"&gt;
&lt;P&gt;void mxc_mmc_force_detect(int id)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct sdhci_host *host;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((id &amp;lt; 0) || (id &amp;gt;= MXC_SDHCI_NUM))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!mxc_fix_chips[id])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; host = mxc_fix_chips[id]-&amp;gt;hosts[0];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (host-&amp;gt;detect_irq)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; schedule_work(&amp;amp;host-&amp;gt;cd_wq);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the function is called, mxc_fix_chips[id] is zero and so it simply returns at this point. Secondly host-&amp;gt;detect_irq is non zero and so it would also return here.&lt;/P&gt;&lt;P&gt;So it looks like this only schedules the handler when in a certain state. Can anyone explain what this function does and when it should be called? Is this the appropriate function to achieve what I want or is there another way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 10:30:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mxc-mmc-force-detect-usage/m-p/341358#M46877</guid>
      <dc:creator>bdp42</dc:creator>
      <dc:date>2014-09-24T10:30:54Z</dc:date>
    </item>
  </channel>
</rss>

