iommu/fsl_pamu: replace DOMAIN_ATTR_FSL_PAMU_STASH with a direct call
[linux-2.6-microblaze.git] / drivers / iommu / fsl_pamu_domain.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  *
4  * Copyright (C) 2013 Freescale Semiconductor, Inc.
5  */
6
7 #ifndef __FSL_PAMU_DOMAIN_H
8 #define __FSL_PAMU_DOMAIN_H
9
10 #include "fsl_pamu.h"
11
12 struct fsl_dma_domain {
13         /* list of devices associated with the domain */
14         struct list_head                devices;
15         /* dma_domain states:
16          * enabled - DMA has been enabled for the given
17          * domain. This translates to setting of the
18          * valid bit for the primary PAACE in the PAMU
19          * PAACT table. Domain geometry should be set and
20          * it must have a valid mapping before DMA can be
21          * enabled for it.
22          *
23          */
24         int                             enabled;
25         u32                             stash_id;
26         u32                             snoop_id;
27         struct iommu_domain             iommu_domain;
28         spinlock_t                      domain_lock;
29 };
30
31 /* domain-device relationship */
32 struct device_domain_info {
33         struct list_head link;  /* link to domain siblings */
34         struct device *dev;
35         u32 liodn;
36         struct fsl_dma_domain *domain; /* pointer to domain */
37 };
38 #endif  /* __FSL_PAMU_DOMAIN_H */