]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arm: tegra: mc: Parse DT prop
authorAlex Waterman <alexw@nvidia.com>
Wed, 22 Oct 2014 01:32:03 +0000 (18:32 -0700)
committerKrishna Reddy <vdumpa@nvidia.com>
Fri, 24 Oct 2014 22:24:47 +0000 (15:24 -0700)
Parse a dt property that until now was being ignored. This property
specifies the number of interrupt bits in the MC and is used for
limiting a for loop that prints out errors seen on all the MC
clients. When the interrupt count was 0, it appeared as though the
MC was not recording any errors.

Bug 200046934

Change-Id: I266e3b1eef62219be9cb80541944b83073dbeb2a
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/560120
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
drivers/platform/tegra/mc/mcerr.c

index 8f04810fac586f6ea3075e7cce2bcbca1771fbd0..2364d990f28a234fbfafa55deda5e20973a302b7 100644 (file)
@@ -460,6 +460,14 @@ int tegra_mcerr_init(struct dentry *mc_parent, struct platform_device *pdev)
        mc_int_mask = be32_to_cpup(prop);
        mc_writel(mc_int_mask, MC_INT_MASK);
 
+       prop = of_get_property(pdev->dev.of_node, "int_count", NULL);
+       if (!prop) {
+               pr_err("No int_count prop for mcerr!\n");
+               return -EINVAL;
+       }
+
+       mc_intr_count = be32_to_cpup(prop);
+
        mcerr_debugfs_dir = debugfs_create_dir("err", mc_parent);
        if (mcerr_debugfs_dir == NULL) {
                pr_err("Failed to make debugfs node: %ld\n",