예제 #1
0
// +++ For SD card download, paul huang
int proc_comm_alloc_sd_dl_smem(int action_id)
{
    unsigned smem_response = 0;
    uint32_t oem_cmd = SMEM_PROC_COMM_OEM_ALLOC_SD_DL_INFO;
    unsigned int cmd_parameter = action_id;
    /* cmd_parameter setting */

    return msm_proc_comm_oem(PCOM_CUSTOMER_CMD1, &oem_cmd, &smem_response, &cmd_parameter );
}
예제 #2
0
int proc_comm_read_adie_adc(unsigned *cmd_parameter)
{
    unsigned smem_response;
    uint32_t oem_cmd = SMEM_PROC_COMM_OEM_ADIE_ADC_READ;
    /* cmd_parameter setting */

    msm_proc_comm_oem(PCOM_CUSTOMER_CMD1, &oem_cmd, &smem_response, cmd_parameter );

    return smem_response;
}
예제 #3
0
int proc_comm_enable_pm_mic(unsigned *cmd_parameter)
{
    unsigned smem_response;
    uint32_t oem_cmd = SMEM_PROC_COMM_OEM_PM_MIC_EN;
    /* cmd_parameter setting */
    printk(KERN_INFO "Send SMEM_PROC_COMM_OEM_PM_MIC_EN to SMEM\n");

    msm_proc_comm_oem(PCOM_CUSTOMER_CMD1, &oem_cmd, &smem_response, cmd_parameter);

    return smem_response;
}
/* MTD-Kernel-HC-handle_reset-03+[ */
static void msm_pm_restart(char str, const char *cmd)
{
	
	uint32_t oem_cmd = SMEM_PROC_COMM_OEM_RESET_CHIP_EBOOT;
	uint32_t smem_response = 0;
	uint32_t ret = 0;

	pr_debug("The reset reason is %x\n", restart_reason);

	/* MTD-Kernel-HC-handle_reset-02+[ */
	if (cmd)
	{
		if (!strncmp(cmd, "panic", 5))
		{
			restart_reason = 0x46544443;
			pr_err("restart_reason = panic\n");
		}
	}
	/* MTD-Kernel-HC-handle_reset-02+] */

	/* Disable interrupts */
	local_irq_disable();
	local_fiq_disable();

	/*
	 * Take out a flat memory mapping  and will
	 * insert a 1:1 mapping in place of
	 * the user-mode pages to ensure predictable results
	 * This function takes care of flushing the caches
	 * and flushing the TLB.
	 */
	setup_mm_for_reboot();
	
	ret = msm_proc_comm_oem(PCOM_CUSTOMER_CMD1, &oem_cmd, &smem_response, &restart_reason);
	
	if (ret != 0)
	{
		pr_err("SMEM_PROC_COMM_OEM_RESET_CHIP_EBOOT failed, ret = %d\n", ret);
		msm_proc_comm(PCOM_RESET_CHIP, &restart_reason, 0);
	}

	for (;;)
		;
}