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;