int __init omap_temp_sensor_init(void) { if (!cpu_is_omap443x() || !omap4_has_mpu_1_2ghz()) return 0; return platform_driver_register(&omap_temp_sensor_driver); }
/** * omap4_opp_init() - initialize omap4 opp table */ int __init omap4_opp_init(void) { int r = -ENODEV; int trimmed = 1; if (!cpu_is_omap44xx()) return r; if (cpu_is_omap443x()) r = omap_init_opp_table(omap443x_opp_def_list, ARRAY_SIZE(omap443x_opp_def_list)); else if (cpu_is_omap446x()) { r = omap_init_opp_table(omap446x_opp_def_list, ARRAY_SIZE(omap446x_opp_def_list)); trimmed = omap_readl(0x4a002268) & ((1 << 18) | (1 << 19)); /* if device is untrimmed override DPLL TRIM register */ if (!trimmed) omap_writel(0x29, 0x4a002330); } if (!r) { if (omap4_has_mpu_1_2ghz()) omap4_mpu_opp_enable(1200000000); if (!trimmed) pr_info("This is DPLL un-trimmed SOM. OPP is limited at 1.2 GHz\n"); if (omap4_has_mpu_1_5ghz() && trimmed) omap4_mpu_opp_enable(1500000000); } return r; }
/** * omap4_opp_init() - initialize omap4 opp table */ int __init omap4_opp_init(void) { int r = -ENODEV; if (!cpu_is_omap44xx()) return r; if (cpu_is_omap443x()) r = omap_init_opp_table(omap443x_opp_def_list, ARRAY_SIZE(omap443x_opp_def_list)); else if (cpu_is_omap446x()) r = omap_init_opp_table(omap446x_opp_def_list, ARRAY_SIZE(omap446x_opp_def_list)); if (!r) { if (omap4_has_mpu_1_2ghz()) omap4_mpu_opp_enable(1200000000); /* 1.8Ghz까지 오버클럭 */ if (omap4_has_mpu_1_5ghz()) omap4_mpu_opp_enable(1340000000); omap4_mpu_opp_enable(1520000000); omap4_mpu_opp_enable(1650000000); } return r; }
int __init omap_devinit_temp_sensor(void) { if (!cpu_is_omap446x() && !cpu_is_omap443x()) return 0; if (cpu_is_omap443x()) { if (omap4_has_mpu_1_2ghz()) return omap_hwmod_for_each_by_class("bandgap", temp_sensor_dev_init, NULL); else return 0; } else return omap_hwmod_for_each_by_class("thermal_sensor", temp_sensor_dev_init, NULL); }
static ssize_t omap4_soc_type_max_freq(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { char *max_freq = "unknown"; if (omap4_has_mpu_1_5ghz()) max_freq = "1.5Ghz"; else if (omap4_has_mpu_1_2ghz()) max_freq = "1.2Ghz"; else max_freq = "1.0Ghz"; return sprintf(buf, "%s\n", max_freq); }
/** * omap4_opp_init() - initialize omap4 opp table */ int __init omap4_opp_init(void) { int r = -ENODEV; if (!cpu_is_omap44xx()) return r; if (cpu_is_omap443x()) r = omap_init_opp_table(omap443x_opp_def_list, ARRAY_SIZE(omap443x_opp_def_list)); else if (cpu_is_omap446x()) r = omap_init_opp_table(omap446x_opp_def_list, ARRAY_SIZE(omap446x_opp_def_list)); if (!r) { if (omap4_has_mpu_1_2ghz()) omap4_mpu_opp_enable(1200000000); omap4_mpu_opp_enable(1350000000); /* The tuna PCB doesn't support 1.5GHz, so disable it for now */ /*if (omap4_has_mpu_1_5ghz()) omap4_mpu_opp_enable(1500000000);*/ } return r; }
/** * omap4_opp_init() - initialize omap4 opp table */ int __init omap4_opp_init(void) { int r = -ENODEV; if (!cpu_is_omap44xx()) return r; if (cpu_is_omap443x()) r = omap_init_opp_table(omap443x_opp_def_list, ARRAY_SIZE(omap443x_opp_def_list)); else if (cpu_is_omap446x()) r = omap_init_opp_table(omap446x_opp_def_list, ARRAY_SIZE(omap446x_opp_def_list)); if (!r) { if (omap4_has_mpu_1_2ghz()) omap4_mpu_opp_enable(1200000000); /* The tuna supports 1.35GHz & 1.42GHz */ if (omap4_has_mpu_1_5ghz()) omap4_mpu_opp_enable(1350000000); omap4_mpu_opp_enable(1420000000); } return r; }