*参照元 [#g0e6520d]
#backlinks

*説明 [#vf2bc497]
-パス: [[linux-2.6.33/]]
-パス: [[linux-2.6.33/arch/arm/include/asm/dma-mapping.h]]

-FIXME: これは何?
--説明


**引数 [#r3694a8f]
-struct device *dev
--
--[[linux-2.6.33/device]]
-void *cpu_addr
--
-size_t size
--
-enum dma_data_direction dir
--
--[[linux-2.6.33/dma_data_direction]]


**返り値 [#v8194eeb]
-dma_addr_t
--


**参考 [#s25d81ec]


*実装 [#j09d92e2]
 /**
  * dma_map_single - map a single buffer for streaming DMA
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @cpu_addr: CPU direct mapped address of buffer
  * @size: size of buffer to map
  * @dir: DMA transfer direction
  *
  * Ensure that any data held in the cache is appropriately discarded
  * or written back.
  *
  * The device owns this memory once this call has completed.  The CPU
  * can regain ownership by calling dma_unmap_single() or
  * dma_sync_single_for_cpu().
  */
 static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr,
 		size_t size, enum dma_data_direction dir)
 {
 	BUG_ON(!valid_dma_direction(dir));
 
-
--[[linux-2.6.33/BUG_ON()]]
--[[linux-2.6.33/valid_dma_direction()]]

 	if (!arch_is_coherent())
 		dma_cache_maint(cpu_addr, size, dir);
 
-
--[[linux-2.6.33/arch_is_coherent()]]
--[[linux-2.6.33/dma_cache_main()]]

 	return virt_to_dma(dev, cpu_addr);
-
--[[linux-2.6.33/virt_to_dma()]]

 }


*コメント [#k68ebab1]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS