kernel/msm: tz: Add msm_device_tz_log device
msm_devcie_tz_log is a debugfs module that displays
the contents of a buffer located in IMEM. The contents
of this hold diagnostic information logged in by modules
running on secure domain.
This patch enables this tz_log debugfs module for 8974
target device by setting CONFIG_MSM_TZ_LOG
Change-Id: If3cdee4da6febb539516595dfcd50e69f0940ee4
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-copper.c b/arch/arm/mach-msm/board-copper.c
index d33f478..cf24ef0 100644
--- a/arch/arm/mach-msm/board-copper.c
+++ b/arch/arm/mach-msm/board-copper.c
@@ -390,6 +390,23 @@
.id = -1,
};
+#define SHARED_IMEM_TZ_BASE 0xFE805720
+static struct resource tzlog_resources[] = {
+ {
+ .start = SHARED_IMEM_TZ_BASE,
+ .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+struct platform_device apq_device_tz_log = {
+ .name = "tz_log",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(tzlog_resources),
+ .resource = tzlog_resources,
+};
+
+
void __init msm_copper_add_devices(void)
{
#ifdef CONFIG_ION_MSM
@@ -399,6 +416,7 @@
platform_device_register(&android_usb_device);
platform_add_devices(msm_copper_stub_regulator_devices,
msm_copper_stub_regulator_devices_len);
+ platform_device_register(&apq_device_tz_log);
}
/*
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index d01a229..d476ca6 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -396,3 +396,5 @@
extern struct platform_device apq8064_rtb_device;
extern struct platform_device msm8960_cache_dump_device;
+
+extern struct platform_device apq_device_tz_log;