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

Commit 6e01478a authored by Paul Walmsley's avatar Paul Walmsley
Browse files

OMAP2+: powerdomains: move powerdomain static data to .c files



Static data should be declared in .c files, not .h files.  It should be
possible to #include .h files at any point without creating multiple
copies of the same data.

We converted the clock data to .c files some time ago.  This patch does
the same for the powerdomain data.

Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
Tested-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
Tested-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: default avatarRajendra Nayak <rnayak@ti.com>
parent 4b4f62c4
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -78,13 +78,18 @@ obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm.o
obj-$(CONFIG_ARCH_OMAP4)		+= prcm.o cm4xxx.o

# OMAP powerdomain framework
powerdomain-common			+= powerdomain.o powerdomains_data.o powerdomain-common.o
powerdomain-common			+= powerdomain.o powerdomain-common.o
obj-$(CONFIG_ARCH_OMAP2)		+= $(powerdomain-common) \
					   powerdomain2xxx_3xxx.o
					   powerdomain2xxx_3xxx.o \
					   powerdomains2xxx_data.o \
					   powerdomains2xxx_3xxx_data.o
obj-$(CONFIG_ARCH_OMAP3)		+= $(powerdomain-common) \
					   powerdomain2xxx_3xxx.o
					   powerdomain2xxx_3xxx.o \
					   powerdomains3xxx_data.o \
					   powerdomains2xxx_3xxx_data.o
obj-$(CONFIG_ARCH_OMAP4)		+= $(powerdomain-common) \
					   powerdomain44xx.o
					   powerdomain44xx.o \
					   powerdomains44xx_data.o

# Clock framework
obj-$(CONFIG_ARCH_OMAP2)		+= $(clock-common) clock2xxx.o \
+14 −7
Original line number Diff line number Diff line
@@ -339,18 +339,25 @@ void __init omap2_init_common_infrastructure(void)
{
	u8 postsetup_state;

	pwrdm_fw_init();
	if (cpu_is_omap242x()) {
		omap2xxx_powerdomains_init();
		clkdm_init(clockdomains_omap, clkdm_autodeps);
	if (cpu_is_omap242x())
		omap2420_hwmod_init();
	else if (cpu_is_omap243x())
	} else if (cpu_is_omap243x()) {
		omap2xxx_powerdomains_init();
		clkdm_init(clockdomains_omap, clkdm_autodeps);
		omap2430_hwmod_init();
	else if (cpu_is_omap34xx())
	} else if (cpu_is_omap34xx()) {
		omap3xxx_powerdomains_init();
		clkdm_init(clockdomains_omap, clkdm_autodeps);
		omap3xxx_hwmod_init();
	else if (cpu_is_omap44xx())
	} else if (cpu_is_omap44xx()) {
		omap44xx_powerdomains_init();
		clkdm_init(clockdomains_omap, clkdm_autodeps);
		omap44xx_hwmod_init();
	else
	} else {
		pr_err("Could not init hwmod data - unknown SoC\n");
        }

	/* Set the default postsetup state for all hwmods */
#ifdef CONFIG_PM_RUNTIME
+6 −1
Original line number Diff line number Diff line
@@ -15,10 +15,15 @@
#include <linux/io.h>
#include <linux/errno.h>
#include <linux/delay.h>

#include <plat/prcm.h>
#include "prm.h"

#include "prm-regbits-34xx.h"
#include "powerdomains.h"
#include "prm.h"
#include "prm-regbits-24xx.h"
#include "prm-regbits-34xx.h"


/* Common functions across OMAP2 and OMAP3 */
static int omap2_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/io.h>
#include <linux/errno.h>
#include <linux/delay.h>

#include <plat/powerdomain.h>
#include <plat/prcm.h>
#include "prm.h"
+6 −3
Original line number Diff line number Diff line
@@ -10,8 +10,8 @@
 * published by the Free Software Foundation.
 */

#ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS
#define ARCH_ARM_MACH_OMAP2_POWERDOMAINS
#ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS_H
#define ARCH_ARM_MACH_OMAP2_POWERDOMAINS_H

#include <plat/powerdomain.h>

@@ -24,4 +24,7 @@ extern u32 omap2_pwrdm_get_mem_bank_onstate_mask(u8 bank);
extern u32 omap2_pwrdm_get_mem_bank_retst_mask(u8 bank);
extern u32 omap2_pwrdm_get_mem_bank_stst_mask(u8 bank);

#endif /* ARCH_ARM_MACH_OMAP2_POWERDOMAINS */
extern struct powerdomain wkup_omap2_pwrdm;
extern struct powerdomain gfx_omap2_pwrdm;

#endif
Loading