本文整理汇总了C++中cpu_is_msm8960函数的典型用法代码示例。如果您正苦于以下问题:C++ cpu_is_msm8960函数的具体用法?C++ cpu_is_msm8960怎么用?C++ cpu_is_msm8960使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cpu_is_msm8960函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: iommu_init
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;
}
开发者ID:JonnyXDA,项目名称:Sense_4.3,代码行数:57,代码来源:devices-iommu.c
示例2: iommu_init
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;
}
/* Initialize common devs */
platform_add_devices(msm_iommu_common_devs,
ARRAY_SIZE(msm_iommu_common_devs));
/* Initialize soc-specific 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 (soc_class_is_apq8064() || cpu_is_msm8960ab()) {
platform_add_devices(msm_iommu_jpegd_devs,
ARRAY_SIZE(msm_iommu_jpegd_devs));
platform_add_devices(msm_iommu_adreno3xx_gfx_devs,
ARRAY_SIZE(msm_iommu_adreno3xx_gfx_devs));
}
if (soc_class_is_apq8064())
platform_add_devices(msm_iommu_vcap_devs,
ARRAY_SIZE(msm_iommu_vcap_devs));
/* Initialize common ctx_devs */
ret = platform_add_devices(msm_iommu_common_ctx_devs,
ARRAY_SIZE(msm_iommu_common_ctx_devs));
/* Initialize soc-specific 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 (soc_class_is_apq8064() || cpu_is_msm8960ab()) {
platform_add_devices(msm_iommu_jpegd_ctx_devs,
ARRAY_SIZE(msm_iommu_jpegd_ctx_devs));
platform_add_devices(msm_iommu_adreno3xx_ctx_devs,
ARRAY_SIZE(msm_iommu_adreno3xx_ctx_devs));
}
if (soc_class_is_apq8064())
platform_add_devices(msm_iommu_vcap_ctx_devs,
ARRAY_SIZE(msm_iommu_vcap_ctx_devs));
return 0;
}
开发者ID:Gilbert32,项目名称:dellstreak5-kernel-3.4,代码行数:55,代码来源:devices-iommu.c
示例3: diag_send_data
void diag_send_data(struct diag_master_table entry, unsigned char *buf,
int len, int type)
{
driver->pkt_length = len;
if (entry.process_id != NON_APPS_PROC && type != MODEM_DATA) {
diag_update_pkt_buffer(buf);
diag_update_sleeping_process(entry.process_id);
} else {
if (len > 0) {
if (entry.client_id == MODEM_PROC && driver->ch) {
if (cpu_is_msm8960() &&
(int)(*(char *)buf) == MODE_CMD)
if ((int)(*(char *)(buf+1)) == RESET_ID)
return;
smd_write(driver->ch, buf, len);
} else if (entry.client_id == QDSP_PROC &&
driver->chqdsp) {
smd_write(driver->chqdsp, buf, len);
} else if (entry.client_id == WCNSS_PROC &&
driver->ch_wcnss) {
smd_write(driver->ch_wcnss, buf, len);
} else {
pr_alert("diag: incorrect channel");
}
}
}
}
开发者ID:dic1911,项目名称:android_kernel_htc_gtou,代码行数:27,代码来源:diagfwd.c
示例4: msm_spm_turn_on_cpu_rail
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;
}
开发者ID:Jarbu12,项目名称:Xperia-M-Kernel,代码行数:33,代码来源:spm_devices.c
示例5: tz_init
static int tz_init(struct kgsl_device *device, struct kgsl_pwrscale *pwrscale)
{
struct tz_priv *priv;
int ret;
if (!(cpu_is_msm8x60() || cpu_is_msm8960() || cpu_is_apq8064() ||
cpu_is_msm8930() || cpu_is_msm8930aa() || cpu_is_msm8627()))
return -EINVAL;
priv = pwrscale->priv = kzalloc(sizeof(struct tz_priv), GFP_KERNEL);
if (pwrscale->priv == NULL)
return -ENOMEM;
priv->governor = TZ_GOVERNOR_ONDEMAND;
spin_lock_init(&tz_lock);
kgsl_pwrscale_policy_add_files(device, pwrscale, &tz_attr_group);
ret = __secure_tz_entry(TZ_CMD_ID, 0, PARAM_INDEX_WRITE_ALGORITHM);
if(ret == 1)
pr_info("Using HTC GPU DCVS algorithm\n");
else
pr_info("Using QCT GPU DCVS algorithm\n");
return 0;
}
开发者ID:Albinoman887,项目名称:pyramid-3.4.10,代码行数:27,代码来源:kgsl_pwrscale_trustzone.c
示例6: iommu_exit
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);
}
开发者ID:TheTypoMaster,项目名称:e980-zeKrnl,代码行数:59,代码来源:devices-iommu.c
示例7: kgsl_iommu_setup_defaultpagetable
/*
* kgsl_iommu_setup_defaultpagetable - Setup the initial defualtpagetable
* for iommu. This function is only called once during first start, successive
* start do not call this funciton.
* @mmu - Pointer to mmu structure
*
* Create the initial defaultpagetable and setup the iommu mappings to it
* Return - 0 on success else error code
*/
static int kgsl_iommu_setup_defaultpagetable(struct kgsl_mmu *mmu)
{
int status = 0;
int i = 0;
struct kgsl_iommu *iommu = mmu->priv;
struct kgsl_pagetable *pagetable = NULL;
/* If chip is not 8960 then we use the 2nd context bank for pagetable
* switching on the 3D side for which a separate table is allocated */
if (!cpu_is_msm8960() && msm_soc_version_supports_iommu_v1()) {
mmu->priv_bank_table =
kgsl_mmu_getpagetable(KGSL_MMU_PRIV_BANK_TABLE_NAME);
if (mmu->priv_bank_table == NULL) {
status = -ENOMEM;
goto err;
}
}
mmu->defaultpagetable = kgsl_mmu_getpagetable(KGSL_MMU_GLOBAL_PT);
/* Return error if the default pagetable doesn't exist */
if (mmu->defaultpagetable == NULL) {
status = -ENOMEM;
goto err;
}
pagetable = mmu->priv_bank_table ? mmu->priv_bank_table :
mmu->defaultpagetable;
/* Map the IOMMU regsiters to only defaultpagetable */
if (msm_soc_version_supports_iommu_v1()) {
for (i = 0; i < iommu->unit_count; i++) {
iommu->iommu_units[i].reg_map.priv |=
KGSL_MEMFLAGS_GLOBAL;
status = kgsl_mmu_map(pagetable,
&(iommu->iommu_units[i].reg_map),
GSL_PT_PAGE_RV | GSL_PT_PAGE_WV);
if (status) {
iommu->iommu_units[i].reg_map.priv &=
~KGSL_MEMFLAGS_GLOBAL;
goto err;
}
}
}
return status;
err:
for (i--; i >= 0; i--) {
kgsl_mmu_unmap(pagetable,
&(iommu->iommu_units[i].reg_map));
iommu->iommu_units[i].reg_map.priv &= ~KGSL_MEMFLAGS_GLOBAL;
}
if (mmu->priv_bank_table) {
kgsl_mmu_putpagetable(mmu->priv_bank_table);
mmu->priv_bank_table = NULL;
}
if (mmu->defaultpagetable) {
kgsl_mmu_putpagetable(mmu->defaultpagetable);
mmu->defaultpagetable = NULL;
}
return status;
}
开发者ID:Jarbu12,项目名称:Xperia-M-Kernel,代码行数:66,代码来源:kgsl_iommu.c
示例8: meminfo_init
int __init meminfo_init(unsigned int type, unsigned int min_bank_size)
{
unsigned int i;
unsigned long bank_size;
unsigned long bank_start;
struct smem_ram_ptable *ram_ptable;
/* physical memory banks */
unsigned int nr_mem_banks = 0;
/* logical memory regions for dmm */
nr_mem_regions = 0;
ram_ptable = smem_alloc(SMEM_USABLE_RAM_PARTITION_TABLE,
sizeof(struct smem_ram_ptable));
if (!ram_ptable) {
pr_err("Could not read ram partition table\n");
return -EINVAL;
}
/* Determine power control mode based on the hw version */
/* This check will be removed when PASR is fully supported */
if (cpu_is_msm8960() &&
SOCINFO_VERSION_MAJOR(socinfo_get_version()) < 2)
dmm_mode = MEM_DEEP_POWER_DOWN;
else
dmm_mode = MEM_SELF_REFRESH;
pr_info("meminfo_init: smem ram ptable found: ver: %d len: %d\n",
ram_ptable->version, ram_ptable->len);
for (i = 0; i < ram_ptable->len; i++) {
if (ram_ptable->parts[i].type == type &&
ram_ptable->parts[i].size >= min_bank_size) {
bank_start = ram_ptable->parts[i].start;
bank_size = ram_ptable->parts[i].size;
/* Divide into logical memory regions of same size */
while (bank_size) {
mem_regions[nr_mem_regions].start =
bank_start;
mem_regions[nr_mem_regions].size =
MIN_MEMORY_BLOCK_SIZE;
mutex_init(&mem_regions[nr_mem_regions]
.state_mutex);
mem_regions[nr_mem_regions].state =
STATE_DEFAULT;
mem_regions[nr_mem_regions].mask = default_mask;
bank_start += MIN_MEMORY_BLOCK_SIZE;
bank_size -= MIN_MEMORY_BLOCK_SIZE;
nr_mem_regions++;
}
nr_mem_banks++;
}
}
pr_info("Found %d memory banks grouped into %d memory regions\n",
nr_mem_banks, nr_mem_regions);
return 0;
}
开发者ID:Aman11,项目名称:kernel_P7320T_ICS,代码行数:57,代码来源:memory_topology.c
示例9: jet_audio_init
static int __init jet_audio_init(void)
{
int ret;
if (!cpu_is_msm8960()) {
pr_err("%s: Not the right machine type\n", __func__);
return -ENODEV;
}
pr_debug("%s", __func__);
msm_snd_device = platform_device_alloc("soc-audio", 0);
if (!msm_snd_device) {
pr_err("Platform device allocation failed\n");
return -ENOMEM;
}
memcpy(msm_dai, msm_dai_common, sizeof(msm_dai_common));
memcpy(msm_dai + ARRAY_SIZE(msm_dai_common),
msm_dai_delta_tabla2x, sizeof(msm_dai_delta_tabla2x));
platform_set_drvdata(msm_snd_device, &snd_soc_card_msm);
ret = platform_device_add(msm_snd_device);
if (ret) {
platform_device_put(msm_snd_device);
return ret;
}
msm_snd_tabla1x_device = platform_device_alloc("soc-audio", 1);
if (!msm_snd_tabla1x_device) {
pr_err("Platform device allocation failed\n");
return -ENOMEM;
}
memcpy(msm_tabla1x_dai, msm_dai_common,
sizeof(msm_dai_common));
memcpy(msm_tabla1x_dai + ARRAY_SIZE(msm_dai_common),
msm_dai_delta_tabla1x, sizeof(msm_dai_delta_tabla1x));
platform_set_drvdata(msm_snd_tabla1x_device,
&snd_soc_tabla1x_card_msm);
ret = platform_device_add(msm_snd_tabla1x_device);
if (ret) {
platform_device_put(msm_snd_tabla1x_device);
return ret;
}
mutex_init(&audio_notifier_lock);
pr_debug("%s: register cable detect func for dock", __func__);
ret = cable_detect_register_notifier(&audio_dock_notifier);
mutex_init(&cdc_mclk_mutex);
return ret;
}
开发者ID:DennisBold,项目名称:android_kernel_htc_pyramid,代码行数:55,代码来源:board-jet-audio.c
示例10: kgsl_iommu_setup_defaultpagetable
static int kgsl_iommu_setup_defaultpagetable(struct kgsl_mmu *mmu)
{
int status = 0;
int i = 0;
struct kgsl_iommu *iommu = mmu->priv;
struct kgsl_iommu_pt *iommu_pt;
struct kgsl_pagetable *pagetable = NULL;
if (!cpu_is_msm8960()) {
mmu->priv_bank_table =
kgsl_mmu_getpagetable(KGSL_MMU_PRIV_BANK_TABLE_NAME);
if (mmu->priv_bank_table == NULL) {
status = -ENOMEM;
goto err;
}
iommu_pt = mmu->priv_bank_table->priv;
}
mmu->defaultpagetable = kgsl_mmu_getpagetable(KGSL_MMU_GLOBAL_PT);
if (mmu->defaultpagetable == NULL) {
status = -ENOMEM;
goto err;
}
pagetable = mmu->priv_bank_table ? mmu->priv_bank_table :
mmu->defaultpagetable;
for (i = 0; i < iommu->unit_count; i++) {
iommu->iommu_units[i].reg_map.priv |= KGSL_MEMFLAGS_GLOBAL;
status = kgsl_mmu_map(pagetable,
&(iommu->iommu_units[i].reg_map),
GSL_PT_PAGE_RV | GSL_PT_PAGE_WV);
if (status) {
iommu->iommu_units[i].reg_map.priv &=
~KGSL_MEMFLAGS_GLOBAL;
goto err;
}
}
return status;
err:
for (i--; i >= 0; i--) {
kgsl_mmu_unmap(pagetable,
&(iommu->iommu_units[i].reg_map));
iommu->iommu_units[i].reg_map.priv &= ~KGSL_MEMFLAGS_GLOBAL;
}
if (mmu->priv_bank_table) {
kgsl_mmu_putpagetable(mmu->priv_bank_table);
mmu->priv_bank_table = NULL;
}
if (mmu->defaultpagetable) {
kgsl_mmu_putpagetable(mmu->defaultpagetable);
mmu->defaultpagetable = NULL;
}
return status;
}
开发者ID:boa19861105,项目名称:Killx-Kernel,代码行数:54,代码来源:kgsl_iommu.c
示例11: ville_audio_init
static int __init ville_audio_init(void)
{
int ret;
if (!cpu_is_msm8960()) {
pr_info("%s: Not the right machine type\n", __func__);
return -ENODEV ;
}
pr_info("%s", __func__);
msm8960_snd_device = platform_device_alloc("soc-audio", 0);
if (!msm8960_snd_device) {
pr_err("Platform device allocation failed\n");
return -ENOMEM;
}
memcpy(msm8960_dai, msm8960_dai_common, sizeof(msm8960_dai_common));
memcpy(msm8960_dai + ARRAY_SIZE(msm8960_dai_common),
msm8960_dai_delta_tabla2x, sizeof(msm8960_dai_delta_tabla2x));
platform_set_drvdata(msm8960_snd_device, &snd_soc_card_msm8960);
ret = platform_device_add(msm8960_snd_device);
if (ret) {
platform_device_put(msm8960_snd_device);
return ret;
}
msm8960_snd_tabla1x_device = platform_device_alloc("soc-audio", 1);
if (!msm8960_snd_tabla1x_device) {
pr_err("Platform device allocation failed\n");
return -ENOMEM;
}
memcpy(msm8960_tabla1x_dai, msm8960_dai_common,
sizeof(msm8960_dai_common));
memcpy(msm8960_tabla1x_dai + ARRAY_SIZE(msm8960_dai_common),
msm8960_dai_delta_tabla1x, sizeof(msm8960_dai_delta_tabla1x));
platform_set_drvdata(msm8960_snd_tabla1x_device,
&snd_soc_tabla1x_card_msm8960);
ret = platform_device_add(msm8960_snd_tabla1x_device);
if (ret) {
platform_device_put(msm8960_snd_tabla1x_device);
return ret;
}
mutex_init(&cdc_mclk_mutex);
htc_register_q6asm_ops(&qops);
htc_register_pcm_routing_ops(&rops);
acoustic_register_ops(&acoustic);
return ret;
}
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:53,代码来源:board-ville-audio.c
示例12: ville_audio_exit
static void __exit ville_audio_exit(void)
{
if (!cpu_is_msm8960()) {
pr_info("%s: Not the right machine type\n", __func__);
return ;
}
pr_info("%s", __func__);
platform_device_unregister(msm8960_snd_device);
platform_device_unregister(msm8960_snd_tabla1x_device);
mutex_destroy(&cdc_mclk_mutex);
}
开发者ID:BackupWildfireDEV,项目名称:ElementalX-Sense-5.0.2,代码行数:13,代码来源:board-ville-audio.c
示例13: jet_audio_exit
static void __exit jet_audio_exit(void)
{
if (!cpu_is_msm8960()) {
pr_err("%s: Not the right machine type\n", __func__);
return;
}
pr_debug("%s", __func__);
platform_device_unregister(msm_snd_device);
platform_device_unregister(msm_snd_tabla1x_device);
mutex_destroy(&audio_notifier_lock);
mutex_destroy(&cdc_mclk_mutex);
}
开发者ID:DennisBold,项目名称:android_kernel_htc_pyramid,代码行数:14,代码来源:board-jet-audio.c
示例14: modem_8960_init
static int __init modem_8960_init(void)
{
int ret;
if (!cpu_is_msm8960())
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;
}
ret = modem_debugfs_init();
pr_info("%s: 8960 modem fatal driver init'ed.\n", __func__);
out:
return ret;
}
开发者ID:choco81,项目名称:semc-es209ra,代码行数:47,代码来源:modem-8960.c
示例15: release_secondary
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(cpu);
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_apq8064())
return krait_release_secondary(cpu);
WARN(1, "unknown CPU case in release_secondary\n");
return -EINVAL;
}
开发者ID:Luquidtester,项目名称:DirtyKernel-3.0.101,代码行数:17,代码来源:platsmp.c
示例16: tz_init
static int tz_init(struct kgsl_device *device, struct kgsl_pwrscale *pwrscale)
{
struct tz_priv *priv;
/* Trustzone is only valid for some SOCs */
if (!(cpu_is_msm8x60() || cpu_is_msm8960()))
return -EINVAL;
priv = pwrscale->priv = kzalloc(sizeof(struct tz_priv), GFP_KERNEL);
if (pwrscale->priv == NULL)
return -ENOMEM;
priv->governor = TZ_GOVERNOR_ONDEMAND;
spin_lock_init(&tz_lock);
kgsl_pwrscale_policy_add_files(device, pwrscale, &tz_attr_group);
return 0;
}
开发者ID:Snuzzo,项目名称:funky_msm8960,代码行数:18,代码来源:kgsl_pwrscale_trustzone.c
示例17: iommu_exit
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);
}
开发者ID:JonnyXDA,项目名称:Sense_4.3,代码行数:42,代码来源:devices-iommu.c
示例18: release_secondary
static int release_secondary(unsigned int cpu)
{
BUG_ON(cpu >= get_core_count());
if (cpu_is_msm8x60())
return scorpion_release_secondary();
if (machine_is_msm8974_sim())
return krait_release_secondary_sim(0xf9088000, cpu);
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa() ||
cpu_is_apq8064() || cpu_is_msm8627() || cpu_is_msm8960ab())
return krait_release_secondary(0x02088000, cpu);
if (cpu_is_msm8974())
return krait_release_secondary_p3(0xf9088000, cpu);
WARN(1, "unknown CPU case in release_secondary\n");
return -EINVAL;
}
开发者ID:jassycliq,项目名称:bricked-mako,代码行数:20,代码来源:platsmp.c
示例19: kgsl_iommu_setup_defaultpagetable
/*
* kgsl_iommu_setup_defaultpagetable - Setup the initial defualtpagetable
* for iommu. This function is only called once during first start, successive
* start do not call this funciton.
* @mmu - Pointer to mmu structure
*
* Create the initial defaultpagetable and setup the iommu mappings to it
* Return - 0 on success else error code
*/
static int kgsl_iommu_setup_defaultpagetable(struct kgsl_mmu *mmu)
{
int status = 0;
int i = 0;
struct kgsl_iommu *iommu = mmu->priv;
struct kgsl_iommu_pt *iommu_pt;
struct kgsl_pagetable *pagetable = NULL;
/* If chip is not 8960 then we use the 2nd context bank for pagetable
* switching on the 3D side for which a separate table is allocated */
if (!cpu_is_msm8960()) {
mmu->priv_bank_table =
kgsl_mmu_getpagetable(KGSL_MMU_PRIV_BANK_TABLE_NAME);
if (mmu->priv_bank_table == NULL) {
status = -ENOMEM;
goto err;
}
iommu_pt = mmu->priv_bank_table->priv;
iommu_pt->asid = 1;
}
mmu->defaultpagetable = kgsl_mmu_getpagetable(KGSL_MMU_GLOBAL_PT);
/* Return error if the default pagetable doesn't exist */
if (mmu->defaultpagetable == NULL) {
status = -ENOMEM;
goto err;
}
pagetable = mmu->priv_bank_table ? mmu->priv_bank_table :
mmu->defaultpagetable;
/* Map the IOMMU regsiters to only defaultpagetable */
for (i = 0; i < iommu->unit_count; i++) {
iommu->iommu_units[i].reg_map.priv |= KGSL_MEMFLAGS_GLOBAL;
status = kgsl_mmu_map(pagetable,
&(iommu->iommu_units[i].reg_map),
GSL_PT_PAGE_RV | GSL_PT_PAGE_WV);
if (status) {
iommu->iommu_units[i].reg_map.priv &=
~KGSL_MEMFLAGS_GLOBAL;
goto err;
}
}
/*
* The dafault pagetable always has asid 0 assigned by the iommu driver
* and asid 1 is assigned to the private context.
*/
iommu_pt = mmu->defaultpagetable->priv;
iommu_pt->asid = 0;
set_bit(0, iommu->asids);
set_bit(1, iommu->asids);
return status;
err:
for (i--; i >= 0; i--) {
kgsl_mmu_unmap(pagetable,
&(iommu->iommu_units[i].reg_map));
iommu->iommu_units[i].reg_map.priv &= ~KGSL_MEMFLAGS_GLOBAL;
}
if (mmu->priv_bank_table) {
kgsl_mmu_putpagetable(mmu->priv_bank_table);
mmu->priv_bank_table = NULL;
}
if (mmu->defaultpagetable) {
kgsl_mmu_putpagetable(mmu->defaultpagetable);
mmu->defaultpagetable = NULL;
}
return status;
}
开发者ID:Mantoui,项目名称:android_kernel_zte_smarttab,代码行数:74,代码来源:kgsl_iommu.c
示例20: diag_process_apps_pkt
static int diag_process_apps_pkt(unsigned char *buf, int len)
{
uint16_t subsys_cmd_code;
int subsys_id, ssid_first, ssid_last, ssid_range;
int packet_type = 1, i, cmd_code;
unsigned char *temp = buf;
int data_type;
#if defined(CONFIG_DIAG_OVER_USB)
int payload_length;
unsigned char *ptr;
#endif
/* Check for registered clients and forward packet to apropriate proc */
cmd_code = (int)(*(char *)buf);
temp++;
subsys_id = (int)(*(char *)temp);
temp++;
subsys_cmd_code = *(uint16_t *)temp;
temp += 2;
data_type = APPS_DATA;
/* Dont send any command other than mode reset */
if (cpu_is_msm8960() && cmd_code == MODE_CMD) {
if (subsys_id != RESET_ID)
data_type = MODEM_DATA;
}
pr_debug("diag: %d %d %d", cmd_code, subsys_id, subsys_cmd_code);
for (i = 0; i < diag_max_registration; i++) {
entry = driver->table[i];
if (entry.process_id != NO_PROCESS) {
if (entry.cmd_code == cmd_code && entry.subsys_id ==
subsys_id && entry.cmd_code_lo <=
subsys_cmd_code &&
entry.cmd_code_hi >= subsys_cmd_code) {
diag_send_data(entry, buf, len, data_type);
packet_type = 0;
} else if (entry.cmd_code == 255
&& cmd_code == 75) {
if (entry.subsys_id ==
subsys_id &&
entry.cmd_code_lo <=
subsys_cmd_code &&
entry.cmd_code_hi >=
subsys_cmd_code) {
diag_send_data(entry, buf, len,
data_type);
packet_type = 0;
}
} else if (entry.cmd_code == 255 &&
entry.subsys_id == 255) {
if (entry.cmd_code_lo <=
cmd_code &&
entry.
cmd_code_hi >= cmd_code) {
diag_send_data(entry, buf, len,
data_type);
packet_type = 0;
}
}
}
}
/* set event mask */
if (*buf == 0x82) {
buf += 4;
diag_update_event_mask(buf, 1, *(uint16_t *)buf);
diag_update_userspace_clients(EVENT_MASKS_TYPE);
}
/* event mask change */
else if ((*buf == 0x60) && (*(buf+1) == 0x0)) {
diag_update_event_mask(buf+1, 0, 0);
diag_update_userspace_clients(EVENT_MASKS_TYPE);
#if defined(CONFIG_DIAG_OVER_USB)
/* Check for Apps Only 8960 */
if (!(driver->ch) && (chk_config_get_id() == AO8960_TOOLS_ID)) {
/* echo response back for apps only DIAG */
driver->apps_rsp_buf[0] = 0x60;
driver->apps_rsp_buf[1] = 0x0;
driver->apps_rsp_buf[2] = 0x0;
ENCODE_RSP_AND_SEND(2);
return 0;
}
#endif
}
/* Set log masks */
else if (*buf == 0x73 && *(int *)(buf+4) == 3) {
buf += 8;
/* Read Equip ID and pass as first param below*/
diag_update_log_mask(*(int *)buf, buf+8, *(int *)(buf+4));
diag_update_userspace_clients(LOG_MASKS_TYPE);
#if defined(CONFIG_DIAG_OVER_USB)
/* Check for Apps Only 8960 */
if (!(driver->ch) && (chk_config_get_id() == AO8960_TOOLS_ID)) {
/* echo response back for Apps only DIAG */
driver->apps_rsp_buf[0] = 0x73;
*(int *)(driver->apps_rsp_buf + 4) = 0x3; /* op. ID */
*(int *)(driver->apps_rsp_buf + 8) = 0x0; /* success */
payload_length = 8 + ((*(int *)(buf + 4)) + 7)/8;
for (i = 0; i < payload_length; i++)
*(int *)(driver->apps_rsp_buf+12+i) =
*(buf+8+i);
//.........这里部分代码省略.........
开发者ID:dic1911,项目名称:android_kernel_htc_gtou,代码行数:101,代码来源:diagfwd.c
注:本文中的cpu_is_msm8960函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论