include/soc/tegra/mc.h

Source file repositories/reference/linux-study-clean/include/soc/tegra/mc.h

File Facts

System
Linux kernel
Corpus path
include/soc/tegra/mc.h
Extension
.h
Size
6844 bytes
Lines
290
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct tegra_mc_timing {
	unsigned long rate;

	u32 *emem_data;
};

struct tegra_mc_client {
	unsigned int id;
	unsigned int bpmp_id;
	enum tegra_icc_client_type type;
	const char *name;
	/*
	 * For Tegra210 and earlier, this is the SWGROUP ID used for IOVA translations in the
	 * Tegra SMMU, whereas on Tegra186 and later this is the ID used to override the ARM SMMU
	 * stream ID used for IOVA translations for the given memory client.
	 */
	union {
		unsigned int swgroup;
		unsigned int sid;
	};

	unsigned int fifo_size;

	struct {
		/* Tegra SMMU enable (Tegra210 and earlier) */
		struct {
			unsigned int reg;
			unsigned int bit;
		} smmu;

		/* latency allowance */
		struct {
			unsigned int reg;
			unsigned int shift;
			unsigned int mask;
			unsigned int def;
		} la;

		/* stream ID overrides (Tegra186 and later) */
		struct {
			unsigned int override;
			unsigned int security;
		} sid;
	} regs;
};

struct tegra_smmu_swgroup {
	const char *name;
	unsigned int swgroup;
	unsigned int reg;
};

struct tegra_smmu_group_soc {
	const char *name;
	const unsigned int *swgroups;
	unsigned int num_swgroups;
};

struct tegra_smmu_soc {
	const struct tegra_mc_client *clients;
	unsigned int num_clients;

	const struct tegra_smmu_swgroup *swgroups;
	unsigned int num_swgroups;

	const struct tegra_smmu_group_soc *groups;
	unsigned int num_groups;

	bool supports_round_robin_arbitration;
	bool supports_request_limit;

	unsigned int num_tlb_lines;
	unsigned int num_asids;
};

struct tegra_mc;
struct tegra_smmu;

#ifdef CONFIG_TEGRA_IOMMU_SMMU
struct tegra_smmu *tegra_smmu_probe(struct device *dev,
				    const struct tegra_smmu_soc *soc,
				    struct tegra_mc *mc);
void tegra_smmu_remove(struct tegra_smmu *smmu);
#else
static inline struct tegra_smmu *
tegra_smmu_probe(struct device *dev, const struct tegra_smmu_soc *soc,
		 struct tegra_mc *mc)
{
	return NULL;
}

Annotation

Implementation Notes