2 * Copyright (C) 2014 NVIDIA Corporation
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
9 #ifndef __SOC_TEGRA_MC_H__
10 #define __SOC_TEGRA_MC_H__
12 #include <linux/types.h>
18 struct tegra_smmu_enable
{
23 struct tegra_mc_timing
{
29 /* latency allowance */
37 struct tegra_mc_client
{
42 unsigned int fifo_size
;
44 struct tegra_smmu_enable smmu
;
45 struct tegra_mc_la la
;
48 struct tegra_smmu_swgroup
{
54 struct tegra_smmu_soc
{
55 const struct tegra_mc_client
*clients
;
56 unsigned int num_clients
;
58 const struct tegra_smmu_swgroup
*swgroups
;
59 unsigned int num_swgroups
;
61 bool supports_round_robin_arbitration
;
62 bool supports_request_limit
;
64 unsigned int num_tlb_lines
;
65 unsigned int num_asids
;
71 #ifdef CONFIG_TEGRA_IOMMU_SMMU
72 struct tegra_smmu
*tegra_smmu_probe(struct device
*dev
,
73 const struct tegra_smmu_soc
*soc
,
75 void tegra_smmu_remove(struct tegra_smmu
*smmu
);
77 static inline struct tegra_smmu
*
78 tegra_smmu_probe(struct device
*dev
, const struct tegra_smmu_soc
*soc
,
84 static inline void tegra_smmu_remove(struct tegra_smmu
*smmu
)
90 const struct tegra_mc_client
*clients
;
91 unsigned int num_clients
;
93 const unsigned long *emem_regs
;
94 unsigned int num_emem_regs
;
96 unsigned int num_address_bits
;
97 unsigned int atom_size
;
101 const struct tegra_smmu_soc
*smmu
;
106 struct tegra_smmu
*smmu
;
111 const struct tegra_mc_soc
*soc
;
114 struct tegra_mc_timing
*timings
;
115 unsigned int num_timings
;
118 void tegra_mc_write_emem_configuration(struct tegra_mc
*mc
, unsigned long rate
);
119 unsigned int tegra_mc_get_emem_device_count(struct tegra_mc
*mc
);
121 #endif /* __SOC_TEGRA_MC_H__ */