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

Commit 8179488a authored by Paul Walmsley's avatar Paul Walmsley
Browse files

OMAP: powerdomain: remove omap_chip bitmasks



At Tony's request, remove the omap_chip bitmasks from the powerdomain
definitions.  Instead, initialize powerdomains based on one or more
lists that are applicable to a particular SoC family, variant, and
silicon revision.

Gražvydas Ignotas <notasas@gmail.com> found and reported a bug in a
related patch that also applied to this patch - thanks Gražvydas.

Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
Cc: Gražvydas Ignotas <notasas@gmail.com>
parent 129c65ee
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -341,11 +341,11 @@ void __init omap2_init_common_infrastructure(void)
	u8 postsetup_state;

	if (cpu_is_omap242x()) {
		omap2xxx_powerdomains_init();
		omap242x_powerdomains_init();
		omap242x_clockdomains_init();
		omap2420_hwmod_init();
	} else if (cpu_is_omap243x()) {
		omap2xxx_powerdomains_init();
		omap243x_powerdomains_init();
		omap243x_clockdomains_init();
		omap2430_hwmod_init();
	} else if (cpu_is_omap34xx()) {
+3 −4
Original line number Diff line number Diff line
/*
 *  linux/arch/arm/mach-omap2/powerdomain-common.c
 *  Contains common powerdomain framework functions
 * Common powerdomain framework functions
 *
 *  Copyright (C) 2010 Texas Instruments, Inc.
 * Copyright (C) 2010-2011 Texas Instruments, Inc.
 * Copyright (C) 2010 Nokia Corporation
 *
 * Derived from mach-omap2/powerdomain.c written by Paul Walmsley
+0 −3
Original line number Diff line number Diff line
@@ -81,9 +81,6 @@ static int _pwrdm_register(struct powerdomain *pwrdm)
	if (!pwrdm || !pwrdm->name)
		return -EINVAL;

	if (!omap_chip_is(pwrdm->omap_chip))
		return -EINVAL;

	if (cpu_is_omap44xx() &&
	    pwrdm->prcm_partition == OMAP4430_INVALID_PRCM_PARTITION) {
		pr_err("powerdomain: %s: missing OMAP4 PRCM partition ID\n",
+2 −3
Original line number Diff line number Diff line
@@ -78,7 +78,6 @@ struct powerdomain;
/**
 * struct powerdomain - OMAP powerdomain
 * @name: Powerdomain name
 * @omap_chip: represents the OMAP chip types containing this pwrdm
 * @prcm_offs: the address offset from CM_BASE/PRM_BASE
 * @prcm_partition: (OMAP4 only) the PRCM partition ID containing @prcm_offs
 * @pwrsts: Possible powerdomain power states
@@ -98,7 +97,6 @@ struct powerdomain;
 */
struct powerdomain {
	const char *name;
	const struct omap_chip_id omap_chip;
	const s16 prcm_offs;
	const u8 pwrsts;
	const u8 pwrsts_logic_ret;
@@ -212,7 +210,8 @@ int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm);
u32 pwrdm_get_context_loss_count(struct powerdomain *pwrdm);
bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm);

extern void omap2xxx_powerdomains_init(void);
extern void omap242x_powerdomains_init(void);
extern void omap243x_powerdomains_init(void);
extern void omap3xxx_powerdomains_init(void);
extern void omap44xx_powerdomains_init(void);

+1 −18
Original line number Diff line number Diff line
/*
 * OMAP2/3 common powerdomain definitions
 *
 * Copyright (C) 2007-2008 Texas Instruments, Inc.
 * Copyright (C) 2007-2008, 2011 Texas Instruments, Inc.
 * Copyright (C) 2007-2011 Nokia Corporation
 *
 * Paul Walmsley, Jouni Högander
@@ -11,20 +11,6 @@
 * published by the Free Software Foundation.
 */

/*
 * To Do List
 * -> Move the Sleep/Wakeup dependencies from Power Domain framework to
 *    Clock Domain Framework
 */

/*
 * This file contains all of the powerdomains that have some element
 * of software control for the OMAP24xx and OMAP34xx chips.
 *
 * This is not an exhaustive listing of powerdomains on the chips; only
 * powerdomains that can be controlled in software.
 */

/*
 * The names for the DSP/IVA2 powerdomains are confusing.
 *
@@ -59,8 +45,6 @@
struct powerdomain gfx_omap2_pwrdm = {
	.name		  = "gfx_pwrdm",
	.prcm_offs	  = GFX_MOD,
	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX |
					   CHIP_IS_OMAP3430ES1),
	.pwrsts		  = PWRSTS_OFF_RET_ON,
	.pwrsts_logic_ret = PWRSTS_RET,
	.banks		  = 1,
@@ -75,6 +59,5 @@ struct powerdomain gfx_omap2_pwrdm = {
struct powerdomain wkup_omap2_pwrdm = {
	.name		= "wkup_pwrdm",
	.prcm_offs	= WKUP_MOD,
	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430),
	.pwrsts		= PWRSTS_ON,
};
Loading