mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-10 22:54:11 +08:00
ba58d1216e
The only domains allocated forces use of a single window. Remove all the code related to multiple window support, as well as the need for qman_portal to force a single window. Remove the now unused DOMAIN_ATTR_WINDOWS iommu_attr. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Will Deacon <will@kernel.org> Acked-by: Li Yang <leoyang.li@nxp.com> Link: https://lore.kernel.org/r/20210401155256.298656-6-hch@lst.de Signed-off-by: Joerg Roedel <jroedel@suse.de>
56 lines
1.3 KiB
C
56 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
*
|
|
* Copyright (C) 2013 Freescale Semiconductor, Inc.
|
|
*/
|
|
|
|
#ifndef __FSL_PAMU_DOMAIN_H
|
|
#define __FSL_PAMU_DOMAIN_H
|
|
|
|
#include "fsl_pamu.h"
|
|
|
|
struct dma_window {
|
|
phys_addr_t paddr;
|
|
u64 size;
|
|
int valid;
|
|
int prot;
|
|
};
|
|
|
|
struct fsl_dma_domain {
|
|
/*
|
|
* win_arr contains information of the configured
|
|
* windows for a domain.
|
|
*/
|
|
struct dma_window win_arr[1];
|
|
/* list of devices associated with the domain */
|
|
struct list_head devices;
|
|
/* dma_domain states:
|
|
* mapped - A particular mapping has been created
|
|
* within the configured geometry.
|
|
* enabled - DMA has been enabled for the given
|
|
* domain. This translates to setting of the
|
|
* valid bit for the primary PAACE in the PAMU
|
|
* PAACT table. Domain geometry should be set and
|
|
* it must have a valid mapping before DMA can be
|
|
* enabled for it.
|
|
*
|
|
*/
|
|
int mapped;
|
|
int enabled;
|
|
/* stash_id obtained from the stash attribute details */
|
|
u32 stash_id;
|
|
struct pamu_stash_attribute dma_stash;
|
|
u32 snoop_id;
|
|
struct iommu_domain iommu_domain;
|
|
spinlock_t domain_lock;
|
|
};
|
|
|
|
/* domain-device relationship */
|
|
struct device_domain_info {
|
|
struct list_head link; /* link to domain siblings */
|
|
struct device *dev;
|
|
u32 liodn;
|
|
struct fsl_dma_domain *domain; /* pointer to domain */
|
|
};
|
|
#endif /* __FSL_PAMU_DOMAIN_H */
|