// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd. * http://www.samsung.com * * Coupled cpuidle support based on the work of: * Colin Cross * Daniel Lezcano */ #include #include #include #include #include #include #include #include #include static atomic_t exynos_idle_barrier; static struct cpuidle_exynos_data *exynos_cpuidle_pdata; static void (*exynos_enter_aftr)(void); static int exynos_enter_coupled_lowpower(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { int ret; exynos_cpuidle_pdata->pre_enter_aftr(); /* * Waiting all cpus to reach this point at the same moment */ cpuidle_coupled_parallel_barrier(dev, &exynos_idle_barrier); /* * Both cpus will reach this point at the same time */ ret = dev->cpu ? exynos_cpuidle_pdata->cpu1_powerdown() : exynos_cpuidle_pdata->cpu0_enter_aftr(); if (ret) index = ret; /* * Waiting all cpus to finish the power sequence before going further */ cpuidle_coupled_parallel_barrier(dev, &exynos_idle_barrier); exynos_cpuidle_pdata->post_enter_aftr(); return index; } static int exynos_enter_lowpower(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { int new_index = index; /* AFTR can only be entered when cores other than CPU0 are offline */ if (num_online_cpus() > 1 || dev->cpu != 0) new_index = drv->safe_state_index; if (new_index == 0) return arm_cpuidle_simple_enter(dev, drv, new_index); exynos_enter_aftr(); return new_index; } static struct cpuidle_driver exynos_idle_driver = { .name = "exynos_idle", .owner = THIS_MODULE, .states = { [0] = ARM_CPUIDLE_WFI_STATE, [1] = { .enter = exynos_enter_lowpower, .exit_latency = 300, .target_residency = 10000, .name = "C1", .desc = "ARM power down", }, }, .state_count = 2, .safe_state_index = 0, }; static struct cpuidle_driver exynos_coupled_idle_driver = { .name = "exynos_coupled_idle", .owner = THIS_MODULE, .states = { [0] = ARM_CPUIDLE_WFI_STATE, [1] = { .enter = exynos_enter_coupled_lowpower, .exit_latency = 5000, .target_residency = 10000, .flags = CPUIDLE_FLAG_COUPLED | CPUIDLE_FLAG_TIMER_STOP, .name = "C1", .desc = "ARM power down", }, }, .state_count = 2, .safe_state_index = 0, }; static int exynos_cpuidle_probe(struct platform_device *pdev) { int ret; if (IS_ENABLED(CONFIG_SMP) && (of_machine_is_compatible("samsung,exynos4210") || of_machine_is_compatible("samsung,exynos3250"))) { exynos_cpuidle_pdata = pdev->dev.platform_data; ret = cpuidle_register(&exynos_coupled_idle_driver, cpu_possible_mask); } else { exynos_enter_aftr = (void *)(pdev->dev.platform_data); ret = cpuidle_register(&exynos_idle_driver, NULL); } if (ret) { dev_err(&pdev->dev, "failed to register cpuidle driver\n"); return ret; } return 0; } static struct platform_driver exynos_cpuidle_driver = { .probe = exynos_cpuidle_probe, .driver = { .name = "exynos_cpuidle", }, }; builtin_platform_driver(exynos_cpuidle_driver); o/mimo/mimo-7-0 Unnamed repository; edit this file to name it for gitweb.root
summaryrefslogtreecommitdiff
AgeCommit message (Expand)AuthorFilesLines
2018-10-17update translations for 6.0.7 rc2libreoffice-6-0-7Christian Lohmaier78-622/+802
2018-10-03Version 6.0.7.1, tag libreoffice-6.0.7.1libreoffice-6.0.7.1Christian Lohmaier0-0/+0
2018-10-03Branch libreoffice-6-0-7Christian Lohmaier0-0/+0
2018-10-03update translations for 6.0.7 rc1Christian Lohmaier603-127110/+126819
2018-07-26update translations for 6.0.6 rc2Christian Lohmaier81-493/+486
2018-07-10update translations for 6.0.6 rc1Christian Lohmaier524-6659/+5452
2018-06-18update translations for 6.0.5Christian Lohmaier45-836/+843
2018-06-14update translations for 6.0.5 rc2Christian Lohmaier257-5834/+5874
2018-05-30update translations for 6.0.5 rc1Christian Lohmaier259-1375/+3131
2018-05-28add Frisian translationChristian Lohmaier150-0/+197881
2018-05-28update translations for 6.0.5 rc1Christian Lohmaier143-1606/+1591
2018-05-04update translations for 6.0.4 rc2Christian Lohmaier210-6169/+5258
2018-04-17update translations for 6.0.4 rc1Christian Lohmaier253-13913/+10226
2018-03-29update translations for 6.0.3 rc2Christian Lohmaier161-3231/+2567
2018-03-15update translations for 6.0.3 rc1Christian Lohmaier650-6566/+6373
2018-03-08followup of core 12a80d5 for Sloveniancp-6.0-branch-pointAndras Timar1-1/+1
2018-02-25Updated Slovenian translationAndras Timar4-14/+14
2018-02-22update translations for 6.0.2 rc1Christian Lohmaier718-129684/+137151
2018-02-17Updated Slovenian translationAndras Timar7-1384/+1439
2018-02-08update translations for 6.0Christian Lohmaier420-9661/+8359
2018-01-24update translations for 6.0.0 rc3Christian Lohmaier501-16700/+13747
2018-01-17update translations after another de-fuzzying roundChristian Lohmaier1494-26316/+1330
2018-01-15update translations after first de-fuzzying roundChristian Lohmaier3272-224093/+14153
2018-01-10update translations for 6.0 rc2Christian Lohmaier1152-83636/+67632
2018-01-03Updated Slovenian translationAndras Timar19-235/+251
2017-12-21Updated Slovenian translationsAndras Timar1-13/+13
2017-12-20Updated Slovenian translationAndras Timar11-294/+4091
2017-12-20update translations for 6.0 rc1Christian Lohmaier1875-117341/+604955
2017-12-20Updated Slovenian translationAndras Timar27-1142/+1623
2017-12-18update translations for 6.0/masterChristian Lohmaier