GNU Linux-libre 4.9-gnu1
[releases.git] / drivers / staging / fsl-mc / bus / fsl-mc-private.h
1 /*
2  * Freescale Management Complex (MC) bus private declarations
3  *
4  * Copyright (C) 2016 Freescale Semiconductor, Inc.
5  *
6  * This file is licensed under the terms of the GNU General Public
7  * License version 2. This program is licensed "as is" without any
8  * warranty of any kind, whether express or implied.
9  */
10 #ifndef _FSL_MC_PRIVATE_H_
11 #define _FSL_MC_PRIVATE_H_
12
13 int __must_check fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
14                                    struct fsl_mc_io *mc_io,
15                                    struct device *parent_dev,
16                                    struct fsl_mc_device **new_mc_dev);
17
18 void fsl_mc_device_remove(struct fsl_mc_device *mc_dev);
19
20 int __init dprc_driver_init(void);
21
22 void dprc_driver_exit(void);
23
24 int __init fsl_mc_allocator_driver_init(void);
25
26 void fsl_mc_allocator_driver_exit(void);
27
28 int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus,
29                                           enum fsl_mc_pool_type pool_type,
30                                           struct fsl_mc_resource
31                                                           **new_resource);
32
33 void fsl_mc_resource_free(struct fsl_mc_resource *resource);
34
35 int fsl_mc_msi_domain_alloc_irqs(struct device *dev,
36                                  unsigned int irq_count);
37
38 void fsl_mc_msi_domain_free_irqs(struct device *dev);
39
40 int __init its_fsl_mc_msi_init(void);
41
42 void its_fsl_mc_msi_cleanup(void);
43
44 int __must_check fsl_create_mc_io(struct device *dev,
45                                   phys_addr_t mc_portal_phys_addr,
46                                   u32 mc_portal_size,
47                                   struct fsl_mc_device *dpmcp_dev,
48                                   u32 flags, struct fsl_mc_io **new_mc_io);
49
50 void fsl_destroy_mc_io(struct fsl_mc_io *mc_io);
51
52 #endif /* _FSL_MC_PRIVATE_H_ */