コード例 #1
0
static void __exit iommu_exit(void)
{
    int i;

    /* Common ctx_devs */
    for (i = 0; i < ARRAY_SIZE(msm_iommu_common_ctx_devs); i++)
        platform_device_unregister(msm_iommu_common_ctx_devs[i]);

    /* Common devs. */
    for (i = 0; i < ARRAY_SIZE(msm_iommu_common_devs); ++i)
        platform_device_unregister(msm_iommu_common_devs[i]);

    if (cpu_is_msm8x60() || cpu_is_msm8960()) {
        for (i = 0; i < ARRAY_SIZE(msm_iommu_gfx2d_ctx_devs); i++)
            platform_device_unregister(msm_iommu_gfx2d_ctx_devs[i]);

        for (i = 0; i < ARRAY_SIZE(msm_iommu_jpegd_ctx_devs); i++)
            platform_device_unregister(msm_iommu_jpegd_ctx_devs[i]);

        for (i = 0; i < ARRAY_SIZE(msm_iommu_gfx2d_devs); i++)
            platform_device_unregister(msm_iommu_gfx2d_devs[i]);

        for (i = 0; i < ARRAY_SIZE(msm_iommu_jpegd_devs); i++)
            platform_device_unregister(msm_iommu_jpegd_devs[i]);
    }
    if (cpu_is_apq8064() || cpu_is_apq8064ab()) {
        for (i = 0; i < ARRAY_SIZE(msm_iommu_vcap_ctx_devs); i++)
            platform_device_unregister(msm_iommu_vcap_ctx_devs[i]);
    }

    if (cpu_is_apq8064() || cpu_is_msm8960ab() || cpu_is_apq8064ab()) {
        for (i = 0; i < ARRAY_SIZE(msm_iommu_adreno3xx_ctx_devs);
                i++)
            platform_device_unregister(
                msm_iommu_adreno3xx_ctx_devs[i]);

        for (i = 0; i < ARRAY_SIZE(msm_iommu_jpegd_ctx_devs);
                i++)
            platform_device_unregister(
                msm_iommu_jpegd_ctx_devs[i]);

        if (cpu_is_apq8064() || cpu_is_apq8064ab()) {
            for (i = 0; i < ARRAY_SIZE(msm_iommu_vcap_devs);
                    i++)
                platform_device_unregister(
                    msm_iommu_vcap_devs[i]);
        }

        for (i = 0; i < ARRAY_SIZE(msm_iommu_adreno3xx_gfx_devs);
                i++)
            platform_device_unregister(
                msm_iommu_adreno3xx_gfx_devs[i]);

        for (i = 0; i < ARRAY_SIZE(msm_iommu_jpegd_devs); i++)
            platform_device_unregister(msm_iommu_jpegd_devs[i]);
    }

    platform_device_unregister(&msm_root_iommu_dev);
}
コード例 #2
0
ファイル: devices-iommu.c プロジェクト: JonnyXDA/Sense_4.3
static int __init iommu_init(void)
{
	int ret;
	if (!msm_soc_version_supports_iommu_v1()) {
		pr_err("IOMMU v1 is not supported on this SoC version.\n");
		return -ENODEV;
	}

	ret = platform_device_register(&msm_root_iommu_dev);
	if (ret != 0) {
		pr_err("Failed to register root IOMMU device!\n");
		goto failure;
	}

	
	platform_add_devices(msm_iommu_common_devs,
				ARRAY_SIZE(msm_iommu_common_devs));

	
	if (cpu_is_msm8x60() || cpu_is_msm8960()) {
		platform_add_devices(msm_iommu_jpegd_devs,
				ARRAY_SIZE(msm_iommu_jpegd_devs));
		platform_add_devices(msm_iommu_gfx2d_devs,
				ARRAY_SIZE(msm_iommu_gfx2d_devs));
	}

	if (cpu_is_apq8064() || cpu_is_apq8064ab()) {
		platform_add_devices(msm_iommu_jpegd_devs,
				ARRAY_SIZE(msm_iommu_jpegd_devs));
		platform_add_devices(msm_iommu_8064_devs,
				ARRAY_SIZE(msm_iommu_8064_devs));
	}

	
	ret = platform_add_devices(msm_iommu_common_ctx_devs,
				ARRAY_SIZE(msm_iommu_common_ctx_devs));

	
	if (cpu_is_msm8x60() || cpu_is_msm8960()) {
		platform_add_devices(msm_iommu_jpegd_ctx_devs,
				ARRAY_SIZE(msm_iommu_jpegd_ctx_devs));
		platform_add_devices(msm_iommu_gfx2d_ctx_devs,
				ARRAY_SIZE(msm_iommu_gfx2d_ctx_devs));
	}

	if (cpu_is_apq8064() || cpu_is_apq8064ab()) {
		platform_add_devices(msm_iommu_jpegd_ctx_devs,
				ARRAY_SIZE(msm_iommu_jpegd_ctx_devs));
		platform_add_devices(msm_iommu_8064_ctx_devs,
				ARRAY_SIZE(msm_iommu_8064_ctx_devs));
	}

	return 0;

failure:
	return ret;
}
コード例 #3
0
ファイル: spm_devices.c プロジェクト: Jarbu12/Xperia-M-Kernel
int msm_spm_turn_on_cpu_rail(unsigned int cpu)
{
	uint32_t val = 0;
	uint32_t timeout = 0;
	void *reg = NULL;
	void *saw_bases[] = {
		0,
		MSM_SAW1_BASE,
		MSM_SAW2_BASE,
		MSM_SAW3_BASE
	};

	if (cpu == 0 || cpu >= num_possible_cpus())
		return -EINVAL;

	reg = saw_bases[cpu];

	if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa() ||
	    cpu_is_apq8064() || cpu_is_msm8627() || cpu_is_msm8960ab() ||
						cpu_is_apq8064ab()) {
		val = 0xA4;
		reg += 0x14;
		timeout = 512;
	} else {
		return -ENOSYS;
	}

	writel_relaxed(val, reg);
	mb();
	udelay(timeout);

	return 0;
}
コード例 #4
0
void __init apq8064_init_gpu(void)
{
	if (cpu_is_apq8064ab())
		kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 450000000;

	platform_device_register(&device_kgsl_3d0);
}
コード例 #5
0
static int __init acpuclk_8064_probe(struct platform_device *pdev)
{
#ifdef CONFIG_LGE_PM
	if (lge_get_factory_boot()) 
	{
		if(lge_get_boot_cable_type() == LGE_BOOT_LT_CABLE_56K ||
// #ifdef CONFIG_MACH_APQ8064_L05E
			lge_get_boot_cable_type() == LGE_BOOT_LT_CABLE_910K ||
// #endif
			lge_get_boot_cable_type() == LGE_BOOT_LT_CABLE_130K)
		{
			pr_info("apq8064:::select pvs_tables to factory_1026\n");
			acpuclk_8064_params.pvs_tables = pvs_tables_factory_1026;
		}
		else
		{
			pr_info("select pvs_tables to original pvs_table\n");
			acpuclk_8064_params.pvs_tables = pvs_tables;
		}
	}
#endif //             
	if (cpu_is_apq8064ab() ||
		SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 2) {
		acpuclk_8064_params.hfpll_data->low_vdd_l_max = 37;
		acpuclk_8064_params.hfpll_data->nom_vdd_l_max = 74;
	}

	return acpuclk_krait_init(&pdev->dev, &acpuclk_8064_params);
}
コード例 #6
0
static int __init acpuclk_8064_probe(struct platform_device *pdev)
{
	if (cpu_is_apq8064ab() ||
		SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 2) {
		acpuclk_8064_params.hfpll_data->low_vdd_l_max = 37;
		acpuclk_8064_params.hfpll_data->nom_vdd_l_max = 74;
	}

	return acpuclk_krait_init(&pdev->dev, &acpuclk_8064_params);
}
コード例 #7
0
static int __init acpuclk_8064_probe(struct platform_device *pdev)
{
    if (cpu_is_apq8064ab() ||
            SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 2) {
        acpuclk_8064_params.hfpll_data->low_vdd_l_max = 37;
        acpuclk_8064_params.hfpll_data->nom_vdd_l_max = 74;
    }

#ifdef CONFIG_PANTECH_SMB347_CHARGER
    if(pantech_charging_status())
        acpuclk_8064_params.pvs_tables = pvs_tables_offline;
#endif

    return acpuclk_krait_init(&pdev->dev, &acpuclk_8064_params);
}
コード例 #8
0
void __init m7_init_gpu(void)
{
	if (max_gpu == 1)
		kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 450000000;

	if (max_gpu == 2)
		kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 480000000;

	if (max_gpu == 3)
		kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 533000000;

	if (cpu_is_apq8064ab())
		kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 450000000;

	platform_device_register(&device_kgsl_3d0);
}
コード例 #9
0
static int __init acpuclk_8064_probe(struct platform_device *pdev)
{
	int ret;
	if (cpu_is_apq8064ab() ||
		SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 2) {
		acpuclk_8064_params.hfpll_data->low_vdd_l_max = 37;
		acpuclk_8064_params.hfpll_data->nom_vdd_l_max = 74;
	}

	ret = acpuclk_krait_init(&pdev->dev, &acpuclk_8064_params);

#ifdef CONFIG_PERFLOCK
		if (!ret)
			perftable_fix_up();
#endif
	return ret;
}
コード例 #10
0
static int __init acpuclk_8064_probe(struct platform_device *pdev)
{
#ifdef CONFIG_LGE_PM
	/* Krait freq table set for factory boot mode */
	if (lge_get_factory_boot()) 
	{
#if defined(CONFIG_MACH_APQ8064_J1KD) || defined(CONFIG_MACH_APQ8064_J1D)
		if(lge_get_boot_cable_type() == LGE_BOOT_LT_CABLE_56K)	
		{
			pr_info("select pvs_tables to factory 56K\n");
			acpuclk_8064_params.pvs_tables = pvs_tables_factory_56k;
		}
		else
		{
			pr_info("select pvs_tables to factory\n");
			acpuclk_8064_params.pvs_tables = pvs_tables_factory_1026;
		}		
#elif defined(CONFIG_MACH_APQ8064_GK_KR)||defined(CONFIG_MACH_APQ8064_GKATT)||defined(CONFIG_MACH_APQ8064_GVDCM)||defined(CONFIG_MACH_APQ8064_GV_KR)||defined(CONFIG_MACH_APQ8064_GKGLOBAL)
		if(lge_get_boot_cable_type() == LGE_BOOT_LT_CABLE_56K ||
			lge_get_boot_cable_type() == LGE_BOOT_LT_CABLE_130K ||
			lge_get_boot_cable_type() == LGE_BOOT_LT_CABLE_910K)
		{
			pr_info("select pvs_tables to factory_1026\n");
			acpuclk_8064_params.pvs_tables = pvs_tables_factory_1026;
		}
		else
		{
			pr_info("select pvs_tables to factory_1134\n");
			acpuclk_8064_params.pvs_tables = pvs_tables_factory_1134;
		}

#else
		pr_info("select pvs_tables to factory_1026\n");
		acpuclk_8064_params.pvs_tables = pvs_tables_factory_1026;
#endif
	}
#endif //CONFIG_LGE_PM

	if (cpu_is_apq8064ab() ||
		SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 2) {
		acpuclk_8064_params.hfpll_data->low_vdd_l_max = 37;
		acpuclk_8064_params.hfpll_data->nom_vdd_l_max = 74;
	}

	return acpuclk_krait_init(&pdev->dev, &acpuclk_8064_params);
}
コード例 #11
0
void __init apq8064_init_gpu(void)
{
	unsigned int version = socinfo_get_version();

	if (cpu_is_apq8064ab())
		kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 450000000;
	if (SOCINFO_VERSION_MAJOR(version) == 2) {
		kgsl_3d0_pdata.chipid = ADRENO_CHIPID(3, 2, 0, 2);
	} else {
		if ((SOCINFO_VERSION_MAJOR(version) == 1) &&
				(SOCINFO_VERSION_MINOR(version) == 1))
			kgsl_3d0_pdata.chipid = ADRENO_CHIPID(3, 2, 0, 1);
		else
			kgsl_3d0_pdata.chipid = ADRENO_CHIPID(3, 2, 0, 0);
	}

	platform_device_register(&device_kgsl_3d0);
}
コード例 #12
0
ファイル: platsmp.c プロジェクト: jthatch12/STi2_M7
static int __cpuinit release_secondary(unsigned int cpu)
{
	BUG_ON(cpu >= get_core_count());

	if (cpu_is_msm8x60())
		return scorpion_release_secondary();

	if (machine_is_msm8960_sim() || machine_is_msm8960_rumi3() ||
	    machine_is_apq8064_sim())
		return krait_release_secondary_sim(0x02088000, cpu);

	if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa() ||
	    cpu_is_apq8064() || cpu_is_msm8627() || cpu_is_apq8064ab())
		return krait_release_secondary(0x02088000, cpu);

	WARN(1, "unknown CPU case in release_secondary\n");
	return -EINVAL;
}
コード例 #13
0
ファイル: devices-iommu.c プロジェクト: JonnyXDA/Sense_4.3
static void __exit iommu_exit(void)
{
	int i;

	
	for (i = 0; i < ARRAY_SIZE(msm_iommu_common_ctx_devs); i++)
		platform_device_unregister(msm_iommu_common_ctx_devs[i]);

	
	for (i = 0; i < ARRAY_SIZE(msm_iommu_common_devs); ++i)
		platform_device_unregister(msm_iommu_common_devs[i]);

	if (cpu_is_msm8x60() || cpu_is_msm8960()) {
		for (i = 0; i < ARRAY_SIZE(msm_iommu_gfx2d_ctx_devs); i++)
			platform_device_unregister(msm_iommu_gfx2d_ctx_devs[i]);

		for (i = 0; i < ARRAY_SIZE(msm_iommu_jpegd_ctx_devs); i++)
			platform_device_unregister(msm_iommu_jpegd_ctx_devs[i]);

		for (i = 0; i < ARRAY_SIZE(msm_iommu_gfx2d_devs); i++)
			platform_device_unregister(msm_iommu_gfx2d_devs[i]);

		for (i = 0; i < ARRAY_SIZE(msm_iommu_jpegd_devs); i++)
			platform_device_unregister(msm_iommu_jpegd_devs[i]);
	}

	if (cpu_is_apq8064() || cpu_is_apq8064ab()) {
		for (i = 0; i < ARRAY_SIZE(msm_iommu_8064_ctx_devs); i++)
			platform_device_unregister(msm_iommu_8064_ctx_devs[i]);

		for (i = 0; i < ARRAY_SIZE(msm_iommu_jpegd_ctx_devs); i++)
			platform_device_unregister(msm_iommu_jpegd_ctx_devs[i]);

		for (i = 0; i < ARRAY_SIZE(msm_iommu_8064_devs); i++)
			platform_device_unregister(msm_iommu_8064_devs[i]);

		for (i = 0; i < ARRAY_SIZE(msm_iommu_jpegd_devs); i++)
			platform_device_unregister(msm_iommu_jpegd_devs[i]);
	}

	platform_device_unregister(&msm_root_iommu_dev);
}
コード例 #14
0
static int __init gss_8064_init(void)
{
	int ret;

	if (!(cpu_is_apq8064() || cpu_is_apq8064ab()))
		return -ENODEV;

	ret = smsm_state_cb_register(SMSM_MODEM_STATE, SMSM_RESET,
		smsm_state_cb, 0);

	if (ret < 0)
		pr_err("%s: Unable to register SMSM callback! (%d)\n",
				__func__, ret);

	ret = request_irq(GSS_A5_WDOG_EXPIRED, gss_wdog_bite_irq,
			IRQF_TRIGGER_RISING, "gss_a5_wdog", NULL);

	if (ret < 0) {
		pr_err("%s: Unable to request gss watchdog IRQ. (%d)\n",
				__func__, ret);
		disable_irq_nosync(GSS_A5_WDOG_EXPIRED);
		goto out;
	}

	ret = gss_subsystem_restart_init();

	if (ret < 0) {
		pr_err("%s: Unable to reg with subsystem restart. (%d)\n",
				__func__, ret);
		goto out;
	}

	gss_data.gss_dev.minor = MISC_DYNAMIC_MINOR;
	gss_data.gss_dev.name = "gss";
	gss_data.gss_dev.fops = &gss_file_ops;
	ret = misc_register(&gss_data.gss_dev);

	if (ret) {
		pr_err("%s: misc_registers failed for %s (%d)", __func__,
				gss_data.gss_dev.name, ret);
		goto out;
	}

	gss_data.gss_ramdump_dev = create_ramdump_device("gss");

	if (!gss_data.gss_ramdump_dev) {
		pr_err("%s: Unable to create gss ramdump device. (%d)\n",
				__func__, -ENOMEM);
		ret = -ENOMEM;
		goto out;
	}

	gss_data.smem_ramdump_dev = create_ramdump_device("smem-gss");

	if (!gss_data.smem_ramdump_dev) {
		pr_err("%s: Unable to create smem ramdump device. (%d)\n",
				__func__, -ENOMEM);
		ret = -ENOMEM;
		goto out;
	}

	pr_info("%s: gss fatal driver init'ed.\n", __func__);
out:
	return ret;
}
コード例 #15
0
static int __init modem_8960_init(void)
{
	int ret;

	if (cpu_is_apq8064() || cpu_is_apq8064ab())
		return -ENODEV;

	ret = smsm_state_cb_register(SMSM_MODEM_STATE, SMSM_RESET,
		smsm_state_cb, 0);

	if (ret < 0)
		pr_err("%s: Unable to register SMSM callback! (%d)\n",
				__func__, ret);

	ret = request_irq(Q6FW_WDOG_EXPIRED_IRQ, modem_wdog_bite_irq,
			IRQF_TRIGGER_RISING, "modem_wdog_fw", NULL);

	if (ret < 0) {
		pr_err("%s: Unable to request q6fw watchdog IRQ. (%d)\n",
				__func__, ret);
		goto out;
	}

	ret = request_irq(Q6SW_WDOG_EXPIRED_IRQ, modem_wdog_bite_irq,
			IRQF_TRIGGER_RISING, "modem_wdog_sw", NULL);

	if (ret < 0) {
		pr_err("%s: Unable to request q6sw watchdog IRQ. (%d)\n",
				__func__, ret);
		disable_irq_nosync(Q6FW_WDOG_EXPIRED_IRQ);
		goto out;
	}

	ret = modem_subsystem_restart_init();

	if (ret < 0) {
		pr_err("%s: Unable to reg with subsystem restart. (%d)\n",
				__func__, ret);
		goto out;
	}

	modemfw_ramdump_dev = create_ramdump_device("modem_fw");

	if (!modemfw_ramdump_dev) {
		pr_err("%s: Unable to create modem fw ramdump device. (%d)\n",
				__func__, -ENOMEM);
		ret = -ENOMEM;
		goto out;
	}

	modemsw_ramdump_dev = create_ramdump_device("modem_sw");

	if (!modemsw_ramdump_dev) {
		pr_err("%s: Unable to create modem sw ramdump device. (%d)\n",
				__func__, -ENOMEM);
		ret = -ENOMEM;
		goto out;
	}

	smem_ramdump_dev = create_ramdump_device("smem-modem");

	if (!smem_ramdump_dev) {
		pr_err("%s: Unable to create smem ramdump device. (%d)\n",
				__func__, -ENOMEM);
		ret = -ENOMEM;
		goto out;
	}

	ret = modem_debugfs_init();

	pr_info("%s: modem fatal driver init'ed.\n", __func__);
out:
	return ret;
}