From eb2460ac41bf6f0855b4f24601ba8b3301becdc9 Mon Sep 17 00:00:00 2001 From: Elaine Zhang Date: Tue, 17 Aug 2021 15:55:24 +0800 Subject: [PATCH] soc: rockchip: pm-domain: optimize static memory consume $ ./scripts/bloat-o-meter pm_domains_old.o pm_domains.o dd/remove: 0/22 grow/shrink: 0/1 up/down: 0/-9328 (-9328) Function old new delta rk3568_pmu 44 - -44 rk3399_pmu 44 - -44 rk3368_pmu 44 - -44 rk3366_pmu 44 - -44 rk3328_pmu 44 - -44 rk3288_pmu 44 - -44 rk3228_pmu 44 - -44 rk3128_pmu 44 - -44 rk3036_pmu 44 - -44 rk1808_pmu 44 - -44 px30_pmu 44 - -44 rk3128_pm_domains 220 - -220 rk3036_pm_domains 308 - -308 rk1808_pm_domains 396 - -396 rk3328_pm_domains 440 - -440 rk3228_pm_domains 484 - -484 rk3366_pm_domains 528 - -528 rk3288_pm_domains 616 - -616 px30_pm_domains 660 - -660 rk3568_pm_domains 704 - -704 rk3368_pm_domains 748 - -748 rk3399_pm_domains 1584 - -1584 rockchip_pm_domain_dt_match 2548 392 -2156 Total: Before=17357, After=8029, chg -53.74% Signed-off-by: Elaine Zhang Change-Id: I1b8b307736edc9c02720c11460041e54fc6b98dd --- drivers/soc/rockchip/pm_domains.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c index 5af64919736f..862bc3ee0331 100644 --- a/drivers/soc/rockchip/pm_domains.c +++ b/drivers/soc/rockchip/pm_domains.c @@ -1487,54 +1487,78 @@ static const struct rockchip_pmu_info rk3568_pmu = { }; static const struct of_device_id rockchip_pm_domain_dt_match[] = { +#ifdef CONFIG_CPU_PX30 { .compatible = "rockchip,px30-power-controller", .data = (void *)&px30_pmu, }, +#endif +#ifdef CONFIG_CPU_RV1126 { .compatible = "rockchip,rv1126-power-controller", .data = (void *)&rv1126_pmu, }, +#endif +#ifdef CONFIG_CPU_RK1808 { .compatible = "rockchip,rk1808-power-controller", .data = (void *)&rk1808_pmu, }, +#endif +#ifdef CONFIG_CPU_RK3036 { .compatible = "rockchip,rk3036-power-controller", .data = (void *)&rk3036_pmu, }, +#endif +#ifdef CONFIG_CPU_RK312X { .compatible = "rockchip,rk3128-power-controller", .data = (void *)&rk3128_pmu, }, +#endif +#ifdef CONFIG_CPU_RK322X { .compatible = "rockchip,rk3228-power-controller", .data = (void *)&rk3228_pmu, }, +#endif +#ifdef CONFIG_CPU_RK3288 { .compatible = "rockchip,rk3288-power-controller", .data = (void *)&rk3288_pmu, }, +#endif +#ifdef CONFIG_CPU_RK3328 { .compatible = "rockchip,rk3328-power-controller", .data = (void *)&rk3328_pmu, }, +#endif +#ifdef CONFIG_CPU_RK3366 { .compatible = "rockchip,rk3366-power-controller", .data = (void *)&rk3366_pmu, }, +#endif +#ifdef CONFIG_CPU_RK3368 { .compatible = "rockchip,rk3368-power-controller", .data = (void *)&rk3368_pmu, }, +#endif +#ifdef CONFIG_CPU_RK3399 { .compatible = "rockchip,rk3399-power-controller", .data = (void *)&rk3399_pmu, }, +#endif +#ifdef CONFIG_CPU_RK3568 { .compatible = "rockchip,rk3568-power-controller", .data = (void *)&rk3568_pmu, }, +#endif { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, rockchip_pm_domain_dt_match);