本文整理汇总了C++中SOCINFO_VERSION_MAJOR函数的典型用法代码示例。如果您正苦于以下问题:C++ SOCINFO_VERSION_MAJOR函数的具体用法?C++ SOCINFO_VERSION_MAJOR怎么用?C++ SOCINFO_VERSION_MAJOR使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SOCINFO_VERSION_MAJOR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: msm7x2x_misc_init
int __init msm7x2x_misc_init(void)
{
if (machine_is_msm8625_rumi3()) {
msm_clock_init(&msm8625_dummy_clock_init_data);
msm_cpr_init();
return 0;
}
msm_clock_init(&msm7x27a_clock_init_data);
if (cpu_is_msm7x27aa() || cpu_is_msm7x25ab())
platform_device_register(&msm7x27aa_device_acpuclk);
else if (cpu_is_msm8625()) {
if (msm8625_cpu_id() == MSM8625)
platform_device_register(&msm7x27aa_device_acpuclk);
else if (msm8625_cpu_id() == MSM8625A)
platform_device_register(&msm8625_device_acpuclk);
else if (msm8625_cpu_id() == MSM8625AB)
platform_device_register(&msm8625ab_device_acpuclk);
} else {
platform_device_register(&msm7x27a_device_acpuclk);
}
if (cpu_is_msm8625() &&
(SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 2))
msm_cpr_init();
return 0;
}
示例2: acpuclk_8064_probe
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);
}
示例3: msm8930_init_gpu
void __init msm8930_init_gpu(void)
{
unsigned int version = socinfo_get_version();
/* Set the turbo speed for the AA and AB respectively */
if (cpu_is_msm8930aa())
kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 487500000;
else if (cpu_is_msm8930ab()) {
kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 500000000;
grp3d_max_vectors[0].ib = KGSL_CONVERT_TO_MBPS(4800);
}
/* Set up the chip ID based on the SoC version */
if (cpu_is_msm8930ab())
kgsl_3d0_pdata.chipid = ADRENO_CHIPID(3, 0, 5, 3);
else if ((SOCINFO_VERSION_MAJOR(version) == 1) &&
(SOCINFO_VERSION_MINOR(version) == 2))
kgsl_3d0_pdata.chipid = ADRENO_CHIPID(3, 0, 5, 2);
else
kgsl_3d0_pdata.chipid = ADRENO_CHIPID(3, 0, 5, 0);
platform_device_register(&device_kgsl_3d0);
}
示例4: msm8930_init_gpu
void __init msm8930_init_gpu(void)
{
unsigned int version = socinfo_get_version();
if (cpu_is_msm8930aa())
kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 450000000;
else if (cpu_is_msm8930ab()) {
kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 500000000;
grp3d_max_vectors[0].ib = KGSL_CONVERT_TO_MBPS(4800);
}
if (cpu_is_msm8930ab())
kgsl_3d0_pdata.chipid = ADRENO_CHIPID(3, 0, 5, 3);
else if ((SOCINFO_VERSION_MAJOR(version) == 1) &&
(SOCINFO_VERSION_MINOR(version) == 2))
kgsl_3d0_pdata.chipid = ADRENO_CHIPID(3, 0, 5, 2);
else
kgsl_3d0_pdata.chipid = ADRENO_CHIPID(3, 0, 5, 0);
platform_device_register(&device_kgsl_3d0);
}
示例5: msm8960_init_fb
void __init msm8960_init_fb(void)
{
uint32_t soc_platform_version = socinfo_get_version();
if (SOCINFO_VERSION_MAJOR(soc_platform_version) >= 3)
mdp_pdata.mdp_rev = MDP_REV_43;
if (cpu_is_msm8960ab())
mdp_pdata.mdp_rev = MDP_REV_44;
#ifdef CONFIG_FB_MSM_WRITEBACK_MSM_PANEL
platform_device_register(&wfd_device);
#endif
#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
platform_device_register(&hdmi_msm_device);
#endif
mipi_dsi_panel_add_device();
platform_device_register(&msm_fb_device);
msm_fb_register_device("mdp", &mdp_pdata);
msm_fb_register_device("mipi_dsi", &mipi_dsi_pdata);
#ifdef CONFIG_MSM_BUS_SCALING
msm_fb_register_device("dtv", &dtv_pdata);
#endif
}
示例6: apq8064_init_mmc
void __init apq8064_init_mmc(void)
{
if (apq8064_sdc1_pdata) {
/* 8064 v2 supports upto 200MHz clock on SDC1 slot */
if (SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 2) {
apq8064_sdc1_pdata->sup_clk_table =
sdc1_sup_clk_rates_all;
apq8064_sdc1_pdata->sup_clk_cnt =
ARRAY_SIZE(sdc1_sup_clk_rates_all);
}
apq8064_add_sdcc(1, apq8064_sdc1_pdata);
apq8064_add_uio();
}
if (apq8064_sdc2_pdata)
apq8064_add_sdcc(2, apq8064_sdc2_pdata);
if (apq8064_sdc3_pdata) {
if (!machine_is_apq8064_cdp()) {
apq8064_sdc3_pdata->wpswitch_gpio = 0;
apq8064_sdc3_pdata->is_wpswitch_active_low = false;
}
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
machine_is_mpq8064_dtv()) {
int rc;
struct pm_gpio sd_card_det_init_cfg = {
.direction = PM_GPIO_DIR_IN,
.output_buffer = PM_GPIO_OUT_BUF_CMOS,
.pull = PM_GPIO_PULL_UP_30,
.vin_sel = PM_GPIO_VIN_S4,
.out_strength = PM_GPIO_STRENGTH_NO,
.function = PM_GPIO_FUNC_NORMAL,
};
apq8064_sdc3_pdata->status_gpio =
PM8921_GPIO_PM_TO_SYS(31);
apq8064_sdc3_pdata->status_irq =
PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio,
&sd_card_det_init_cfg);
if (rc) {
pr_info("%s: SD_CARD_DET GPIO%d config "
"failed(%d)\n", __func__,
apq8064_sdc3_pdata->status_gpio, rc);
apq8064_sdc3_pdata->status_gpio = 0;
apq8064_sdc3_pdata->status_irq = 0;
}
}
if (machine_is_apq8064_cdp()) {
int i;
for (i = 0;
i < apq8064_sdc3_pdata->pin_data->pad_data->\
drv->size;
i++)
apq8064_sdc3_pdata->pin_data->pad_data->\
drv->on[i].val = GPIO_CFG_10MA;
}
apq8064_add_sdcc(3, apq8064_sdc3_pdata);
}
示例7: msm_pm_register_cpr_ops
void __init msm_pm_register_cpr_ops(void)
{
/* CPR presents on revision >= v2.0 chipsets */
if (cpu_is_msm8625() &&
SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 2)
msm_pm_set_cpr_ops(&msm8625_pm_cpr_ops);
}
示例8: msm8960_init_fb
void __init msm8960_init_fb(void)
{
uint32_t soc_platform_version = socinfo_get_version();
if (SOCINFO_VERSION_MAJOR(soc_platform_version) >= 3)
mdp_pdata.mdp_rev = MDP_REV_43;
if (cpu_is_msm8960ab())
mdp_pdata.mdp_rev = MDP_REV_44;
sony_viskan_add_lcd_device();
#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
platform_device_register(&hdmi_msm_device);
#endif
platform_device_register(&msm_fb_device);
#ifdef CONFIG_FB_MSM_WRITEBACK_MSM_PANEL
platform_device_register(&wfd_device);
#endif
msm_fb_register_device("mdp", &mdp_pdata);
#ifdef CONFIG_FB_MSM_MIPI_DSI_VENDOR_DET
if (sony_viskan_is_dric_det() == LCD_VENDOR_SAMSUNG)
mipi_dsi_pdata.dsi_power_save = s6d6aa0_lcd_power;
else
mipi_dsi_pdata.dsi_power_save = r63306_lcd_power;
#endif /* CONFIG_FB_MSM_MIPI_DSI_VENDOR_DET */
msm_fb_register_device("mipi_dsi", &mipi_dsi_pdata);
#ifdef CONFIG_MSM_BUS_SCALING
msm_fb_register_device("dtv", &dtv_pdata);
#endif
}
示例9: msm8930_init_mmc
void __init msm8930_init_mmc(void)
{
#ifdef CONFIG_MMC_MSM_SDC1_SUPPORT
/* SDC1 : eMMC card connected */
msm_add_sdcc(1, &msm8930_sdc1_data);
#endif
#ifdef CONFIG_MMC_MSM_SDC3_SUPPORT
/*
* All 8930 platform boards using the 1.2 SoC have been reworked so that
* the sd card detect line's esd circuit is no longer powered by the sd
* card's voltage regulator. So this means we can turn the regulator off
* to save power without affecting the sd card detect functionality.
* This change to the boards will be true for newer versions of the SoC
* as well.
*/
if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 1 &&
SOCINFO_VERSION_MINOR(socinfo_get_version()) >= 2) ||
machine_is_msm8930_cdp()) {
msm8930_sdc3_data.vreg_data->vdd_data->always_on = false;
msm8930_sdc3_data.vreg_data->vdd_data->reset_at_init = false;
}
/* SDC3: External card slot */
if (!machine_is_msm8930_cdp()) {
msm8930_sdc3_data.wpswitch_gpio = 0;
msm8930_sdc3_data.wpswitch_polarity = 0;
}
msm_add_sdcc(3, &msm8930_sdc3_data);
#endif
}
示例10: lvds_pixel_remap
static int lvds_pixel_remap(void)
{
u32 ver = socinfo_get_version();
if (machine_is_apq8064_cdp() ||
machine_is_apq8064_liquid()) {
if ((SOCINFO_VERSION_MAJOR(ver) == 1) &&
(SOCINFO_VERSION_MINOR(ver) == 0))
return LVDS_PIXEL_MAP_PATTERN_1;
} else if (machine_is_mpq8064_dtv()) {
if ((SOCINFO_VERSION_MAJOR(ver) == 1) &&
(SOCINFO_VERSION_MINOR(ver) == 0))
return LVDS_PIXEL_MAP_PATTERN_2;
}
return 0;
}
示例11: 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;
}
示例12: msm7x2x_map_io
static void __init msm7x2x_map_io(void)
{
msm_map_common_io();
msm_msm7x2x_allocate_memory_regions();
if (socinfo_init() < 0)
BUG();
#ifdef CONFIG_CACHE_L2X0
if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) > 1)
|| ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 1)
&& (SOCINFO_VERSION_MINOR(socinfo_get_version()) >= 3)))
l2x0_init(MSM_L2CC_BASE, 0x0006801B, 0xfe000000);
else
l2x0_init(MSM_L2CC_BASE, 0x00068012, 0xfe000000);
#endif
}
示例13: apq8064_init_gpu
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);
}
示例14: msm8x60_check_2d_hardware
/*
* this a software workaround for not having two distinct board
* files for 8660v1 and 8660v2. 8660v1 has a faulty 2d clock, and
* this workaround detects the cpu version to tell if the kernel is on a
* 8660v1, and should disable the 2d core. it is called from the board file
*/
void __init msm8x60_check_2d_hardware(void)
{
if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 1) &&
(SOCINFO_VERSION_MINOR(socinfo_get_version()) == 0)) {
printk(KERN_WARNING "kgsl: 2D cores disabled on 8660v1\n");
kgsl_pdata.grp2d0_clk_name = NULL;
kgsl_pdata.grp2d1_clk_name = NULL;
}
}
示例15: msm8960_init_gpiomux
int __init msm8960_init_gpiomux(void)
{
int rc = msm_gpiomux_init(NR_GPIO_IRQS);
if (rc) {
pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
return rc;
}
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
msm_gpiomux_install(msm8960_ethernet_configs,
ARRAY_SIZE(msm8960_ethernet_configs));
#endif
msm_gpiomux_install(msm8960_gsbi_configs,
ARRAY_SIZE(msm8960_gsbi_configs));
msm_gpiomux_install(msm8960_cyts_configs,
ARRAY_SIZE(msm8960_cyts_configs));
msm_gpiomux_install(msm8960_slimbus_config,
ARRAY_SIZE(msm8960_slimbus_config));
msm_gpiomux_install(msm8960_audio_codec_configs,
ARRAY_SIZE(msm8960_audio_codec_configs));
msm_gpiomux_install(msm8960_audio_auxpcm_configs,
ARRAY_SIZE(msm8960_audio_auxpcm_configs));
msm_gpiomux_install(wcnss_5wire_interface,
ARRAY_SIZE(wcnss_5wire_interface));
if (machine_is_msm8960_mtp() || machine_is_msm8960_fluid() ||
machine_is_msm8960_liquid() || machine_is_msm8960_cdp())
msm_gpiomux_install(hap_lvl_shft_config,
ARRAY_SIZE(hap_lvl_shft_config));
if (PLATFORM_IS_CHARM25())
msm_gpiomux_install(mdm_configs,
ARRAY_SIZE(mdm_configs));
#ifdef CONFIG_USB_EHCI_MSM_HSIC
if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) != 1) &&
(PLATFORM_IS_CHARM25() || machine_is_msm8960_liquid()))
msm_gpiomux_install(msm8960_hsic_configs,
ARRAY_SIZE(msm8960_hsic_configs));
#endif
#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
msm_gpiomux_install(msm8960_hdmi_configs,
ARRAY_SIZE(msm8960_hdmi_configs));
#endif
msm_gpiomux_install(msm8960_mdp_vsync_configs,
ARRAY_SIZE(msm8960_mdp_vsync_configs));
return 0;
}