/** * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved. * * This source file is released under GPL v2 license (no other versions). * See the COPYING file included in the main directory of this source * distribution for the license terms and conditions. * * @File ctvmem.h * * @Brief * This file contains the definition of virtual memory management object * for card device. * * @Author Liu Chun * @Date Mar 28 2008 */ #ifndef CTVMEM_H #define CTVMEM_H #define CT_PTP_NUM 4 /* num of device page table pages */ #include #include #include #include /* The chip can handle the page table of 4k pages * (emu20k1 can handle even 8k pages, but we don't use it right now) */ #define CT_PAGE_SIZE 4096 #define CT_PAGE_SHIFT 12 #define CT_PAGE_MASK (~(PAGE_SIZE - 1)) #define CT_PAGE_ALIGN(addr) ALIGN(addr, CT_PAGE_SIZE) struct ct_vm_block { unsigned int addr; /* starting logical addr of this block */ unsigned int size; /* size of this device virtual mem block */ struct list_head list; }; struct snd_pcm_substream; /* Virtual memory management object for card device */ struct ct_vm { struct snd_dma_buffer ptp[CT_PTP_NUM]; /* Device page table pages */ unsigned int size; /* Available addr space in bytes */ struct list_head unused; /* List of unused blocks */ struct list_head used; /* List of used blocks */ struct mutex lock; /* Map host addr (kmalloced/vmalloced) to device logical addr. */ struct ct_vm_block *(*map)(struct ct_vm *, struct snd_pcm_substream *, int size); /* Unmap device logical addr area. */ void (*unmap)(struct ct_vm *, struct ct_vm_block *block); dma_addr_t (*get_ptp_phys)(struct ct_vm *vm, int index); }; int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci); void ct_vm_destroy(struct ct_vm *vm); #endif /* CTVMEM_H */ git.cgi/linux/net-next.git/tree/sound/soc/codecs/adau-utils.c?h=nds-private-remove&id=1bae6c99decf9137069646b593d3439171a8a8e2'>treecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-30 22:05:52 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-30 22:05:52 -0500
commit1bae6c99decf9137069646b593d3439171a8a8e2 (patch)
tree431604a568cd2303973470de326bd9731370a025 /sound/soc/codecs/adau-utils.c
parent63c190429020a9701b42887ac22c28f287f1762f (diff)
parent2b2d3eb41c920b47df2fcedd1489cf748bd09466 (diff)
Merge branch 'sh_eth-E-DMAC-interrupt-mask-cleanups'
Sergei Shtylyov says: ==================== sh_eth: E-DMAC interrupt mask cleanups Here's a set of 3 patches against DaveM's 'net-next.git' repo. The main goal of this set is to stop using the bare numbers for the E-DMAC interrupt masks. [1/3] sh_eth: rename EESIPR bits [2/3] sh_eth: add missing EESIPR bits [3/3] sh_eth: stop using bare numbers for EESIPR values ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/soc/codecs/adau-utils.c')