~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/soc/apple/sart.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only OR MIT */
  2 /*
  3  * Apple SART device driver
  4  * Copyright (C) The Asahi Linux Contributors
  5  *
  6  * Apple SART is a simple address filter for DMA transactions.
  7  * Regions of physical memory must be added to the SART's allow
  8  * list before any DMA can target these. Unlike a proper
  9  * IOMMU no remapping can be done.
 10  */
 11 
 12 #ifndef _LINUX_SOC_APPLE_SART_H_
 13 #define _LINUX_SOC_APPLE_SART_H_
 14 
 15 #include <linux/device.h>
 16 #include <linux/err.h>
 17 #include <linux/types.h>
 18 
 19 struct apple_sart;
 20 
 21 /*
 22  * Get a reference to the SART attached to dev.
 23  *
 24  * Looks for the phandle reference in apple,sart and returns a pointer
 25  * to the corresponding apple_sart struct to be used with
 26  * apple_sart_add_allowed_region and apple_sart_remove_allowed_region.
 27  */
 28 struct apple_sart *devm_apple_sart_get(struct device *dev);
 29 
 30 /*
 31  * Adds the region [paddr, paddr+size] to the DMA allow list.
 32  *
 33  * @sart: SART reference
 34  * @paddr: Start address of the region to be used for DMA
 35  * @size: Size of the region to be used for DMA.
 36  */
 37 int apple_sart_add_allowed_region(struct apple_sart *sart, phys_addr_t paddr,
 38                                   size_t size);
 39 
 40 /*
 41  * Removes the region [paddr, paddr+size] from the DMA allow list.
 42  *
 43  * Note that exact same paddr and size used for apple_sart_add_allowed_region
 44  * have to be passed.
 45  *
 46  * @sart: SART reference
 47  * @paddr: Start address of the region no longer used for DMA
 48  * @size: Size of the region no longer used for DMA.
 49  */
 50 int apple_sart_remove_allowed_region(struct apple_sart *sart, phys_addr_t paddr,
 51                                      size_t size);
 52 
 53 #endif /* _LINUX_SOC_APPLE_SART_H_ */
 54 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php