]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: gk20a: Improve PMU error stats
authorNeil Gabriel <ngabriel@nvidia.com>
Mon, 21 Oct 2013 16:01:00 +0000 (11:01 -0500)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Tue, 22 Oct 2013 06:22:23 +0000 (23:22 -0700)
To debug FECS-related PMU EXTERR failures, it is necessary to
know the internal FECS error code. This value is stored in
PWR_PMU_BAR0_ERROR upon failure. This change reads that register
and reports its value in PMU error stat messages.

Change-Id: Idefb5312568dfcead478ca237197c801e37fe966
Signed-off-by: Neil Gabriel <ngabriel@nvidia.com>
Reviewed-on: http://git-master/r/301840
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/video/tegra/host/gk20a/hw_pwr_gk20a.h
drivers/video/tegra/host/gk20a/pmu_gk20a.c

index bdce0a510847053ec93d714007948c29d3e82162..4e91e01c092a6678efe530f7601fd2f860d0b76f 100644 (file)
@@ -658,6 +658,10 @@ static inline u32 pwr_pmu_bar0_timeout_r(void)
 {
        return 0x0010a7a8;
 }
+static inline u32 pwr_pmu_bar0_fecs_error_r(void)
+{
+       return 0x0010a988;
+}
 static inline u32 pwr_pmu_bar0_error_status_r(void)
 {
        return 0x0010a7b0;
index 51817afd66090ad3b11c5414cc512c5c1535a14e..a6ae2238344d124e8f554b09bb886f3eb7f57dcd 100644 (file)
@@ -2146,6 +2146,9 @@ static void pmu_dump_falcon_stats(struct pmu_gk20a *pmu)
                        gk20a_readl(g, pwr_pmu_bar0_ctl_r()));
        }
 
+       i = gk20a_readl(g, pwr_pmu_bar0_fecs_error_r());
+       nvhost_err(dev_from_gk20a(g), "pwr_pmu_bar0_fecs_error_r : 0x%x", i);
+
        i = gk20a_readl(g, pwr_falcon_exterrstat_r());
        nvhost_err(dev_from_gk20a(g), "pwr_falcon_exterrstat_r : 0x%x", i);
        if (pwr_falcon_exterrstat_valid_v(i) ==