cregit-Linux how code gets into the kernel

Release 4.11 drivers/iommu/mtk_iommu.h

Directory: drivers/iommu
/*
 * Copyright (c) 2015-2016 MediaTek Inc.
 * Author: Honghui Zhang <honghui.zhang@mediatek.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef _MTK_IOMMU_H_

#define _MTK_IOMMU_H_

#include <linux/clk.h>
#include <linux/component.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/iommu.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <soc/mediatek/smi.h>

#include "io-pgtable.h"


struct mtk_iommu_suspend_reg {
	
u32				standard_axi_mode;
	
u32				dcm_dis;
	
u32				ctrl_reg;
	
u32				int_control0;
	
u32				int_main_control;
};

struct mtk_iommu_domain;


struct mtk_iommu_data {
	
void __iomem			*base;
	
int				irq;
	
struct device			*dev;
	
struct clk			*bclk;
	
phys_addr_t			protect_base; /* protect memory base */
	
struct mtk_iommu_suspend_reg	reg;
	
struct mtk_iommu_domain		*m4u_dom;
	
struct iommu_group		*m4u_group;
	
struct mtk_smi_iommu		smi_imu;      /* SMI larb iommu info */
	
bool                            enable_4GB;

	
struct iommu_device		iommu;
};


static inline int compare_of(struct device *dev, void *data) { return dev->of_node == data; }

Contributors

PersonTokensPropCommitsCommitProp
Honghui Zhang2295.65%150.00%
Joerg Roedel14.35%150.00%
Total23100.00%2100.00%


static inline void release_of(struct device *dev, void *data) { of_node_put(data); }

Contributors

PersonTokensPropCommitsCommitProp
Russell King21100.00%1100.00%
Total21100.00%1100.00%


static inline int mtk_iommu_bind(struct device *dev) { struct mtk_iommu_data *data = dev_get_drvdata(dev); return component_bind_all(dev, &data->smi_imu); }

Contributors

PersonTokensPropCommitsCommitProp
Honghui Zhang3296.97%150.00%
Joerg Roedel13.03%150.00%
Total33100.00%2100.00%


static inline void mtk_iommu_unbind(struct device *dev) { struct mtk_iommu_data *data = dev_get_drvdata(dev); component_unbind_all(dev, &data->smi_imu); }

Contributors

PersonTokensPropCommitsCommitProp
Honghui Zhang3196.88%150.00%
Joerg Roedel13.12%150.00%
Total32100.00%2100.00%

#endif

Overall Contributors

PersonTokensPropCommitsCommitProp
Honghui Zhang19387.33%125.00%
Russell King219.50%125.00%
Joerg Roedel73.17%250.00%
Total221100.00%4100.00%
Directory: drivers/iommu
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.