freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

mmcsd卡驅(qū)動程序設(shè)計通信10123趙翔(編輯修改稿)

2024-09-24 17:53 本頁面
 

【文章內(nèi)容簡介】 C/SD 卡模塊注冊初始化 : static int __devinit mmc_pxa_module_init( void ) { int ret = ENODEV。 ifdef CONFIG_ARCH_RAMSES RAMSES_MMC_ON()。 udelay(1000)。 endif host = mmc_register( MMC_REG_TYPE_HOST, amp。pxa_mmc_controller_tmpl_rec, sizeof( pxa_mmc_hostdata_rec_t ) )。//register the SD device if ( !host ) { MMC_DEBUG( MMC_DEBUG_LEVEL0, failed to register with MMC core\n )。 goto error。 } ret = 0。 error: return ret。 } 設(shè)備文件操作接口定義 static mmc_controller_tmpl_rec_t pxa_mmc_controller_tmpl_rec = { owner: THIS_MODULE, name: PXA250, block_size_max: PXA_MMC_BLKSZ_MAX, nob_max: PXA_MMC_NOB_MAX, probe: pxa_mmc_probe, init: pxa_mmc_init, remove: __devexit_p( pxa_mmc_remove ), update_acq: pxa_mmc_update_acq, init_card_stack: pxa_mmc_init_card_stack, check_card_stack: pxa_mmc_check_card_stack, setup_card: pxa_mmc_setup_card, stream_read: pxa_mmc_stream_read, read_block: pxa_mmc_read_block, read_mblock: pxa_mmc_read_mblock, stream_write: pxa_mmc_stream_write, write_block: pxa_mmc_write_block, write_mblock: pxa_mmc_write_mblock }。 16 MMC 接口初始化 static int pxa_mmc_init( mmc_controller_t ctrlr ) { int ret = ENODEV。 pxa_mmc_hostdata_t hostdata = (pxa_mmc_hostdata_t)ctrlrhost_data。 /* 1. allocate buffer */ hostdata = kmalloc( PXA_MMC_IODATA_SIZE, GFP_ATOMIC )。//2K if ( !hostdata ) { ret = ENOMEM。 goto error。 } /* 2. initialize iobuf */ hostdata = PXA_MMC_BLKSZ_MAX。 /* current block size in bytes 1024* / hostdata = PXA_MMC_IODATA_SIZE。/* buffer size for each transfer */ hostdata = PXA_MMC_BLOCKS_PER_BUFFER。 /* number of blocks */ /* 3 request irq */ if ( request_irq( IRQ_MMC, pxa_mmc_irq, 0, MMC, ctrlr ) ) { MMC_ERROR( failed to request IRQ_MMC\n )。 goto error。 } /* 4 init GPIO about MMC/SD/SDIO*/ init_gpio( )。 CKEN |= CKEN12_MMC。 /* enable MMC unit clock */ ret = 0。 goto out。 error: kfree( hostdata )。 out: return ret。 } GPIO 初始化函數(shù) static void init_gpio(void) { GPCR1 |= 0x1。 //clear pin32 GPDR1 = GPDR1 | (10)。 //config pin32 as output GAFR1_L = (GAFR1_Lamp。0xfffffffc) | (20)。//) pin32 is used for function 2MMCLK //MMDAT0 PIN92 GPSR2 |= 0x10000000。//pin92 configured as an output, set pin level high (one). 17 GPDR2 |= 0x10000000。//pin92 as output // GPDR2 = GPDR2 amp。 ~(128) 。 GAFR2_U = (GAFR2_U amp。 0xfcffffff) | (124) 。//pin32 is used for function 1MMDAT0 //MMDAT1 PIN109 GPSR3 |= (113)。 GPDR3 |= (113)。 GAFR3_L = (GAFR3_L amp。 0xf3ffffff) | (126) 。 //MMDAT2 PIN110 GPSR3 |= (114)。 GPDR3 |= (114)。 GAFR3_L = (GAFR3_L amp。 0xcfffffff) | (128)。 //MMDAT3 PIN111 GPSR3 |= (115)。 GPDR3 |= (115)。 GAFR3_L = (GAFR3_L amp。 0x3fffffff) | (130)。 //MMCMD PIN112 GPSR3 |= 0x00010000。 GPDR3 |= 0x00010000。 //GPDR3 = GPDR3 amp。 ~(116)。 GAFR3_U = (GAFR3_U amp。 0xfffffffc) | (10)。 //function1 GPSR3 |= 0x0000e000。//PIN111PIN109 GPDR3 |= 0x0000e000。 GAFR3_L = (GAFR3_L amp。 0x03ffffff) | 0x54000000。 }
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1