soc: qcom: memory_dump_v2: write 64-bit address to imem

Use memcpy_toio() to write 64-bit address to imem instead of
writel_relaxed which is causing truncation as its a 32-bit api.

Change-Id: I0c0922e1eeff72bacb788bd70e6381e9c1dcf7fd
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
This commit is contained in:
Pratik Patel 2015-03-25 17:47:58 -07:00 committed by Rohit Vaswani
parent 790f2f0864
commit 8caa282df8

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, 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
@ -139,7 +139,7 @@ static int __init init_memory_dump(void)
}
memdump.table->version = MSM_DUMP_TABLE_VERSION;
memdump.table_phys = virt_to_phys(memdump.table);
writel_relaxed(memdump.table_phys, imem_base);
memcpy_toio(imem_base, &memdump.table_phys, sizeof(memdump.table_phys));
/* Ensure write to imem_base is complete before unmapping */
mb();
pr_info("MSM Memory Dump base table set up\n");