mm: cache-pl310-erp: Add support for PL310 Error Reporting

PL310 is an external L2 Cache controller which reports
any errors such as decode on master/slave, read/write
parity errors on data/tag RAM using the L2CC interrupt
connected to the processor.
Once we receive interrupt we can read the status register
to determine the type of error occurred.

Change-Id: I66957d4bbd67a11b2bffbf919cf5aa177b5d2ebc
Signed-off-by: Taniya Das <tdas@codeaurora.org>
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index cb245ee..e351eb0 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -880,6 +880,16 @@
 	  This option enables optimisations for the PL310 cache
 	  controller.
 
+config CACHE_PL310_ERP
+	tristate "PL310 CACHE Error Reporting"
+	depends on CACHE_PL310
+	help
+	  Say 'Y' here to enable reporting of external L2 cache errors.
+	  This feature can be used as a system debugging technique if cache
+	  corruption is suspected.
+	  Cache error statistics will also be reported in sysfs
+	  /sys/devices/platform/pl310_erp/cache_erp
+
 config CACHE_TAUROS2
 	bool "Enable the Tauros2 L2 cache controller"
 	depends on (ARCH_DOVE || ARCH_MMP || CPU_PJ4)