亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dma

?? linux-2.4.29操作系統的源碼
??
字號:
Support functions for the SA11x0 internal DMA channels======================================================Nicolas Pitre <nico@cam.org>Last updated: 2001/07/15The DMA controller consists of six independent DMA channels. Each channelcan be configured to service any of the serial controllers. Two channelsare required to service a full-duplex serial controller. The DMAcontroller is intended to relieve the processor of the interrupt overheadin servicing these ports with programmed I/ O.If desired, any or all peripherals (except the UDC) may be serviced withprogrammed I/ O instead of DMA. Each peripheral is capable of requestingprocessor service through its own interrupt lines or through a DMArequest.A set of functions is provided to support drivers working with DMA buffersthrough a generic interface for (wishfully) all DMA usages.  Thosefunctions will take care of buffer queueing and splitting, DMA registermanagement, interrupt handling, etc.SA11x0 DMA API--------------Here is the description for the DMA API.int sa1100_request_dma( dmach_t *channel, const char *device_id,			dma_device_t device );This function will search for a free DMA channel and returns the channelnumber in '*channel'.  'device_id' should point to a string identifyingthe DMA usage or device (mainly for /proc).  'device' is the SA11x0peripheral's ports.  Note that reading from a port and writing to thesame port are actually considered as two different streams requiringtwo DMA channels with their own device type.  All possible dma_device_tare defined in include/asm-arm/arch-sa1100/dma.h.  If no channel isavailable, or if the desired device is already in use by another DMAchannel, then an error code is returned.  This function must be calledbefore any other DMA calls.int sa1100_dma_queue_buffer( dmach_t channel, void *buf_id,                             dma_addr_t data, int size );This function enqueue the specified buffer for DMA processing.  The bufferwill be transmitted or filled with incoming data depending on the channelconfiguration made through sa1100_dma_set_device().  If the queue isempty, DMA starts immediately on the given buffer.Arguments are:dmach_t channel:	the channel number.void *buf_id:		a buffer identification known by the caller.dma_addr_t data:	the buffer's physical address.int size:		the buffer size in bytes.Note here the dma_addr_t which is not the same as the virtual address asreturned by kmalloc() and friends.  The DMA controller must be given aphysical address to a buffer which is not cached bye the CPU data cache.To get such address, the DMA mapping functions (seeDocumentation/DMA-mapping.txt) are recommended.  The only relevantfunctions are pci_alloc_consistent(), pci_map_single() and their unmapcounterparts.  The PCI dev argument is NULL of course.There is no restriction on the buffer size.  The DMA code will split it upinternally to acommodate the DMA controller as needed.  If the buffercan't be enqueued the appropriate error code is returned.int sa1100_dma_set_callback( dmach_t channel, dma_callback_t cb );As soon as the DMa completes with a buffer, a callback function is used tonotify the driver which would have registered one.  The callback functionis prototyped as:void dma_callback( void *buf_id, int size );The 'buf_id' argument is the buffer identifier as passed tosa1100_dma_queue_buffer().  The 'size' argument is the number of bytes theDMA processed (should be the same as the buffer size).Note that this callback function is called while in interrupt context.So it has to be small and efficient while posponing more complexprocessing to a bottom-half function or similar.  Allrestrictions for interrupt handlers still apply.int sa1100_dma_get_current( dmach_t channel, void **buf_id,                            dma_addr_t *addr );This returns the buffer ID and the DMA address pointer within the buffercurrently being processed.  If no such buffer is currently processed, anerror code is returned.  This is useful for mmap()'ed buffers like inaudio drivers.int sa1100_dma_stop( dmach_t channel );This call stops any DMA transfer on the given channel.int sa1100_dma_resume( dmach_t channel );This call resumes a DMA transfer which would have been stopped throughsa1100_dma_stop().int sa1100_dma_flush_all( dmach_t channel );This completely flushes all queued buffers and on-going DMA transfers on agiven channel.  The next enqueued buffer following this call will beprocessed right away.int sa1100_dma_set_spin( dmach_t channel, dma_addr_t addr, int size );Because there is at least one device out there that uses its receivesignal for its transmit clock reference, we need a mecanism to make theDMA "spin" on a certain buffer for when there is no more actual buffer toprocess.  The 'addr' argument is the physical memory address to use, andthe 'size' argument determines the spin DMA chunk.  This size can't belarger than 8191 (if so, it is clamped to 4096).  When the size is 0,the spin function is turned off.When activated, DMA will "spin" until there is any buffer in the queue.The current DMA chunk will terminate before a newly queued buffer isprocessed.  The spin buffer will only be reused when there is no moreacctual buffer to process.It is important not to choose a too small 'size' value since it willgreatly increase the interrupt load required to restart the spin.  Sincethis feature will typically be used on transmit DMAs, and because a bufferfull of zeros is probably the best thing to spin out, the 'addr' argumentmay well be used with FLUSH_BASE_PHYS for which no allocation nor memorybus request are needed.The spinning DMA is affected by sa1100_dma_stop() and sa1100_dma_resume()but not bu sa1100_dma_flush_all().void sa1100_free_dma( dmach_t channel );This clears all activities on a given DMA channel and releases it forfuture requests.Buffer allocation-----------------Like mentionned above, it is the driver's responsibility to allocate, freeand keep track of buffer space with dma_addr_t type addresses. However thedriver must not change the state of any buffer after it has been sent tosa1100-dma_queue_buffer().  When that function has been called, the bufferbecomes the DMA's ownership until one of these events occur:- The callback function is called by the DMA code with a buffer ID to  indicate that DMA processing terminated on that buffer.  Then the  driver owns the buffer again.- The sa1100-dma_flush_all() function is called by the driver at which  point *all* queued buffers are owned by the driver again.- The sa1100-free_dma() does the same as sa1100-dma_flush_all().This doesn't mean that you can't change the content of a queued buffer inconjonction with the usage of pci_map_consistent() andsa1100_dma_get_current()... but then you must be sure you know what you'redoing (this doesn't work with pci_map_single()).Examples--------A real example of audio ring buffers is implemented in thedrivers/sound/sa1100-audio.c driver.  The SA1110 USB client and theSA11x0 FIR drivers are also using this interface to implement packetizedDMA.A transmit DMA for network packets could look like this (largely simplified):struct sk_buff *tx_ring_skb[RING_SIZE];dma_addr_t      tx_ring_dma[RING_SIZE];int cur_tx;...transmit function:	tx_ring_skb[cur_tx] = skb;	tx_ring_dma[cur_tx] = pci_map_single(NULL, skb->data, skb->len,	                                     PCI_DMA_TODEVICE);	sa1100_dma_queue_buffer(channel, (void*)cur_tx,	                        tx_ring_dma[cur_tx], skb->len);	cur_tx++; cur_tx %= RING_SIZE;	...and the callback function:void tx_done_callback( void *buf_id, int size ) {	int done_tx = (int) buf_id;	struct sk_buff *skb = tx_ring_skb[done_tx];	pci_unmap_single(NULL, tx_ring_dma[done_tx], skb->len,	                 PCI_DMA_TODEVICE);	stats.tx_packets++;	stats.tx_bytes += size;	dev_kfree_skb_irq(skb);	tx_ring_skb[done_tx] = NULL;}For drivers expecting variable length packets i.e. USB client, it isnecessary to register the appropriate IRQ to be notified when the receiveris idle, the packet is complete, etc.  We could use one buffer at a timewith its ID being the virtual address of the buffer.Then the sequence:	/* be sure DMA won't continue under our feet */	sa1100_dma_stop(channel);	/* get the actual DMA length */	sa1100_get_current(channel, &data, &dma_ptr);	/* acquire ownership for the buffer */	sa1100_dma_flush_all(channel);	/* unmap the DMA buffer (actually doing cache coherency on ARM) */	pci_unmap_single (NULL, dma_addr, MAX_PKT_SIZE, PCI_DMA_FROMDEVICE);	/* get remaining bytes from the fifo */	ptr = data + dma_ptr - dma_addr;	while (fifo_not_empty)		*ptr++ = get_byte_from_fifo;	/* feed another free buffer for the next packet */	dma_addr2 = pci_map_single(NULL, data2, MAX_PKT_SIZE,					PCI_DMA_FROMDEVICE);	sa1100_dma_queue_buffer(channel, data2, dma_addr2, MAX_PKT_SIZE);	/* process the current packet */	...might do the trick.  This looks a bit ugly but that's a starting point forimprovements.TODO----- Create kernel-doc comments in the source to document the API and  let the documentation be generated automatically.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品麻豆久久久| 国内精品久久久久影院一蜜桃| 青青草97国产精品免费观看 | 狠狠色狠狠色综合系列| 色综合一个色综合| 国产午夜精品在线观看| 日本vs亚洲vs韩国一区三区二区| 97国产精品videossex| 久久精品日产第一区二区三区高清版| 亚洲午夜久久久久中文字幕久| 国产成人精品网址| 日韩免费高清av| 亚洲成人第一页| 91久久久免费一区二区| 国产精品久久一卡二卡| 狠狠色综合色综合网络| 欧美一区二区视频在线观看2022| 一区二区三区在线播| 色综合天天综合网国产成人综合天| 久久久久久久免费视频了| 久久66热re国产| 日韩一区二区高清| 日韩av电影免费观看高清完整版| 精品视频免费在线| 亚洲国产成人porn| 欧美写真视频网站| 亚洲国产一二三| 欧美亚洲另类激情小说| 亚洲愉拍自拍另类高清精品| 色噜噜久久综合| 亚洲国产日韩a在线播放性色| 一本大道久久a久久综合| 一区二区三区日韩欧美| 欧美性xxxxxx少妇| 水蜜桃久久夜色精品一区的特点 | 午夜精品福利在线| 欧美图片一区二区三区| 亚洲综合视频网| 91精品国产综合久久久久久久 | 看电视剧不卡顿的网站| 日韩欧美一卡二卡| 国内精品不卡在线| 国产精品人人做人人爽人人添| 福利电影一区二区三区| 日韩毛片一二三区| 欧美怡红院视频| 蜜芽一区二区三区| 久久综合av免费| 成人成人成人在线视频| 亚洲国产综合色| 91精品国产91久久久久久最新毛片| 蜜桃av噜噜一区二区三区小说| 欧美白人最猛性xxxxx69交| 国产乱人伦偷精品视频不卡| 综合电影一区二区三区| 欧美日韩国产123区| 国产乱码精品一品二品| 亚洲欧美日韩精品久久久久| 欧美日本一区二区| 国产乱人伦精品一区二区在线观看| 《视频一区视频二区| 欧美日韩另类一区| 国产精品一级黄| 亚洲第一主播视频| 久久久一区二区| 欧美综合在线视频| 国产美女精品人人做人人爽| 亚洲欧美一区二区久久| 精品盗摄一区二区三区| 一本到一区二区三区| 久久成人18免费观看| 亚洲美腿欧美偷拍| 久久视频一区二区| 欧美日韩一区二区欧美激情| 国产精品亚洲综合一区在线观看| 艳妇臀荡乳欲伦亚洲一区| 精品国产一二三区| 欧洲av一区二区嗯嗯嗯啊| 国产精品456| 丝袜美腿亚洲一区二区图片| 亚洲图片你懂的| 精品乱码亚洲一区二区不卡| 欧美伊人久久大香线蕉综合69| 国产在线看一区| 视频在线在亚洲| 亚洲精品日日夜夜| 国产精品每日更新| 欧美白人最猛性xxxxx69交| 欧美丝袜自拍制服另类| 不卡影院免费观看| 国产真实乱偷精品视频免| 天堂久久久久va久久久久| 亚洲免费av高清| 18欧美亚洲精品| 国产精品天干天干在线综合| 精品福利一二区| 精品国产一区二区国模嫣然| 666欧美在线视频| 欧美午夜精品久久久久久超碰| 99视频一区二区| 粉嫩av一区二区三区在线播放| 麻豆精品在线观看| 日韩av高清在线观看| 午夜欧美大尺度福利影院在线看| 亚洲免费在线视频| 亚洲欧洲无码一区二区三区| 国产精品欧美综合在线| 久久综合视频网| 久久久久久97三级| 久久久一区二区三区捆绑**| 26uuu国产日韩综合| 精品理论电影在线观看 | 欧美一级xxx| 欧美精品vⅰdeose4hd| 精品视频1区2区3区| 欧美视频中文字幕| 欧美精三区欧美精三区| 欧美高清激情brazzers| 欧美乱妇15p| 欧美一区二区播放| 日韩一卡二卡三卡四卡| 欧美成人精品3d动漫h| 久久影院电视剧免费观看| 久久综合给合久久狠狠狠97色69| 久久久www免费人成精品| 中文文精品字幕一区二区| 国产精品成人免费在线| 国产精品国产三级国产三级人妇 | 欧美一级黄色片| 欧美成人综合网站| 国产日韩精品一区二区三区在线| 中文幕一区二区三区久久蜜桃| 中文字幕人成不卡一区| 午夜私人影院久久久久| 久久精品国产精品亚洲红杏| 国产寡妇亲子伦一区二区| 91猫先生在线| 69成人精品免费视频| 久久婷婷一区二区三区| 国产精品天干天干在观线| 亚洲精品成a人| 香蕉久久夜色精品国产使用方法 | 99精品黄色片免费大全| 欧美亚洲禁片免费| 2023国产精华国产精品| 亚洲欧洲av一区二区三区久久| 亚洲一区二区三区精品在线| 九九视频精品免费| 成人黄色在线看| 欧美福利一区二区| 亚洲国产精品成人综合色在线婷婷| 亚洲乱码国产乱码精品精的特点| 日韩成人伦理电影在线观看| 国产成人av自拍| 欧美精品自拍偷拍| 中文字幕制服丝袜成人av| 水野朝阳av一区二区三区| 成人开心网精品视频| 91精品免费观看| 亚洲欧美日韩国产一区二区三区| 日本91福利区| 色婷婷综合久久久| 久久久不卡影院| 奇米在线7777在线精品| 色综合久久综合网97色综合| 精品国产免费久久| 亚洲午夜私人影院| 99国产一区二区三精品乱码| 精品国产亚洲一区二区三区在线观看| 一区二区三区成人| 成人av小说网| 亚洲精品在线电影| 肉丝袜脚交视频一区二区| 91丨九色丨尤物| 国产性天天综合网| 裸体健美xxxx欧美裸体表演| 在线观看视频一区二区欧美日韩| 欧美韩国日本一区| 国产在线播放一区三区四| 欧美日本一道本| 亚洲美女少妇撒尿| 91视频免费看| 欧美国产日韩亚洲一区| 国内精品国产三级国产a久久| 91精品在线观看入口| 亚洲午夜av在线| 欧美午夜在线一二页| 亚洲三级电影全部在线观看高清| 国产成人av网站| 久久久久久久久久久久久久久99 | 另类的小说在线视频另类成人小视频在线 | 欧美色视频在线观看| 亚洲人成网站精品片在线观看| 成人黄色在线视频| 成人欧美一区二区三区1314| 成人av网站在线观看免费| 国产精品人成在线观看免费| 成人在线视频首页| 国产精品三级电影| www.欧美日韩|