QNX下启动TF驱动和EMMC驱动的说明

来源:互联网 发布:怎么把mac照片导入u盘 编辑:程序博客网 时间:2024/06/07 07:13

 QNX下启动TF驱动和EMMC驱动的说明

在QNX下,启动相关的服务都是放置在build配置文件中的。我的开发板用的是TF卡,相对应于SD卡是没有WP管脚(写保护)的,仅仅存在CD(card select)管脚。启动服务的脚本如下:

#because we use TFcard not SD card, so we do not need to config the WP options
devb-sdmmc-mx6 cam pnp,verbose blk rw,cache=2M sdio addr=0x02194000,irq=55,bs=cd_base=0x0209c000:cd_pin=4 disk name=sd2
#"cd_base", /* GPIO base address for the CD pin */   "cd_irq", /* Interrupt vector for GPIO CD pin */  "cd_pin"
#"wp_base", /* GPIO base address for the WP pin */
# devb-sdmmc-mx6 cam pnp,verbose blk rw,cache=2M sdio addr=0x02194000,irq=55,bs=cd_base=0x020a0000:cd_pin=15 disk name=sd2
# devb-sdmmc-mx6 cam pnp,verbose blk rw,cache=2M sdio addr=0x02194000,irq=55,bs=cd=0x020a0000^15^335:wp=0x0209c000^13^173 disk name=sd2

display_msg Starting Emmc driver...
devb-sdmmc-mx6 cam pnp,verbose blk rw,cache=5M sdio addr=0x0219C000,irq=57 disk name=emmc
waitfor /dev/emmc0t12 3
mount -t dos /dev/emmc0t12 /emmc

options:
-cam: common access method.其参数主要有pnp,verbose等等,具体可以查看《Utilities refercence》
-blk:the blk control io-blk.so, for more information, see io-blk.so. 主要参数有rw,cache,读写权限和缓存大小。
-sdio:描述的当前硬件管脚的配置,sd的基地址和终端号,bs表示当前的Board Specific options,具体描述信息如下:

/*
 * Board Specific options can be passed through command line arguments or syspage optstr attribute,
 * but the syspage way is recommended since it can pass different options to different uSDHC contollers
 * Example of the BS options: bs=cd_irq=165:cd_base=0x0209C000:cd_pin=5:vdd1_8
 * -- CD pin is GPIO1[5] (GPIO1 Base: 0x0209C000)
 * -- IRQ for GPIO1[5] is 165
 * -- 1.8v is supported
 * Also please note that the optstr passed from syspage can be overwritten by the SDMMC command line arguments
 *
 * Notes:
 * CD_BASE=base, CD_PIN=pin, CD_IRQ=irq can be replaced by one single option: CD=base^pin^irq
 * WP_BASE=base, WP_PIN=pin can be replaced by one single option: WP=base^pin
 * For example:
 * cd=0x020a0000^0^192 is equavalent to cd_base=0x020a0000:cd_pin=0:cd_irq=192
 * wp=0x020a0000^1 is equavalent to wp_base=0x020a0000:wp_pin=1
 */

原创粉丝点击