Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296105
b: refs/heads/master
c: ade6ec0
h: refs/heads/master
i:
  296103: 0896485
v: v3
  • Loading branch information
Nishanth Menon authored and Kevin Hilman committed Mar 5, 2012
1 parent 912edf9 commit bae8523
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f55bc1852e42f0d06d9eb66b3d3c15b01b62abe
refs/heads/master: ade6ec056fd4acdf4826178eeb305ed263844532
21 changes: 8 additions & 13 deletions trunk/arch/arm/mach-omap2/smartreflex.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ static inline void sr_modify_reg(struct omap_sr *sr, unsigned offset, u32 mask,
u32 value)
{
u32 reg_val;
u32 errconfig_offs = 0, errconfig_mask = 0;

reg_val = __raw_readl(sr->base + offset);
reg_val &= ~mask;

/*
* Smartreflex error config register is special as it contains
Expand All @@ -88,16 +84,15 @@ static inline void sr_modify_reg(struct omap_sr *sr, unsigned offset, u32 mask,
* if they are currently set, but does allow the caller to write
* those bits.
*/
if (sr->ip_type == SR_TYPE_V1) {
errconfig_offs = ERRCONFIG_V1;
errconfig_mask = ERRCONFIG_STATUS_V1_MASK;
} else if (sr->ip_type == SR_TYPE_V2) {
errconfig_offs = ERRCONFIG_V2;
errconfig_mask = ERRCONFIG_VPBOUNDINTST_V2;
}
if (sr->ip_type == SR_TYPE_V1 && offset == ERRCONFIG_V1)
mask |= ERRCONFIG_STATUS_V1_MASK;
else if (sr->ip_type == SR_TYPE_V2 && offset == ERRCONFIG_V2)
mask |= ERRCONFIG_VPBOUNDINTST_V2;

reg_val = __raw_readl(sr->base + offset);
reg_val &= ~mask;

if (offset == errconfig_offs)
reg_val &= ~errconfig_mask;
value &= mask;

reg_val |= value;

Expand Down

0 comments on commit bae8523

Please sign in to comment.