pm-domains.c (0d946ef4646092a23de2baf7b9d3063fe5571e82) | pm-domains.c (da64dae42672a03eb877ebf21bde847215f5fa29) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Rockchip Generic power domain support. 4 * 5 * Copyright (c) 2015 ROCKCHIP, Co. Ltd. 6 */ 7 8#include <linux/io.h> --- 896 unchanged lines hidden (view full) --- 905 pmu_info->gpu_power_transition_time); 906 907 error = -ENODEV; 908 909 /* 910 * Prevent any rockchip_pmu_block() from racing with the remainder of 911 * setup (clocks, register initialization). 912 */ | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Rockchip Generic power domain support. 4 * 5 * Copyright (c) 2015 ROCKCHIP, Co. Ltd. 6 */ 7 8#include <linux/io.h> --- 896 unchanged lines hidden (view full) --- 905 pmu_info->gpu_power_transition_time); 906 907 error = -ENODEV; 908 909 /* 910 * Prevent any rockchip_pmu_block() from racing with the remainder of 911 * setup (clocks, register initialization). 912 */ |
913 mutex_lock(&dmc_pmu_mutex); | 913 guard(mutex)(&dmc_pmu_mutex); |
914 915 for_each_available_child_of_node_scoped(np, node) { 916 error = rockchip_pm_add_one_domain(pmu, node); 917 if (error) { 918 dev_err(dev, "failed to handle node %pOFn: %d\n", 919 node, error); 920 goto err_out; 921 } --- 16 unchanged lines hidden (view full) --- 938 dev_err(dev, "failed to add provider: %d\n", error); 939 goto err_out; 940 } 941 942 /* We only expect one PMU. */ 943 if (!WARN_ON_ONCE(dmc_pmu)) 944 dmc_pmu = pmu; 945 | 914 915 for_each_available_child_of_node_scoped(np, node) { 916 error = rockchip_pm_add_one_domain(pmu, node); 917 if (error) { 918 dev_err(dev, "failed to handle node %pOFn: %d\n", 919 node, error); 920 goto err_out; 921 } --- 16 unchanged lines hidden (view full) --- 938 dev_err(dev, "failed to add provider: %d\n", error); 939 goto err_out; 940 } 941 942 /* We only expect one PMU. */ 943 if (!WARN_ON_ONCE(dmc_pmu)) 944 dmc_pmu = pmu; 945 |
946 mutex_unlock(&dmc_pmu_mutex); 947 | |
948 return 0; 949 950err_out: 951 rockchip_pm_domain_cleanup(pmu); | 946 return 0; 947 948err_out: 949 rockchip_pm_domain_cleanup(pmu); |
952 mutex_unlock(&dmc_pmu_mutex); | |
953 return error; 954} 955 956static const struct rockchip_domain_info px30_pm_domains[] = { 957 [PX30_PD_USB] = DOMAIN_PX30("usb", BIT(5), BIT(5), BIT(10), false), 958 [PX30_PD_SDCARD] = DOMAIN_PX30("sdcard", BIT(8), BIT(8), BIT(9), false), 959 [PX30_PD_GMAC] = DOMAIN_PX30("gmac", BIT(10), BIT(10), BIT(6), false), 960 [PX30_PD_MMC_NAND] = DOMAIN_PX30("mmc_nand", BIT(11), BIT(11), BIT(5), false), --- 468 unchanged lines hidden --- | 950 return error; 951} 952 953static const struct rockchip_domain_info px30_pm_domains[] = { 954 [PX30_PD_USB] = DOMAIN_PX30("usb", BIT(5), BIT(5), BIT(10), false), 955 [PX30_PD_SDCARD] = DOMAIN_PX30("sdcard", BIT(8), BIT(8), BIT(9), false), 956 [PX30_PD_GMAC] = DOMAIN_PX30("gmac", BIT(10), BIT(10), BIT(6), false), 957 [PX30_PD_MMC_NAND] = DOMAIN_PX30("mmc_nand", BIT(11), BIT(11), BIT(5), false), --- 468 unchanged lines hidden --- |