-/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
#define PMIC_DUMP_DATA_LEN 4096
#define VSENSE_DUMP_DATA_LEN 4096
#define RPM_DUMP_DATA_LEN (160 * 1024)
+#define SCAN_DUMP_DATA_LEN (256 * 1024)
void register_misc_dump(void)
{
if (MSM_DUMP_MAJOR(msm_dump_table_version()) > 1) {
dump_data = kzalloc(sizeof(struct msm_dump_data), GFP_KERNEL);
- if (!dump_data) {
- pr_err("rpm dump data structure allocation failed\n");
+ if (!dump_data)
return;
- }
dump_addr = kzalloc(RPM_DUMP_DATA_LEN, GFP_KERNEL);
if (!dump_addr)
goto err0;
}
}
+void register_scan_dump(void)
+{
+ static void *dump_addr;
+ int ret;
+ struct msm_dump_entry dump_entry;
+ struct msm_dump_data *dump_data;
+
+ if (MSM_DUMP_MAJOR(msm_dump_table_version()) > 1) {
+ dump_data = kzalloc(sizeof(struct msm_dump_data), GFP_KERNEL);
+ if (!dump_data)
+ return;
+ dump_addr = kzalloc(SCAN_DUMP_DATA_LEN, GFP_KERNEL);
+ if (!dump_addr)
+ goto err0;
+
+ dump_data->addr = virt_to_phys(dump_addr);
+ dump_data->len = SCAN_DUMP_DATA_LEN;
+ dump_entry.id = MSM_DUMP_DATA_SCANDUMP;
+ dump_entry.addr = virt_to_phys(dump_data);
+ ret = msm_dump_data_register(MSM_DUMP_TABLE_APPS, &dump_entry);
+ if (ret) {
+ pr_err("Registering scandump region failed\n");
+ goto err1;
+ }
+ return;
+err1:
+ kfree(dump_addr);
+err0:
+ kfree(dump_data);
+ }
+}
+
static void __init common_log_register_log_buf(void)
{
char **log_bufp;
register_pmic_dump();
register_vsense_dump();
register_rpm_dump();
+ register_scan_dump();
return 0;
}
late_initcall(msm_common_log_init);
-/* Copyright (c) 2012, 2014-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012, 2014-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
MSM_DUMP_DATA_MISC = 0xE8,
MSM_DUMP_DATA_VSENSE = 0xE9,
MSM_DUMP_DATA_RPM = 0xEA,
+ MSM_DUMP_DATA_SCANDUMP = 0xEB,
MSM_DUMP_DATA_TMC_ETF = 0xF0,
MSM_DUMP_DATA_TMC_REG = 0x100,
MSM_DUMP_DATA_LOG_BUF = 0x110,