*参照元 [#u3ee02e4]
#backlinks

*説明 [#qa8f99a1]
-パス: [[linux-4.4.1/drivers/iommu/of_iommu.c]]

-FIXME: これは何?
--説明


**引数 [#s54a04c5]
-struct device *dev
--
--[[linux-4.4.1/device]]
-struct device_node *master_np
--
--[[linux-4.4.1/device_node]]


**返り値 [#eddf5b07]
-struct iommu_ops *
--
--[[linux-4.4.1/iommu_ops]]


**参考 [#a0e34340]


*実装 [#xb0adf40]
 struct iommu_ops *of_iommu_configure(struct device *dev,
 				     struct device_node *master_np)
 {
 	struct of_phandle_args iommu_spec;
 	struct device_node *np;
 	struct iommu_ops *ops = NULL;
 	int idx = 0;
 
-
--[[linux-4.4.1/of_phandle_args]]

 	/*
 	 * We can't do much for PCI devices without knowing how
 	 * device IDs are wired up from the PCI bus to the IOMMU.
 	 */
 	if (dev_is_pci(dev))
 		return NULL;
 
-
--[[linux-4.4.1/dev_is_pci()]]

 	/*
 	 * We don't currently walk up the tree looking for a parent IOMMU.
 	 * See the `Notes:' section of
 	 * Documentation/devicetree/bindings/iommu/iommu.txt
 	 */
 	while (!of_parse_phandle_with_args(master_np, "iommus",
 					   "#iommu-cells", idx,
 					   &iommu_spec)) {
-
--[[linux-4.4.1/of_parse_phandle_with_args()]]

 		np = iommu_spec.np;
 		ops = of_iommu_get_ops(np);
 
-
--[[linux-4.4.1/of_iommu_get_ops()]]

 		if (!ops || !ops->of_xlate || ops->of_xlate(dev, &iommu_spec))
 			goto err_put_node;
 
 		of_node_put(np);
 		idx++;
-
--[[linux-4.4.1/of_node_put()]]

 	}
 
 	return ops;
 
 err_put_node:
 	of_node_put(np);
 	return NULL;
 }


*コメント [#c98896ea]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS