Skip to content

Commit

Permalink
iommu/ipmmu-vmsa: Add support for R-Car Gen4
Browse files Browse the repository at this point in the history
Add support for R-Car Gen4 like r8a779f0 (R-Car S4-8). The IPMMU
hardware design of r8a779f0 is the same as r8a779a0. So, rename
"r8a779a0" to "rcar_gen4".

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
shimoday authored and joergroedel committed Feb 14, 2022
1 parent da9f838 commit ae684ca
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/iommu/ipmmu-vmsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ static int ipmmu_init_platform_device(struct device *dev,

static const struct soc_device_attribute soc_needs_opt_in[] = {
{ .family = "R-Car Gen3", },
{ .family = "R-Car Gen4", },
{ .family = "RZ/G2", },
{ /* sentinel */ }
};
Expand All @@ -743,7 +744,7 @@ static bool ipmmu_device_is_allowed(struct device *dev)
unsigned int i;

/*
* R-Car Gen3 and RZ/G2 use the allow list to opt-in devices.
* R-Car Gen3/4 and RZ/G2 use the allow list to opt-in devices.
* For Other SoCs, this returns true anyway.
*/
if (!soc_device_match(soc_needs_opt_in))
Expand Down Expand Up @@ -926,7 +927,7 @@ static const struct ipmmu_features ipmmu_features_rcar_gen3 = {
.utlb_offset_base = 0,
};

static const struct ipmmu_features ipmmu_features_r8a779a0 = {
static const struct ipmmu_features ipmmu_features_rcar_gen4 = {
.use_ns_alias_offset = false,
.has_cache_leaf_nodes = true,
.number_of_contexts = 16,
Expand Down Expand Up @@ -982,7 +983,10 @@ static const struct of_device_id ipmmu_of_ids[] = {
.data = &ipmmu_features_rcar_gen3,
}, {
.compatible = "renesas,ipmmu-r8a779a0",
.data = &ipmmu_features_r8a779a0,
.data = &ipmmu_features_rcar_gen4,
}, {
.compatible = "renesas,rcar-gen4-ipmmu",
.data = &ipmmu_features_rcar_gen4,
}, {
/* Terminator */
},
Expand Down

0 comments on commit ae684ca

Please sign in to comment.