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

Commit aad70de2 authored by Sekhar Nori's avatar Sekhar Nori
Browse files

davinci: enable forced transitions on PSC



Some DaVinci modules like the SATA on DA850
need forced module state transitions.

Define a "force" flag which can be passed to
the PSC config function to enable it to make
forced transitions.

Forced transitions shouldn't normally be attempted,
unless the TRM explicitly specifies its usage.

ChangeLog:
v2:
Modified to take care of the fact that
davinci_psc_config() now takes the flags
directly.

Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent a51ca38b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ struct clk {
#define CLK_PLL			BIT(4) /* PLL-derived clock */
#define PRE_PLL			BIT(5) /* source is before PLL mult/div */
#define PSC_SWRSTDISABLE	BIT(6) /* Disable state is SwRstDisable */
#define PSC_FORCE		BIT(7) /* Force module state transtition */

#define CLK(dev, con, ck) 	\
	{			\
+1 −0
Original line number Diff line number Diff line
@@ -244,6 +244,7 @@
#define PSC_STATE_ENABLE	3

#define MDSTAT_STATE_MASK 0x1f
#define MDCTL_FORCE		BIT(31)

#ifndef __ASSEMBLER__

+2 −0
Original line number Diff line number Diff line
@@ -75,6 +75,8 @@ void davinci_psc_config(unsigned int domain, unsigned int ctlr,
	mdctl = __raw_readl(psc_base + MDCTL + 4 * id);
	mdctl &= ~MDSTAT_STATE_MASK;
	mdctl |= next_state;
	if (flags & PSC_FORCE)
		mdctl |= MDCTL_FORCE;
	__raw_writel(mdctl, psc_base + MDCTL + 4 * id);

	pdstat = __raw_readl(psc_base + PDSTAT);