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

Commit ea351c16 authored by Tony Lindgren's avatar Tony Lindgren
Browse files

Merge tag 'for-v3.16/prcm-cleanup-a' of...

Merge tag 'for-v3.16/prcm-cleanup-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.16/prcm

Some OMAP PRCM cleanup patches.  These help prepare to convert the PRCM
code into drivers.

Basic build, boot, and PM test results are available here:

http://www.pwsan.com/omap/testlogs/prcm-cleanup-v3.16/20140515213244/

Conflicts:
	arch/arm/mach-omap2/cm3xxx.c
	arch/arm/mach-omap2/cm44xx.c

Also fixed up new section mismatch warnings.
parents be2d6284 70fcebf1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@

#include "powerdomain.h"
#include "clock.h"
#include "omap_hwmod.h"

/*
 * Clockdomain flags
@@ -98,6 +97,8 @@ struct clkdm_dep {
/* Possible flags for struct clockdomain._flags */
#define _CLKDM_FLAG_HWSUP_ENABLED		BIT(0)

struct omap_hwmod;

/**
 * struct clockdomain - OMAP clockdomain
 * @name: clockdomain name
+2 −13
Original line number Diff line number Diff line
@@ -18,9 +18,6 @@
#include <linux/err.h>
#include <linux/io.h>

#include "soc.h"
#include "iomap.h"
#include "common.h"
#include "prm2xxx.h"
#include "cm.h"
#include "cm2xxx.h"
@@ -390,7 +387,7 @@ void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core, u32 mdm)
	tmp = omap2_cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) &
		OMAP24XX_CLKSEL_DSS2_MASK;
	omap2_cm_write_mod_reg(core | tmp, CORE_MOD, CM_CLKSEL1);
	if (cpu_is_omap2430())
	if (mdm)
		omap2_cm_write_mod_reg(mdm, OMAP2430_MDM_MOD, CM_CLKSEL);
}

@@ -405,19 +402,11 @@ static struct cm_ll_data omap2xxx_cm_ll_data = {

int __init omap2xxx_cm_init(void)
{
	if (!cpu_is_omap24xx())
		return 0;

	return cm_register(&omap2xxx_cm_ll_data);
}

static void __exit omap2xxx_cm_exit(void)
{
	if (!cpu_is_omap24xx())
		return;

	/* Should never happen */
	WARN(cm_unregister(&omap2xxx_cm_ll_data),
	     "%s: cm_ll_data function pointer mismatch\n", __func__);
	cm_unregister(&omap2xxx_cm_ll_data);
}
__exitcall(omap2xxx_cm_exit);
+0 −3
Original line number Diff line number Diff line
@@ -17,11 +17,8 @@
#ifndef __ARCH_ARM_MACH_OMAP2_CM_33XX_H
#define __ARCH_ARM_MACH_OMAP2_CM_33XX_H

#include "common.h"

#include "cm.h"
#include "cm-regbits-33xx.h"
#include "iomap.h"

/* CM base address */
#define AM33XX_CM_BASE		0x44e00000
+9 −16
Original line number Diff line number Diff line
@@ -18,9 +18,6 @@
#include <linux/err.h>
#include <linux/io.h>

#include "soc.h"
#include "iomap.h"
#include "common.h"
#include "prm2xxx_3xxx.h"
#include "cm.h"
#include "cm3xxx.h"
@@ -388,7 +385,8 @@ void omap3_cm_save_context(void)
		omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL1);
	cm_context.iva2_cm_clksel2 =
		omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL2);
	cm_context.cm_sysconfig = readl_relaxed(OMAP3430_CM_SYSCONFIG);
	cm_context.cm_sysconfig =
		omap2_cm_read_mod_reg(OCP_MOD, OMAP3430_CM_SYSCONFIG);
	cm_context.sgx_cm_clksel =
		omap2_cm_read_mod_reg(OMAP3430ES2_SGX_MOD, CM_CLKSEL);
	cm_context.dss_cm_clksel =
@@ -418,7 +416,8 @@ void omap3_cm_save_context(void)
		omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL5);
	cm_context.pll_cm_clken2 =
		omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKEN2);
	cm_context.cm_polctrl = readl_relaxed(OMAP3430_CM_POLCTRL);
	cm_context.cm_polctrl =
		omap2_cm_read_mod_reg(OCP_MOD, OMAP3430_CM_POLCTRL);
	cm_context.iva2_cm_fclken =
		omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_FCLKEN);
	cm_context.iva2_cm_clken_pll =
@@ -519,7 +518,8 @@ void omap3_cm_restore_context(void)
			       CM_CLKSEL1);
	omap2_cm_write_mod_reg(cm_context.iva2_cm_clksel2, OMAP3430_IVA2_MOD,
			       CM_CLKSEL2);
	writel_relaxed(cm_context.cm_sysconfig, OMAP3430_CM_SYSCONFIG);
	omap2_cm_write_mod_reg(cm_context.cm_sysconfig, OCP_MOD,
			       OMAP3430_CM_SYSCONFIG);
	omap2_cm_write_mod_reg(cm_context.sgx_cm_clksel, OMAP3430ES2_SGX_MOD,
			       CM_CLKSEL);
	omap2_cm_write_mod_reg(cm_context.dss_cm_clksel, OMAP3430_DSS_MOD,
@@ -547,7 +547,8 @@ void omap3_cm_restore_context(void)
			       OMAP3430ES2_CM_CLKSEL5);
	omap2_cm_write_mod_reg(cm_context.pll_cm_clken2, PLL_MOD,
			       OMAP3430ES2_CM_CLKEN2);
	writel_relaxed(cm_context.cm_polctrl, OMAP3430_CM_POLCTRL);
	omap2_cm_write_mod_reg(cm_context.cm_polctrl, OCP_MOD,
			       OMAP3430_CM_POLCTRL);
	omap2_cm_write_mod_reg(cm_context.iva2_cm_fclken, OMAP3430_IVA2_MOD,
			       CM_FCLKEN);
	omap2_cm_write_mod_reg(cm_context.iva2_cm_clken_pll, OMAP3430_IVA2_MOD,
@@ -669,19 +670,11 @@ static struct cm_ll_data omap3xxx_cm_ll_data = {

int __init omap3xxx_cm_init(void)
{
	if (!cpu_is_omap34xx())
		return 0;

	return cm_register(&omap3xxx_cm_ll_data);
}

static void __exit omap3xxx_cm_exit(void)
{
	if (!cpu_is_omap34xx())
		return;

	/* Should never happen */
	WARN(cm_unregister(&omap3xxx_cm_ll_data),
	     "%s: cm_ll_data function pointer mismatch\n", __func__);
	cm_unregister(&omap3xxx_cm_ll_data);
}
__exitcall(omap3xxx_cm_exit);
+2 −3
Original line number Diff line number Diff line
@@ -29,9 +29,8 @@
 * These registers appear once per CM module.
 */

#define OMAP3430_CM_REVISION		OMAP34XX_CM_REGADDR(OCP_MOD, 0x0000)
#define OMAP3430_CM_SYSCONFIG		OMAP34XX_CM_REGADDR(OCP_MOD, 0x0010)
#define OMAP3430_CM_POLCTRL		OMAP34XX_CM_REGADDR(OCP_MOD, 0x009c)
#define OMAP3430_CM_SYSCONFIG		0x0010
#define OMAP3430_CM_POLCTRL		0x009c

#define OMAP3_CM_CLKOUT_CTRL_OFFSET	0x0070
#define OMAP3430_CM_CLKOUT_CTRL		OMAP_CM_REGADDR(OMAP3430_CCR_MOD, 0x0070)
Loading