Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cf896b3 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'pm-cpuidle', 'pm-devfreq' and 'pm-clk'

* pm-cpuidle:
  cpuidle/coupled: Remove redundant 'dev' argument of cpuidle_state_is_coupled()
  cpuidle/coupled: Remove cpuidle_device::safe_state_index
  intel_idle: Skylake Client Support
  intel_idle: allow idle states to be freeze-mode specific

* pm-devfreq:
  PM / devfreq: exynos-ppmu: Update documentation to support PPMUv2
  PM / devfreq: exynos-ppmu: Add the support of PPMUv2 for Exynos5433
  PM / devfreq: event: Remove incorrect property in exynos-ppmu DT binding

* pm-clk:
  PM / clk: don't return int on __pm_clk_enable()
Loading
Loading
Loading
Loading
+40 −3
Original line number Diff line number Diff line
@@ -11,15 +11,14 @@ to various devfreq devices. The devfreq devices would use the event data when
derterming the current state of each IP.

Required properties:
- compatible: Should be "samsung,exynos-ppmu".
- compatible: Should be "samsung,exynos-ppmu" or "samsung,exynos-ppmu-v2.
- reg: physical base address of each PPMU and length of memory mapped region.

Optional properties:
- clock-names : the name of clock used by the PPMU, "ppmu"
- clocks : phandles for clock specified in "clock-names" property
- #clock-cells: should be 1.

Example1 : PPMU nodes in exynos3250.dtsi are listed below.
Example1 : PPMUv1 nodes in exynos3250.dtsi are listed below.

		ppmu_dmc0: ppmu_dmc0@106a0000 {
			compatible = "samsung,exynos-ppmu";
@@ -108,3 +107,41 @@ Example2 : Events of each PPMU node in exynos3250-rinato.dts are listed below.
			};
		};
	};

Example3 : PPMUv2 nodes in exynos5433.dtsi are listed below.

		ppmu_d0_cpu: ppmu_d0_cpu@10480000 {
			compatible = "samsung,exynos-ppmu-v2";
			reg = <0x10480000 0x2000>;
			status = "disabled";
		};

		ppmu_d0_general: ppmu_d0_general@10490000 {
			compatible = "samsung,exynos-ppmu-v2";
			reg = <0x10490000 0x2000>;
			status = "disabled";
		};

		ppmu_d0_rt: ppmu_d0_rt@104a0000 {
			compatible = "samsung,exynos-ppmu-v2";
			reg = <0x104a0000 0x2000>;
			status = "disabled";
		};

		ppmu_d1_cpu: ppmu_d1_cpu@104b0000 {
			compatible = "samsung,exynos-ppmu-v2";
			reg = <0x104b0000 0x2000>;
			status = "disabled";
		};

		ppmu_d1_general: ppmu_d1_general@104c0000 {
			compatible = "samsung,exynos-ppmu-v2";
			reg = <0x104c0000 0x2000>;
			status = "disabled";
		};

		ppmu_d1_rt: ppmu_d1_rt@104d0000 {
			compatible = "samsung,exynos-ppmu-v2";
			reg = <0x104d0000 0x2000>;
			status = "disabled";
		};
+1 −3
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ struct pm_clock_entry {
 * @dev: The device for the given clock
 * @ce: PM clock entry corresponding to the clock.
 */
static inline int __pm_clk_enable(struct device *dev, struct pm_clock_entry *ce)
static inline void __pm_clk_enable(struct device *dev, struct pm_clock_entry *ce)
{
	int ret;

@@ -50,8 +50,6 @@ static inline int __pm_clk_enable(struct device *dev, struct pm_clock_entry *ce)
			dev_err(dev, "%s: failed to enable clk %p, error %d\n",
				__func__, ce->clk, ret);
	}

	return ret;
}

/**
+3 −5
Original line number Diff line number Diff line
@@ -176,14 +176,12 @@ void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a)

/**
 * cpuidle_state_is_coupled - check if a state is part of a coupled set
 * @dev: struct cpuidle_device for the current cpu
 * @drv: struct cpuidle_driver for the platform
 * @state: index of the target state in drv->states
 *
 * Returns true if the target state is coupled with cpus besides this one
 */
bool cpuidle_state_is_coupled(struct cpuidle_device *dev,
	struct cpuidle_driver *drv, int state)
bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state)
{
	return drv->states[state].flags & CPUIDLE_FLAG_COUPLED;
}
@@ -473,7 +471,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
			return entered_state;
		}
		entered_state = cpuidle_enter_state(dev, drv,
			dev->safe_state_index);
			drv->safe_state_index);
		local_irq_disable();
	}

@@ -521,7 +519,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
		}

		entered_state = cpuidle_enter_state(dev, drv,
			dev->safe_state_index);
			drv->safe_state_index);
		local_irq_disable();
	}

+2 −2
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
		tick_broadcast_exit();
	}

	if (!cpuidle_state_is_coupled(dev, drv, entered_state))
	if (!cpuidle_state_is_coupled(drv, entered_state))
		local_irq_enable();

	diff = ktime_to_us(ktime_sub(time_end, time_start));
@@ -259,7 +259,7 @@ int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
int cpuidle_enter(struct cpuidle_driver *drv, struct cpuidle_device *dev,
		  int index)
{
	if (cpuidle_state_is_coupled(dev, drv, index))
	if (cpuidle_state_is_coupled(drv, index))
		return cpuidle_enter_state_coupled(dev, drv, index);
	return cpuidle_enter_state(dev, drv, index);
}
+3 −4
Original line number Diff line number Diff line
@@ -34,15 +34,14 @@ extern int cpuidle_add_sysfs(struct cpuidle_device *dev);
extern void cpuidle_remove_sysfs(struct cpuidle_device *dev);

#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED
bool cpuidle_state_is_coupled(struct cpuidle_device *dev,
		struct cpuidle_driver *drv, int state);
bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state);
int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
		struct cpuidle_driver *drv, int next_state);
int cpuidle_coupled_register_device(struct cpuidle_device *dev);
void cpuidle_coupled_unregister_device(struct cpuidle_device *dev);
#else
static inline bool cpuidle_state_is_coupled(struct cpuidle_device *dev,
		struct cpuidle_driver *drv, int state)
static inline
bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state)
{
	return false;
}
Loading