参照元

説明

引数

返り値

参考

実装

static int __init arm_smmu_init(void)
{
	struct device_node *np;
	int ret;
	/*
	 * Play nice with systems that don't have an ARM SMMU by checking that
	 * an ARM SMMU exists in the system before proceeding with the driver
	 * and IOMMU bus operation registration.
	 */
	np = of_find_matching_node(NULL, arm_smmu_of_match);
	if (!np)
		return 0;
	of_node_put(np);
	ret = platform_driver_register(&arm_smmu_driver);
	if (ret)
		return ret;
	/* Oh, for a proper bus abstraction */
	if (!iommu_present(&platform_bus_type))
		bus_set_iommu(&platform_bus_type, &arm_smmu_ops);
#ifdef CONFIG_ARM_AMBA
	if (!iommu_present(&amba_bustype))
		bus_set_iommu(&amba_bustype, &arm_smmu_ops);
#endif

#ifdef CONFIG_PCI
	if (!iommu_present(&pci_bus_type))
		bus_set_iommu(&pci_bus_type, &arm_smmu_ops);
#endif

	return 0;
}

...

subsys_initcall(arm_smmu_init);

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS