static void __init msm7x2x_init_early(void)
{
	msm_msm7627a_allocate_memory_regions();
#ifdef CONFIG_ANDROID_RAM_CONSOLE
	persistent_ram_early_init(&ram_console_ram);
#endif
}
Exemple #2
0
void __init msm_8974_reserve(void)
{
#ifdef CONFIG_KEXEC_HARDBOOT
	// Reserve space for hardboot page - just after ram_console,
	// at the start of second memory bank
	int ret;
	phys_addr_t start;
	struct membank* bank;
	
	if (meminfo.nr_banks < 2) {
		pr_err("%s: not enough membank\n", __func__);
		return;
	}
	
	bank = &meminfo.bank[1];
	start = bank->start + SZ_1M + OPPO_PERSISTENT_RAM_SIZE;
	ret = memblock_remove(start, SZ_1M);
	if(!ret)
		pr_info("Hardboot page reserved at 0x%X\n", start);
	else
		pr_err("Failed to reserve space for hardboot page at 0x%X!\n", start);
#endif
	persistent_ram_early_init(&msm_pr);
	of_scan_flat_dt(dt_scan_for_memory_reserve, NULL);
}
Exemple #3
0
static void __init msm8226_reserve(void)
{
	reserve_info = &msm8226_reserve_info;
	of_scan_flat_dt(dt_scan_for_memory_reserve, msm8226_reserve_table);
	persistent_ram_early_init(&msm8226_persistent_ram);
	msm_reserve();
}
void __init msm8974_init_very_early(void)
{
	msm8974_early_memory();
	#ifdef VENDOR_EDIT	
//[email protected], 2013/12/03, Add for ram_console device
	persistent_ram_early_init(&msm_pr);
    #endif  /* VENDOR_EDIT */
}
Exemple #5
0
static void reserve_persistent_ram(void)
{
	struct membank *mb = &meminfo.bank[meminfo.nr_banks - 1];
	unsigned long bank_end = mb->start + mb->size;

	msm_pram.start = bank_end - DEBUG_MEM_SIZE - MSM_PERSISTENT_RAM_SIZE;
	persistent_ram_early_init(&msm_pram);
}
void __init htc_8226_init_early(void)
{
        persistent_ram_early_init(&htc_8226_persistent_ram);

#ifdef CONFIG_HTC_DEBUG_FOOTPRINT
        mnemosyne_early_init((unsigned int)HTC_DEBUG_FOOTPRINT_PHYS, (unsigned int)HTC_DEBUG_FOOTPRINT_BASE);
#endif
}
void __init lge_add_persistent_ram(void)
{
	struct persistent_ram *pram = &lge_persistent_ram;
	struct membank* bank = &meminfo.bank[0];

	pram->start = bank->start + bank->size - LGE_PERSISTENT_RAM_SIZE;

	persistent_ram_early_init(pram);
}
static void __init msm8226_reserve(void)
{
	reserve_info = &msm8226_reserve_info;
	of_scan_flat_dt(dt_scan_for_memory_reserve, msm8226_reserve_table);
	msm_reserve();
#ifdef CONFIG_ANDROID_PERSISTENT_RAM
	persistent_ram_early_init(&per_ram);
#endif
}
void __init htc_8974_init_early(void)
{
	/* TODO: use dt to config persistent_ram */
	persistent_ram_early_init(&htc_8974_persistent_ram);

#ifdef CONFIG_HTC_DEBUG_FOOTPRINT
	mnemosyne_early_init((unsigned int)HTC_DEBUG_FOOTPRINT_PHYS, (unsigned int)HTC_DEBUG_FOOTPRINT_BASE);
#endif
}
Exemple #10
0
static void __init msm7x2x_init_early(void)
{
	msm_msm7627a_allocate_memory_regions();
/*LGE_CHANGE_S[[email protected]]20121009:
*This is called to initiailize peristent ram */
#ifdef CONFIG_ANDROID_RAM_CONSOLE
	persistent_ram_early_init(&ram_console_ram);
#endif
/*LGE_CHANGE_E[[email protected]]20121009*/
}
void __init msm_8974_reserve(void)
{
#ifdef CONFIG_KEXEC_HARDBOOT
	// Reserve space for hardboot page, just before the ram_console
	struct membank* bank = &meminfo.bank[0];
	phys_addr_t start = bank->start + bank->size - SZ_1M - OPPO_PERSISTENT_RAM_SIZE;
	int ret = memblock_remove(start, SZ_1M);
	if(!ret)
		pr_info("Hardboot page reserved at 0x%X\n", start);
	else
		pr_err("Failed to reserve space for hardboot page at 0x%X!\n", start);
#endif
	persistent_ram_early_init(&msm_pr);
	of_scan_flat_dt(dt_scan_for_memory_reserve, NULL);
}
static void __init msm8226_reserve(void)
{
#ifdef CONFIG_KEXEC_HARDBOOT
	int ret;
#endif
	reserve_info = &msm8226_reserve_info;
	of_scan_flat_dt(dt_scan_for_memory_reserve, msm8226_reserve_table);
	msm_reserve();
#ifdef CONFIG_ANDROID_PERSISTENT_RAM
	persistent_ram_early_init(&per_ram);
#endif
#ifdef CONFIG_KEXEC_HARDBOOT
	ret = memblock_remove(KEXEC_HB_PAGE_ADDR, SZ_1M);
	if(!ret)
		pr_info("Hardboot page reserved at 0x%lu\n", KEXEC_HB_PAGE_ADDR);
	else
		pr_err("Failed to reserve space for hardboot page at 0x%lu!\n", KEXEC_HB_PAGE_ADDR);
#endif
}
void __init ram_console_debug_reserve(unsigned long ram_console_size)
{
        int ret;

        ram.start = memblock_end_of_DRAM() - ram_console_size;
        ram.size = ram_console_size;
        ram.descs->size = ram_console_size;
        INIT_LIST_HEAD(&ram.node);

        ret = persistent_ram_early_init(&ram);
        if (ret) {
                pr_err("%s:ram console persistent_ram_early_init failed\n",__func__);
                goto fail;
        }

        return;

fail:
        pr_err("Failed to reserve memory block for ram console\n");
}
static void __init lge_add_persist_ram_devices(void)
{
	int ret;
	struct membank *bank;

	if (meminfo.nr_banks < 2) {
		pr_err("%s: not enough membank\n", __func__);
		return;
	}

	bank = &meminfo.bank[1];
	/* first 1MB is used by bootloader */
	persist_ram.start = bank->start + SZ_1M;

	pr_info("PERSIST RAM CONSOLE START ADDR : 0x%x\n",
			persist_ram.start);

	ret = persistent_ram_early_init(&persist_ram);
	if (ret)
		pr_err("%s: failed to initialize persistent ram\n", __func__);
}
void __init msm8974_init_very_early(void)
{
	msm8974_early_memory();
	persistent_ram_early_init(&msm_pr);
}
void __init htc_8974_init_early(void)
{
	
	persistent_ram_early_init(&htc_8974_persistent_ram);

}