Commit d9a16f9a authored by Paul Walmsley's avatar Paul Walmsley
Browse files

ARM: OMAP2+: PRCM: split and relocate the PRM/CM globals setup



Split omap2_set_globals_prcm() into PRM, CM, and PRCM_MPU variants, since
these are all separate IP blocks.  This should make it easier to move the
PRM, CM, PRCM_MPU code into drivers/ in future patchsets.

At this point arch/arm/plat-omap/include/plat/prcm.h is empty; a
subsequent patch will remove it, and remove the #include from all the
files that #include it.

Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
Tested-by: default avatarVaibhav Hiremath <hvaibhav@ti.com>
parent 5b78e61b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -30,7 +30,7 @@
#include "clock.h"
#include "clock.h"
#include "clock2xxx.h"
#include "clock2xxx.h"
#include "opp2xxx.h"
#include "opp2xxx.h"
#include "cm2xxx_3xxx.h"
#include "cm2xxx.h"
#include "cm-regbits-24xx.h"
#include "cm-regbits-24xx.h"
#include "sdrc.h"
#include "sdrc.h"


+1 −1
Original line number Original line Diff line number Diff line
@@ -39,7 +39,7 @@
#include "clock.h"
#include "clock.h"
#include "clock2xxx.h"
#include "clock2xxx.h"
#include "opp2xxx.h"
#include "opp2xxx.h"
#include "cm2xxx_3xxx.h"
#include "cm2xxx.h"
#include "cm-regbits-24xx.h"
#include "cm-regbits-24xx.h"
#include "sdrc.h"
#include "sdrc.h"


+7 −1
Original line number Original line Diff line number Diff line
/*
/*
 * OMAP2+ Clock Management prototypes
 * OMAP2+ Clock Management prototypes
 *
 *
 * Copyright (C) 2007-2009 Texas Instruments, Inc.
 * Copyright (C) 2007-2009, 2012 Texas Instruments, Inc.
 * Copyright (C) 2007-2009 Nokia Corporation
 * Copyright (C) 2007-2009 Nokia Corporation
 *
 *
 * Written by Paul Walmsley
 * Written by Paul Walmsley
@@ -22,6 +22,12 @@
 */
 */
#define MAX_MODULE_READY_TIME		2000
#define MAX_MODULE_READY_TIME		2000


# ifndef __ASSEMBLER__
extern void __iomem *cm_base;
extern void __iomem *cm2_base;
extern void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2);
# endif

/*
/*
 * MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for
 * MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for
 * the PRCM to request that a module enter the inactive state in the
 * the PRCM to request that a module enter the inactive state in the
+1 −1
Original line number Original line Diff line number Diff line
@@ -16,7 +16,7 @@
#ifndef __ARCH_ASM_MACH_OMAP2_CM2XXX_3XXX_H
#ifndef __ARCH_ASM_MACH_OMAP2_CM2XXX_3XXX_H
#define __ARCH_ASM_MACH_OMAP2_CM2XXX_3XXX_H
#define __ARCH_ASM_MACH_OMAP2_CM2XXX_3XXX_H


#include "prcm-common.h"
#include "cm.h"


/*
/*
 * Module specific CM register offsets from CM_BASE + domain offset
 * Module specific CM register offsets from CM_BASE + domain offset
+21 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
 * OMAP2+ common Clock Management (CM) IP block functions
 * OMAP2+ common Clock Management (CM) IP block functions
 *
 *
 * Copyright (C) 2012 Texas Instruments, Inc.
 * Copyright (C) 2012 Texas Instruments, Inc.
 * Paul Walmsley <paul@pwsan.com>
 * Paul Walmsley
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * it under the terms of the GNU General Public License version 2 as
@@ -17,6 +17,7 @@
#include "cm2xxx.h"
#include "cm2xxx.h"
#include "cm3xxx.h"
#include "cm3xxx.h"
#include "cm44xx.h"
#include "cm44xx.h"
#include "common.h"


/*
/*
 * cm_ll_data: function pointers to SoC-specific implementations of
 * cm_ll_data: function pointers to SoC-specific implementations of
@@ -25,6 +26,25 @@
static struct cm_ll_data null_cm_ll_data;
static struct cm_ll_data null_cm_ll_data;
static struct cm_ll_data *cm_ll_data = &null_cm_ll_data;
static struct cm_ll_data *cm_ll_data = &null_cm_ll_data;


/* cm_base: base virtual address of the CM IP block */
void __iomem *cm_base;

/* cm2_base: base virtual address of the CM2 IP block (OMAP44xx only) */
void __iomem *cm2_base;

/**
 * omap2_set_globals_cm - set the CM/CM2 base addresses (for early use)
 * @cm: CM base virtual address
 * @cm2: CM2 base virtual address (if present on the booted SoC)
 *
 * XXX Will be replaced when the PRM/CM drivers are completed.
 */
void __init omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2)
{
	cm_base = cm;
	cm2_base = cm2;
}

/**
/**
 * cm_split_idlest_reg - split CM_IDLEST reg addr into its components
 * cm_split_idlest_reg - split CM_IDLEST reg addr into its components
 * @idlest_reg: CM_IDLEST* virtual address
 * @idlest_reg: CM_IDLEST* virtual address
Loading