iommu/tegra: gart: Integrate with Memory Controller driver
The device-tree binding has been changed. There is no separate GART device anymore, it is squashed into the Memory Controller. Integrate GART module with the MC in a way it is done for the SMMU on Tegra30+. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:

committed by
Joerg Roedel

parent
45594c683e
commit
ce2785a75d
@@ -9,6 +9,7 @@
|
||||
#ifndef __SOC_TEGRA_MC_H__
|
||||
#define __SOC_TEGRA_MC_H__
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/reset-controller.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -77,6 +78,7 @@ struct tegra_smmu_soc {
|
||||
|
||||
struct tegra_mc;
|
||||
struct tegra_smmu;
|
||||
struct gart_device;
|
||||
|
||||
#ifdef CONFIG_TEGRA_IOMMU_SMMU
|
||||
struct tegra_smmu *tegra_smmu_probe(struct device *dev,
|
||||
@@ -96,6 +98,28 @@ static inline void tegra_smmu_remove(struct tegra_smmu *smmu)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TEGRA_IOMMU_GART
|
||||
struct gart_device *tegra_gart_probe(struct device *dev, struct tegra_mc *mc);
|
||||
int tegra_gart_suspend(struct gart_device *gart);
|
||||
int tegra_gart_resume(struct gart_device *gart);
|
||||
#else
|
||||
static inline struct gart_device *
|
||||
tegra_gart_probe(struct device *dev, struct tegra_mc *mc)
|
||||
{
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
static inline int tegra_gart_suspend(struct gart_device *gart)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int tegra_gart_resume(struct gart_device *gart)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct tegra_mc_reset {
|
||||
const char *name;
|
||||
unsigned long id;
|
||||
@@ -144,6 +168,7 @@ struct tegra_mc_soc {
|
||||
struct tegra_mc {
|
||||
struct device *dev;
|
||||
struct tegra_smmu *smmu;
|
||||
struct gart_device *gart;
|
||||
void __iomem *regs;
|
||||
struct clk *clk;
|
||||
int irq;
|
||||
|
Reference in New Issue
Block a user