c4ceedcb18
Convert the OMAP clock code's _omap2_module_wait_ready() to use SoC-independent CM functions that are provided by the CM code, rather than using a deprecated function from mach-omap2/prcm.c. This facilitates the future conversion of the CM code to a driver, and also removes a mach-omap2/prcm.c user. mach-omap2/prcm.c will be removed by a subsequent patch. Some modules have IDLEST registers that aren't in the CM module, such as the AM3517 IDLEST bits. So we also need a fallback function for these non-CM odd cases. Create a temporary one in mach-omap2/clock.c, intended to exist until the SCM drivers are ready. Signed-off-by: Paul Walmsley <paul@pwsan.com> Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
71 lines
2.2 KiB
C
71 lines
2.2 KiB
C
/*
|
|
* OMAP2xxx Clock Management (CM) register definitions
|
|
*
|
|
* Copyright (C) 2007-2009, 2012 Texas Instruments, Inc.
|
|
* Copyright (C) 2007-2010 Nokia Corporation
|
|
* Paul Walmsley
|
|
*
|
|
* 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
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* The CM hardware modules on the OMAP2/3 are quite similar to each
|
|
* other. The CM modules/instances on OMAP4 are quite different, so
|
|
* they are handled in a separate file.
|
|
*/
|
|
#ifndef __ARCH_ASM_MACH_OMAP2_CM2XXX_H
|
|
#define __ARCH_ASM_MACH_OMAP2_CM2XXX_H
|
|
|
|
#include "prcm-common.h"
|
|
#include "cm2xxx_3xxx.h"
|
|
|
|
#define OMAP2420_CM_REGADDR(module, reg) \
|
|
OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
|
|
#define OMAP2430_CM_REGADDR(module, reg) \
|
|
OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
|
|
|
|
/*
|
|
* Module specific CM register offsets from CM_BASE + domain offset
|
|
* Use cm_{read,write}_mod_reg() with these registers.
|
|
* These register offsets generally appear in more than one PRCM submodule.
|
|
*/
|
|
|
|
/* OMAP2-specific register offsets */
|
|
|
|
#define OMAP24XX_CM_FCLKEN2 0x0004
|
|
#define OMAP24XX_CM_ICLKEN4 0x001c
|
|
#define OMAP24XX_CM_AUTOIDLE4 0x003c
|
|
#define OMAP24XX_CM_IDLEST4 0x002c
|
|
|
|
/* CM_IDLEST bit field values to indicate deasserted IdleReq */
|
|
|
|
#define OMAP24XX_CM_IDLEST_VAL 0
|
|
|
|
|
|
/* Clock management domain register get/set */
|
|
|
|
#ifndef __ASSEMBLER__
|
|
|
|
extern void omap2xxx_cm_clkdm_enable_hwsup(s16 module, u32 mask);
|
|
extern void omap2xxx_cm_clkdm_disable_hwsup(s16 module, u32 mask);
|
|
|
|
extern void omap2xxx_cm_set_dpll_disable_autoidle(void);
|
|
extern void omap2xxx_cm_set_dpll_auto_low_power_stop(void);
|
|
|
|
extern void omap2xxx_cm_set_apll54_disable_autoidle(void);
|
|
extern void omap2xxx_cm_set_apll54_auto_low_power_stop(void);
|
|
extern void omap2xxx_cm_set_apll96_disable_autoidle(void);
|
|
extern void omap2xxx_cm_set_apll96_auto_low_power_stop(void);
|
|
|
|
extern bool omap2xxx_cm_is_clkdm_in_hwsup(s16 module, u32 mask);
|
|
extern int omap2xxx_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id,
|
|
u8 idlest_shift);
|
|
extern int omap2xxx_cm_split_idlest_reg(void __iomem *idlest_reg,
|
|
s16 *prcm_inst, u8 *idlest_reg_id);
|
|
|
|
extern int __init omap2xxx_cm_init(void);
|
|
|
|
#endif
|
|
|
|
#endif
|