4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
8 * Copyright (C) 2005-2010 Texas Instruments, Inc.
10 * This package is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 #include <plat/iommu.h>
23 #include <plat/iovmm.h>
26 * dsp_mmu_init() - initialize dsp_mmu module and returns a handle
28 * This function initialize dsp mmu module and returns a struct iommu
29 * handle to use it for dsp maps.
32 struct iommu *dsp_mmu_init(void);
35 * dsp_mmu_exit() - destroy dsp mmu module
36 * @mmu: Pointer to iommu handle.
38 * This function destroys dsp mmu module.
41 void dsp_mmu_exit(struct iommu *mmu);
44 * user_to_dsp_map() - maps user to dsp virtual address
45 * @mmu: Pointer to iommu handle.
46 * @uva: Virtual user space address.
48 * @size Buffer size to map.
49 * @usr_pgs struct page array pointer where the user pages will be stored
51 * This function maps a user space buffer into DSP virtual address.
54 u32 user_to_dsp_map(struct iommu *mmu, u32 uva, u32 da, u32 size,
55 struct page **usr_pgs);
58 * user_to_dsp_unmap() - unmaps DSP virtual buffer.
59 * @mmu: Pointer to iommu handle.
62 * This function unmaps a user space buffer into DSP virtual address.
65 int user_to_dsp_unmap(struct iommu *mmu, u32 da);