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

Commit 04b6d0a3 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'omap-for-v4.8/soc-pt2-signed' of...

Merge tag 'omap-for-v4.8/soc-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Merge "Few more omap SoC changes for v4.8 merge window" from Tony Lindgren:

- Fix a make randconfig build error for recent SMP kexec changes

- A series of clock related fixes to prepare things for moving
  device clkctrl register handling to drivers/clk

* tag 'omap-for-v4.8/soc-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: AM33xx: fix module_wait_ready without clkctrl register
  ARM: OMAP2+: clockdomain: add usecounting support to autoidle APIs
  ARM: OMAP2+: timer: change order of hwmod data handling
  ARM: OMAP2+: hwmod: fetch main_clk based on hwmod name
  ARM: OMAP2+: omap_device: create clock alias purely from DT data
  ARM: OMAP2+: Fix build with CONFIG_SMP and CONFIG_PM is not set
parents c341376a 183e2077
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -78,13 +78,16 @@ obj-$(CONFIG_ARCH_OMAP4) += opp4xxx_data.o
endif

# Power Management
omap-4-5-pm-common			= omap-mpuss-lowpower.o
obj-$(CONFIG_ARCH_OMAP4)		+= $(omap-4-5-pm-common)
obj-$(CONFIG_ARCH_OMAP5)		+= $(omap-4-5-pm-common)
obj-$(CONFIG_OMAP_PM_NOOP)		+= omap-pm-noop.o

ifeq ($(CONFIG_PM),y)
obj-$(CONFIG_ARCH_OMAP2)		+= pm24xx.o
obj-$(CONFIG_ARCH_OMAP2)		+= sleep24xx.o
obj-$(CONFIG_ARCH_OMAP3)		+= pm34xx.o sleep34xx.o
omap-4-5-pm-common			=  pm44xx.o omap-mpuss-lowpower.o
omap-4-5-pm-common			+= pm44xx.o
obj-$(CONFIG_ARCH_OMAP4)		+= $(omap-4-5-pm-common)
obj-$(CONFIG_SOC_OMAP5)			+= $(omap-4-5-pm-common)
obj-$(CONFIG_SOC_DRA7XX)		+= $(omap-4-5-pm-common)
+24 −12
Original line number Diff line number Diff line
@@ -465,9 +465,6 @@ int clkdm_complete_init(void)
		return -EACCES;

	list_for_each_entry(clkdm, &clkdm_list, node) {
		if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
			clkdm_wakeup(clkdm);
		else if (clkdm->flags & CLKDM_CAN_DISABLE_AUTO)
		clkdm_deny_idle(clkdm);

		_resolve_clkdm_deps(clkdm, clkdm->wkdep_srcs);
@@ -925,11 +922,20 @@ void clkdm_allow_idle_nolock(struct clockdomain *clkdm)
	if (!clkdm)
		return;

	if (!(clkdm->flags & CLKDM_CAN_ENABLE_AUTO)) {
		pr_debug("clock: %s: automatic idle transitions cannot be enabled\n",
			 clkdm->name);
	if (!WARN_ON(!clkdm->forcewake_count))
		clkdm->forcewake_count--;

	if (clkdm->forcewake_count)
		return;

	if (!clkdm->usecount && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP))
		clkdm_sleep_nolock(clkdm);

	if (!(clkdm->flags & CLKDM_CAN_ENABLE_AUTO))
		return;

	if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING)
		return;
	}

	if (!arch_clkdm || !arch_clkdm->clkdm_allow_idle)
		return;
@@ -974,11 +980,17 @@ void clkdm_deny_idle_nolock(struct clockdomain *clkdm)
	if (!clkdm)
		return;

	if (!(clkdm->flags & CLKDM_CAN_DISABLE_AUTO)) {
		pr_debug("clockdomain: %s: automatic idle transitions cannot be disabled\n",
			 clkdm->name);
	if (clkdm->forcewake_count++)
		return;

	if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
		clkdm_wakeup_nolock(clkdm);

	if (!(clkdm->flags & CLKDM_CAN_DISABLE_AUTO))
		return;

	if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING)
		return;
	}

	if (!arch_clkdm || !arch_clkdm->clkdm_deny_idle)
		return;
+2 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ struct omap_hwmod;
 * @wkdep_srcs: Clockdomains that can be told to wake this powerdomain up
 * @sleepdep_srcs: Clockdomains that can be told to keep this clkdm from inact
 * @usecount: Usecount tracking
 * @forcewake_count: Usecount for forcing the domain active
 * @node: list_head to link all clockdomains together
 *
 * @prcm_partition should be a macro from mach-omap2/prcm44xx.h (OMAP4 only)
@@ -138,6 +139,7 @@ struct clockdomain {
	struct clkdm_dep *wkdep_srcs;
	struct clkdm_dep *sleepdep_srcs;
	int usecount;
	int forcewake_count;
	struct list_head node;
};

+3 −0
Original line number Diff line number Diff line
@@ -220,6 +220,9 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
{
	int i = 0;

	if (!clkctrl_offs)
		return 0;

	omap_test_timeout(_is_module_ready(inst, clkctrl_offs),
			  MAX_MODULE_READY_TIME, i);

+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
		    mpuss_can_lose_context)
			gic_dist_disable();

		clkdm_wakeup(cpu_clkdm[1]);
		clkdm_deny_idle(cpu_clkdm[1]);
		omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON);
		clkdm_allow_idle(cpu_clkdm[1]);

Loading