These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / memory / tegra / tegra114.c
index 16c4d26..ba8fff3 100644 (file)
@@ -9,8 +9,6 @@
 #include <linux/of.h>
 #include <linux/mm.h>
 
-#include <asm/cacheflush.h>
-
 #include <dt-bindings/memory/tegra114-mc.h>
 
 #include "mc.h"
@@ -896,36 +894,22 @@ static const struct tegra_mc_client tegra114_mc_clients[] = {
 };
 
 static const struct tegra_smmu_swgroup tegra114_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_AVPC,      .reg = 0x23c },
-       { .swgroup = TEGRA_SWGROUP_NV,        .reg = 0x268 },
-       { .swgroup = TEGRA_SWGROUP_HDA,       .reg = 0x254 },
-       { .swgroup = TEGRA_SWGROUP_HC,        .reg = 0x250 },
-       { .swgroup = TEGRA_SWGROUP_MSENC,     .reg = 0x264 },
-       { .swgroup = TEGRA_SWGROUP_PPCS,      .reg = 0x270 },
-       { .swgroup = TEGRA_SWGROUP_VDE,       .reg = 0x27c },
-       { .swgroup = TEGRA_SWGROUP_VI,        .reg = 0x280 },
-       { .swgroup = TEGRA_SWGROUP_ISP,       .reg = 0x258 },
-       { .swgroup = TEGRA_SWGROUP_XUSB_HOST, .reg = 0x288 },
-       { .swgroup = TEGRA_SWGROUP_XUSB_DEV,  .reg = 0x28c },
-       { .swgroup = TEGRA_SWGROUP_TSEC,      .reg = 0x294 },
-};
-
-static void tegra114_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 tegra114_smmu_ops = {
-       .flush_dcache = tegra114_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 = "avpc",      .swgroup = TEGRA_SWGROUP_AVPC,      .reg = 0x23c },
+       { .name = "nv",        .swgroup = TEGRA_SWGROUP_NV,        .reg = 0x268 },
+       { .name = "hda",       .swgroup = TEGRA_SWGROUP_HDA,       .reg = 0x254 },
+       { .name = "hc",        .swgroup = TEGRA_SWGROUP_HC,        .reg = 0x250 },
+       { .name = "msenc",     .swgroup = TEGRA_SWGROUP_MSENC,     .reg = 0x264 },
+       { .name = "ppcs",      .swgroup = TEGRA_SWGROUP_PPCS,      .reg = 0x270 },
+       { .name = "vde",       .swgroup = TEGRA_SWGROUP_VDE,       .reg = 0x27c },
+       { .name = "vi",        .swgroup = TEGRA_SWGROUP_VI,        .reg = 0x280 },
+       { .name = "isp",       .swgroup = TEGRA_SWGROUP_ISP,       .reg = 0x258 },
+       { .name = "xusb_host", .swgroup = TEGRA_SWGROUP_XUSB_HOST, .reg = 0x288 },
+       { .name = "xusb_dev",  .swgroup = TEGRA_SWGROUP_XUSB_DEV,  .reg = 0x28c },
+       { .name = "tsec",      .swgroup = TEGRA_SWGROUP_TSEC,      .reg = 0x294 },
 };
 
 static const struct tegra_smmu_soc tegra114_smmu_soc = {
@@ -937,7 +921,6 @@ static const struct tegra_smmu_soc tegra114_smmu_soc = {
        .supports_request_limit = false,
        .num_tlb_lines = 32,
        .num_asids = 4,
-       .ops = &tegra114_smmu_ops,
 };
 
 const struct tegra_mc_soc tegra114_mc_soc = {
@@ -945,5 +928,6 @@ const struct tegra_mc_soc tegra114_mc_soc = {
        .num_clients = ARRAY_SIZE(tegra114_mc_clients),
        .num_address_bits = 32,
        .atom_size = 32,
+       .client_id_mask = 0x7f,
        .smmu = &tegra114_smmu_soc,
 };