打印
[i.MX]

imx6q saber linux sd卡cd检测脚更改

[复制链接]
1751|10
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
whc880715|  楼主 | 2015-6-24 13:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
哪位哥们能帮忙解决这个问题,sd卡的cd检测,怎么更改,原来好像是个中断,检测上升沿或者下降沿,我想更改cd检测的极性,就是低是不插卡,高时插卡状态,没找到在哪里更改。

相关帖子

沙发
alloy518| | 2015-6-24 14:22 | 只看该作者
http://www.efgedu.net/
http://www.efgedu.net/sitemap.html
http://www.efgedu.net/gznsmtyjzx/10.html
http://www.efgedu.net/gznsmtyjzx/11.html
http://www.efgedu.net/gznsmtyjzx/12.html
http://www.efgedu.net/gznsmtyjzx/18.html
http://www.efgedu.net/gznsmtyjzx/19.html
http://www.efgedu.net/gznsmtyjzx/2.html
http://www.efgedu.net/gznsmtyjzx/20.html
http://www.efgedu.net/gznsmtyjzx/21.html
http://www.efgedu.net/gznsmtyjzx/22.html
http://www.efgedu.net/gznsmtyjzx/23.html
http://www.efgedu.net/gznsmtyjzx/24.html
http://www.efgedu.net/gznsmtyjzx/25.html
http://www.efgedu.net/gznsmtyjzx/26.html
http://www.efgedu.net/gznsmtyjzx/27.html
http://www.efgedu.net/gznsmtyjzx/28.html
http://www.efgedu.net/gznsmtyjzx/29.html
http://www.efgedu.net/gznsmtyjzx/3.html
http://www.efgedu.net/gznsmtyjzx/4.html
http://www.efgedu.net/gznsmtyjzx/5.html
http://www.efgedu.net/gznsmtyjzx/6.html
http://www.efgedu.net/gznsmtyjzx/7.html
http://www.efgedu.net/gznsmtyjzx/70.html
http://www.efgedu.net/gznsmtyjzx/71.html
http://www.efgedu.net/gznsmtyjzx/72.html
http://www.efgedu.net/gznsmtyjzx/73.html
http://www.efgedu.net/gznsmtyjzx/74.html
http://www.efgedu.net/gznsmtyjzx/75.html
http://www.efgedu.net/gznsmtyjzx/76.html
http://www.efgedu.net/gznsmtyjzx/77.html
http://www.efgedu.net/gznsmtyjzx/78.html
http://www.efgedu.net/gznsmtyjzx/79.html
http://www.efgedu.net/gznsmtyjzx/8.html
http://www.efgedu.net/gznsmtyjzx/80.html
http://www.efgedu.net/gznsmtyjzx/81.html
http://www.efgedu.net/gznsmtyjzx/82.html
http://www.efgedu.net/gznsmtyjzx/9.html
http://www.jsmingze.net/
http://www.jsmingze.net/gzzlmtzhdyy/10.html
http://www.jsmingze.net/gzzlmtzhdyy/11.html
http://www.jsmingze.net/gzzlmtzhdyy/12.html
http://www.jsmingze.net/gzzlmtzhdyy/13.html
http://www.jsmingze.net/gzzlmtzhdyy/2.html
http://www.jsmingze.net/gzzlmtzhdyy/3.html
http://www.jsmingze.net/gzzlmtzhdyy/4.html
http://www.jsmingze.net/gzzlmtzhdyy/46.html
http://www.jsmingze.net/gzzlmtzhdyy/47.html
http://www.jsmingze.net/gzzlmtzhdyy/48.html
http://www.jsmingze.net/gzzlmtzhdyy/49.html
http://www.jsmingze.net/gzzlmtzhdyy/5.html
http://www.jsmingze.net/gzzlmtzhdyy/50.html
http://www.jsmingze.net/gzzlmtzhdyy/51.html
http://www.jsmingze.net/gzzlmtzhdyy/6.html
http://www.jsmingze.net/gzzlmtzhdyy/7.html
http://www.jsmingze.net/gzzlmtzhdyy/8.html
http://www.jsmingze.net/gzzlmtzhdyy/9.html
http://www.air-yckc.com/
http://www.air-yckc.com/kangfuanli/
http://www.air-yckc.com/kangfuanli/19.html
http://www.air-yckc.com/kangfuanli/20.html
http://www.air-yckc.com/kangfuanli/21.html
http://www.air-yckc.com/kangfuanli/22.html
http://www.air-yckc.com/kangfuanli/23.html
http://www.air-yckc.com/kangfuanli/24.html
http://www.air-yckc.com/lianxiwm/
http://www.air-yckc.com/meitibd/
http://www.air-yckc.com/meitibd/38.html
http://www.air-yckc.com/meitibd/39.html
http://www.air-yckc.com/meitibd/40.html
http://www.air-yckc.com/meitibd/41.html
http://www.air-yckc.com/meitibd/42.html
http://www.air-yckc.com/meitibd/43.html
http://www.air-yckc.com/miantan/
http://www.air-yckc.com/mtby/34.html
http://www.air-yckc.com/mtby/35.html
http://www.air-yckc.com/mtby/36.html
http://www.air-yckc.com/mtby/37.html
http://www.air-yckc.com/mtcs/12.html
http://www.air-yckc.com/mtcs/13.html
http://www.air-yckc.com/mtcs/14.html
http://www.air-yckc.com/mtcs/15.html
http://www.air-yckc.com/mtcs/25.html
http://www.air-yckc.com/mtzl/26.html
http://www.air-yckc.com/mtzl/27.html
http://www.air-yckc.com/mtzl/28.html
http://www.air-yckc.com/mtzl/29.html
http://www.air-yckc.com/mtzl/30.html
http://www.air-yckc.com/mtzl/31.html
http://www.air-yckc.com/mtzl/44.html
http://www.air-yckc.com/mtzl/45.html
http://www.air-yckc.com/teseliaofa/
http://www.air-yckc.com/teseliaofa/2.html
http://www.air-yckc.com/teseliaofa/3.html
http://www.air-yckc.com/teseliaofa/4.html
http://www.air-yckc.com/teseliaofa/5.html
http://www.air-yckc.com/xjsb/
http://www.air-yckc.com/yiyuangk/
http://www.air-yckc.com/yiyuangk/1.html
http://www.air-yckc.com/yiyuanxw/
http://www.air-yckc.com/yiyuanxw/10.html
http://www.air-yckc.com/yiyuanxw/100.html
http://www.air-yckc.com/yiyuanxw/11.html
http://www.air-yckc.com/yiyuanxw/17.html
http://www.air-yckc.com/yiyuanxw/18.html
http://www.air-yckc.com/yiyuanxw/6.html
http://www.air-yckc.com/yiyuanxw/7.html
http://www.air-yckc.com/yiyuanxw/8.html
http://www.air-yckc.com/yiyuanxw/88.html
http://www.air-yckc.com/yiyuanxw/89.html
http://www.air-yckc.com/yiyuanxw/9.html
http://www.air-yckc.com/yiyuanxw/90.html
http://www.air-yckc.com/yiyuanxw/91.html
http://www.air-yckc.com/yiyuanxw/92.html
http://www.air-yckc.com/yiyuanxw/93.html
http://www.air-yckc.com/yiyuanxw/94.html
http://www.air-yckc.com/yiyuanxw/95.html
http://www.air-yckc.com/yiyuanxw/96.html
http://www.air-yckc.com/yiyuanxw/97.html
http://www.air-yckc.com/yiyuanxw/98.html
http://www.air-yckc.com/yiyuanxw/99.html
http://www.air-yckc.com/zhuanjiatd/
http://www.air-yckc.com/zhuanjiatd/32.html
http://www.air-yckc.com/zhuanjiatd/33.html

使用特权

评论回复
板凳
mini1986| | 2015-6-24 17:19 | 只看该作者
board-xxxx.c和board-xxxx.h,xxxx是你用的板子名或者你们copy的哪个板子......

使用特权

评论回复
地板
史迪威将军| | 2015-6-24 20:33 | 只看该作者
没有用过这个呢

使用特权

评论回复
5
FSL_TICS_Rita| | 2015-7-10 17:34 | 只看该作者
楼主你好,请问你帖中问题是否已经解决呢?
非常感谢你关于i.mx 的技术问题。如果你没有其他问题,我们将此帖默认为已解决。
如果没有欢迎继续在这里讨论交流哈~~

使用特权

评论回复
6
小狗爱吃骨头| | 2015-7-12 21:58 | 只看该作者
alloy518 发表于 2015-6-24 14:22
http://www.efgedu.net/
http://www.efgedu.net/sitemap.html
http://www.efgedu.net/gznsmtyjzx/10.html

没怎么用过,不太熟悉

使用特权

评论回复
7
奥德赛| | 2015-7-13 09:38 | 只看该作者
这个得改底下的驱动了吧,好像不太麻烦

使用特权

评论回复
8
iMalody| | 2015-7-17 13:16 | 只看该作者
可以参考如下代码 (drivers/mmc/host/sdhci-esdhc-imx.c),修改判断 gpio_get_value(boarddata->cd_gpio)的值:

        if (unlikely(reg == SDHCI_PRESENT_STATE)) {
                if (boarddata && boarddata->always_present)
                        val |= SDHCI_CARD_PRESENT;
                else if        (imx_data->flags & ESDHC_FLAG_GPIO_FOR_CD_WP) {
                        if (boarddata && gpio_is_valid(boarddata->cd_gpio)
                                        && gpio_get_value(boarddata->cd_gpio))
                                /* no card, if a valid gpio says so */
                                val &= ~SDHCI_CARD_PRESENT;
                        else
                                /* in all other cases assume card is present */
                                val |= SDHCI_CARD_PRESENT;
                }
        }

使用特权

评论回复
9
mini1986| | 2015-7-21 09:44 | 只看该作者
暂时没有这么调过,不过看上去,楼上正解......

使用特权

评论回复
10
fisherboy| | 2017-8-21 18:55 | 只看该作者
您好,请问您是怎么改的?

使用特权

评论回复
11
fisherboy| | 2017-8-21 18:57 | 只看该作者
iMalody 发表于 2015-7-17 13:16
可以参考如下代码 (drivers/mmc/host/sdhci-esdhc-imx.c),修改判断 gpio_get_value(boarddata->cd_gpio) ...

上升沿检测的话,是不是将val&=~SDHCI_CARD_PRESENT;和val |= SDHCI_CARD_PRESENT;调换一下就可以了?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

5

主题

22

帖子

0

粉丝