Change-Id: I22fcf6be63aebe76417a470975c6c10bbc3ed92a
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
static int __init rockchip_iommu_init_driver(void)
{
static int __init rockchip_iommu_init_driver(void)
{
+ struct device_node *np;
+ np = of_find_matching_node(NULL, iommu_dt_ids);
+ if (!np) {
+ pr_err("Failed to find legacy iommu devices\n");
+ return -ENODEV;
+ }
+
lv2table_kmem_cache = kmem_cache_create("rk-iommu-lv2table",
LV2TABLE_SIZE, LV2TABLE_SIZE,
0, NULL);
lv2table_kmem_cache = kmem_cache_create("rk-iommu-lv2table",
LV2TABLE_SIZE, LV2TABLE_SIZE,
0, NULL);