cLK/patches/kernel_clk_power_collapse.patch
Arif Ali 6092922424 1.3.2: updated
* ROMHDR base addr is spl virtual 0x80000000 = 11800000 physical, LK will relocate to correct address (MEMBASE)
* save reboot reason at 0x2FFB0000 (ramconsole - 0x1000 (PAGE_SIZE)) and @0x2FFB0004 XOR 0x004b4c63 (cLK signature)
* added oem cmd to fastboot and oemcmd.bat for PC
2011-11-07 00:03:59 +00:00

33 lines
1.3 KiB
Diff

diff --git a/arch/arm/mach-msm/board-htcleo.c b/arch/arm/mach-msm/board-htcleo.c
index e13205b..ee7680e 100644
--- a/arch/arm/mach-msm/board-htcleo.c
+++ b/arch/arm/mach-msm/board-htcleo.c
@@ -87,6 +87,7 @@ static int __init parse_tag_nand_boot(const struct tag *tag)
{
struct tag_magldr_entry *mentry = (struct tag_magldr_entry *)(&tag->u);
nand_boot = !(unsigned int)mentry->fNoNandBoot;
+ if(*((unsigned*)&tag->u)==0x004b4c63) nand_boot = 2; // cLK signature
pr_info("Nand Boot: %d\n", nand_boot);
return 0;
}
diff --git a/arch/arm/mach-msm/pm.c b/arch/arm/mach-msm/pm.c
index 8766174..56ccb2a 100644
--- a/arch/arm/mach-msm/pm.c
+++ b/arch/arm/mach-msm/pm.c
@@ -892,6 +892,15 @@ static int __init msm_pm_init(void)
register_reboot_notifier(&msm_reboot_notifier);
msm_pm_reset_vector = ioremap(0x0, PAGE_SIZE);
+#if defined(CONFIG_MACH_HTCLEO)
+ // if cLK is bootloader 0x0 is protected and not writtable but cLK changed reset vecotr to jump at address stored at 0x11800004
+ if(htcleo_is_nand_boot()==2){
+ pr_info("msm_pm: 0x00000000: %x\n", msm_pm_reset_vector[0]);
+ pr_info("msm_pm: 0x00000004: %x\n", msm_pm_reset_vector[1]);
+ msm_pm_reset_vector = ioremap(0x11800000, PAGE_SIZE);
+ }
+#endif
+
if (msm_pm_reset_vector == NULL) {
printk(KERN_ERR "msm_pm_init: failed to map reset vector\n");
return -ENODEV;