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

Commit 9e74f218 authored by Tony Lindgren's avatar Tony Lindgren
Browse files

Merge branch 'for_3.6/pm/sr-move' of...

Merge branch 'for_3.6/pm/sr-move' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into devel-driver
parents b955eefc 21ff63ad
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -70,8 +70,9 @@ obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o
obj-$(CONFIG_ARCH_OMAP4)		+= pm44xx.o omap-mpuss-lowpower.o
obj-$(CONFIG_ARCH_OMAP4)		+= cpuidle44xx.o
obj-$(CONFIG_PM_DEBUG)			+= pm-debug.o
obj-$(CONFIG_OMAP_SMARTREFLEX)          += sr_device.o smartreflex.o
obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3)	+= smartreflex-class3.o

obj-$(CONFIG_POWER_AVS_OMAP)		+= sr_device.o
obj-$(CONFIG_POWER_AVS_OMAP_CLASS3)    += smartreflex-class3.o

AFLAGS_sleep24xx.o			:=-Wa,-march=armv6
AFLAGS_sleep34xx.o			:=-Wa,-march=armv7-a$(plus_sec)
+6 −6
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@
 *
 * XXX these should be marked initdata for multi-OMAP kernels
 */
#include <linux/power/smartreflex.h>

#include <plat/omap_hwmod.h>
#include <mach/irqs.h>
#include <plat/cpu.h>
@@ -29,8 +31,6 @@
#include <plat/dmtimer.h>

#include "omap_hwmod_common_data.h"

#include "smartreflex.h"
#include "prm-regbits-34xx.h"
#include "cm-regbits-34xx.h"
#include "wd_timer.h"
@@ -1325,7 +1325,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
};

static struct omap_hwmod omap34xx_sr1_hwmod = {
	.name		= "sr1",
	.name		= "smartreflex_mpu_iva",
	.class		= &omap34xx_smartreflex_hwmod_class,
	.main_clk	= "sr1_fck",
	.prcm		= {
@@ -1343,7 +1343,7 @@ static struct omap_hwmod omap34xx_sr1_hwmod = {
};

static struct omap_hwmod omap36xx_sr1_hwmod = {
	.name		= "sr1",
	.name		= "smartreflex_mpu_iva",
	.class		= &omap36xx_smartreflex_hwmod_class,
	.main_clk	= "sr1_fck",
	.prcm		= {
@@ -1370,7 +1370,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
};

static struct omap_hwmod omap34xx_sr2_hwmod = {
	.name		= "sr2",
	.name		= "smartreflex_core",
	.class		= &omap34xx_smartreflex_hwmod_class,
	.main_clk	= "sr2_fck",
	.prcm		= {
@@ -1388,7 +1388,7 @@ static struct omap_hwmod omap34xx_sr2_hwmod = {
};

static struct omap_hwmod omap36xx_sr2_hwmod = {
	.name		= "sr2",
	.name		= "smartreflex_core",
	.class		= &omap36xx_smartreflex_hwmod_class,
	.main_clk	= "sr2_fck",
	.prcm		= {
+1 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
 */

#include <linux/io.h>
#include <linux/power/smartreflex.h>

#include <plat/omap_hwmod.h>
#include <plat/cpu.h>
@@ -32,8 +33,6 @@
#include <plat/common.h>

#include "omap_hwmod_common_data.h"

#include "smartreflex.h"
#include "cm1_44xx.h"
#include "cm2_44xx.h"
#include "prm44xx.h"
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ extern void enable_omap3630_toggle_l2_on_restore(void);
static inline void enable_omap3630_toggle_l2_on_restore(void) { }
#endif		/* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */

#ifdef CONFIG_OMAP_SMARTREFLEX
#ifdef CONFIG_POWER_AVS_OMAP
extern int omap_devinit_smartreflex(void);
extern void omap_enable_smartreflex_on_init(void);
#else
+15 −14
Original line number Diff line number Diff line
@@ -11,36 +11,37 @@
 * published by the Free Software Foundation.
 */

#include "smartreflex.h"
#include <linux/power/smartreflex.h>
#include "voltage.h"

static int sr_class3_enable(struct voltagedomain *voltdm)
static int sr_class3_enable(struct omap_sr *sr)
{
	unsigned long volt = voltdm_get_voltage(voltdm);
	unsigned long volt = voltdm_get_voltage(sr->voltdm);

	if (!volt) {
		pr_warning("%s: Curr voltage unknown. Cannot enable sr_%s\n",
				__func__, voltdm->name);
		pr_warning("%s: Curr voltage unknown. Cannot enable %s\n",
				__func__, sr->name);
		return -ENODATA;
	}

	omap_vp_enable(voltdm);
	return sr_enable(voltdm, volt);
	omap_vp_enable(sr->voltdm);
	return sr_enable(sr->voltdm, volt);
}

static int sr_class3_disable(struct voltagedomain *voltdm, int is_volt_reset)
static int sr_class3_disable(struct omap_sr *sr, int is_volt_reset)
{
	sr_disable_errgen(voltdm);
	omap_vp_disable(voltdm);
	sr_disable(voltdm);
	sr_disable_errgen(sr->voltdm);
	omap_vp_disable(sr->voltdm);
	sr_disable(sr->voltdm);
	if (is_volt_reset)
		voltdm_reset(voltdm);
		voltdm_reset(sr->voltdm);

	return 0;
}

static int sr_class3_configure(struct voltagedomain *voltdm)
static int sr_class3_configure(struct omap_sr *sr)
{
	return sr_configure_errgen(voltdm);
	return sr_configure_errgen(sr->voltdm);
}

/* SR class3 structure */
Loading