cminst44xx.c (2fe5de9ce7d57498abc14b375cad2fcf8c3ee6cc) cminst44xx.c (edfaf05c2fcb853fcf35f12aeb9c340f5913337f)
1/*
2 * OMAP4 CM instance functions
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Copyright (C) 2008-2011 Texas Instruments, Inc.
6 * Paul Walmsley
7 * Rajendra Nayak <rnayak@ti.com>
8 *

--- 102 unchanged lines hidden (view full) ---

111/* Public functions */
112
113/* Read a register in a CM instance */
114u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx)
115{
116 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
117 part == OMAP4430_INVALID_PRCM_PARTITION ||
118 !_cm_bases[part]);
1/*
2 * OMAP4 CM instance functions
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Copyright (C) 2008-2011 Texas Instruments, Inc.
6 * Paul Walmsley
7 * Rajendra Nayak <rnayak@ti.com>
8 *

--- 102 unchanged lines hidden (view full) ---

111/* Public functions */
112
113/* Read a register in a CM instance */
114u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx)
115{
116 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
117 part == OMAP4430_INVALID_PRCM_PARTITION ||
118 !_cm_bases[part]);
119 return __raw_readl(_cm_bases[part] + inst + idx);
119 return readl_relaxed(_cm_bases[part] + inst + idx);
120}
121
122/* Write into a register in a CM instance */
123void omap4_cminst_write_inst_reg(u32 val, u8 part, u16 inst, u16 idx)
124{
125 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
126 part == OMAP4430_INVALID_PRCM_PARTITION ||
127 !_cm_bases[part]);
120}
121
122/* Write into a register in a CM instance */
123void omap4_cminst_write_inst_reg(u32 val, u8 part, u16 inst, u16 idx)
124{
125 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
126 part == OMAP4430_INVALID_PRCM_PARTITION ||
127 !_cm_bases[part]);
128 __raw_writel(val, _cm_bases[part] + inst + idx);
128 writel_relaxed(val, _cm_bases[part] + inst + idx);
129}
130
131/* Read-modify-write a register in CM1. Caller must lock */
132u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, u16 inst,
133 s16 idx)
134{
135 u32 v;
136

--- 372 unchanged lines hidden ---
129}
130
131/* Read-modify-write a register in CM1. Caller must lock */
132u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, u16 inst,
133 s16 idx)
134{
135 u32 v;
136

--- 372 unchanged lines hidden ---