mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 17:46:15 +07:00
752b5ed5f6
Add Clock Domain support to the Clock Pulse Generator (CPG) Module Stop (MSTP) Clocks driver using the generic PM Domain. This allows to power-manage the module clocks of SoC devices that are part of the CPG/MSTP Clock Domain using Runtime PM, or for system suspend/resume. SoC devices that are part of the CPG/MSTP Clock Domain and can be power-managed through an MSTP clock should be tagged in DT with a proper "power-domains" property. The CPG/MSTP Clock Domain code will scan such devices for clocks that are suitable for power-managing the device, by looking for a clock that is compatible with "renesas,cpg-mstp-clocks". Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
36 lines
1.0 KiB
C
36 lines
1.0 KiB
C
/*
|
|
* Copyright 2013 Ideas On Board SPRL
|
|
* Copyright 2013, 2014 Horms Solutions Ltd.
|
|
*
|
|
* Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
* Contact: Simon Horman <horms@verge.net.au>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef __LINUX_CLK_SHMOBILE_H_
|
|
#define __LINUX_CLK_SHMOBILE_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct device;
|
|
struct device_node;
|
|
struct generic_pm_domain;
|
|
|
|
void r8a7778_clocks_init(u32 mode);
|
|
void r8a7779_clocks_init(u32 mode);
|
|
void rcar_gen2_clocks_init(u32 mode);
|
|
|
|
#ifdef CONFIG_PM_GENERIC_DOMAINS_OF
|
|
void cpg_mstp_add_clk_domain(struct device_node *np);
|
|
int cpg_mstp_attach_dev(struct generic_pm_domain *domain, struct device *dev);
|
|
void cpg_mstp_detach_dev(struct generic_pm_domain *domain, struct device *dev);
|
|
#else
|
|
static inline void cpg_mstp_add_clk_domain(struct device_node *np) {}
|
|
#endif
|
|
|
|
#endif
|