These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / memory / tegra / tegra30.c
index f422b18..b447378 100644 (file)
@@ -9,8 +9,6 @@
 #include <linux/of.h>
 #include <linux/mm.h>
 
-#include <asm/cacheflush.h>
-
 #include <dt-bindings/memory/tegra30-mc.h>
 
 #include "mc.h"
@@ -918,36 +916,22 @@ static const struct tegra_mc_client tegra30_mc_clients[] = {
 };
 
 static const struct tegra_smmu_swgroup tegra30_swgroups[] = {
-       { .swgroup = TEGRA_SWGROUP_DC,   .reg = 0x240 },
-       { .swgroup = TEGRA_SWGROUP_DCB,  .reg = 0x244 },
-       { .swgroup = TEGRA_SWGROUP_EPP,  .reg = 0x248 },
-       { .swgroup = TEGRA_SWGROUP_G2,   .reg = 0x24c },
-       { .swgroup = TEGRA_SWGROUP_MPE,  .reg = 0x264 },
-       { .swgroup = TEGRA_SWGROUP_VI,   .reg = 0x280 },
-       { .swgroup = TEGRA_SWGROUP_AFI,  .reg = 0x238 },
-       { .swgroup = TEGRA_SWGROUP_AVPC, .reg = 0x23c },
-       { .swgroup = TEGRA_SWGROUP_NV,   .reg = 0x268 },
-       { .swgroup = TEGRA_SWGROUP_NV2,  .reg = 0x26c },
-       { .swgroup = TEGRA_SWGROUP_HDA,  .reg = 0x254 },
-       { .swgroup = TEGRA_SWGROUP_HC,   .reg = 0x250 },
-       { .swgroup = TEGRA_SWGROUP_PPCS, .reg = 0x270 },
-       { .swgroup = TEGRA_SWGROUP_SATA, .reg = 0x278 },
-       { .swgroup = TEGRA_SWGROUP_VDE,  .reg = 0x27c },
-       { .swgroup = TEGRA_SWGROUP_ISP,  .reg = 0x258 },
-};
-
-static void tegra30_flush_dcache(struct page *page, unsigned long offset,
-                                size_t size)
-{
-       phys_addr_t phys = page_to_phys(page) + offset;
-       void *virt = page_address(page) + offset;
-
-       __cpuc_flush_dcache_area(virt, size);
-       outer_flush_range(phys, phys + size);
-}
-
-static const struct tegra_smmu_ops tegra30_smmu_ops = {
-       .flush_dcache = tegra30_flush_dcache,
+       { .name = "dc",   .swgroup = TEGRA_SWGROUP_DC,   .reg = 0x240 },
+       { .name = "dcb",  .swgroup = TEGRA_SWGROUP_DCB,  .reg = 0x244 },
+       { .name = "epp",  .swgroup = TEGRA_SWGROUP_EPP,  .reg = 0x248 },
+       { .name = "g2",   .swgroup = TEGRA_SWGROUP_G2,   .reg = 0x24c },
+       { .name = "mpe",  .swgroup = TEGRA_SWGROUP_MPE,  .reg = 0x264 },
+       { .name = "vi",   .swgroup = TEGRA_SWGROUP_VI,   .reg = 0x280 },
+       { .name = "afi",  .swgroup = TEGRA_SWGROUP_AFI,  .reg = 0x238 },
+       { .name = "avpc", .swgroup = TEGRA_SWGROUP_AVPC, .reg = 0x23c },
+       { .name = "nv",   .swgroup = TEGRA_SWGROUP_NV,   .reg = 0x268 },
+       { .name = "nv2",  .swgroup = TEGRA_SWGROUP_NV2,  .reg = 0x26c },
+       { .name = "hda",  .swgroup = TEGRA_SWGROUP_HDA,  .reg = 0x254 },
+       { .name = "hc",   .swgroup = TEGRA_SWGROUP_HC,   .reg = 0x250 },
+       { .name = "ppcs", .swgroup = TEGRA_SWGROUP_PPCS, .reg = 0x270 },
+       { .name = "sata", .swgroup = TEGRA_SWGROUP_SATA, .reg = 0x278 },
+       { .name = "vde",  .swgroup = TEGRA_SWGROUP_VDE,  .reg = 0x27c },
+       { .name = "isp",  .swgroup = TEGRA_SWGROUP_ISP,  .reg = 0x258 },
 };
 
 static const struct tegra_smmu_soc tegra30_smmu_soc = {
@@ -959,7 +943,6 @@ static const struct tegra_smmu_soc tegra30_smmu_soc = {
        .supports_request_limit = false,
        .num_tlb_lines = 16,
        .num_asids = 4,
-       .ops = &tegra30_smmu_ops,
 };
 
 const struct tegra_mc_soc tegra30_mc_soc = {
@@ -967,5 +950,6 @@ const struct tegra_mc_soc tegra30_mc_soc = {
        .num_clients = ARRAY_SIZE(tegra30_mc_clients),
        .num_address_bits = 32,
        .atom_size = 16,
+       .client_id_mask = 0x7f,
        .smmu = &tegra30_smmu_soc,
 };