Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278898
b: refs/heads/master
c: 9d08f10
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Dec 13, 2011
1 parent 74289b2 commit 9c330d9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 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: ffb2756511a90091185e9be0652cc10eee0890d0
refs/heads/master: 9d08f10d355afd500310738ff09b4d921a447102
32 changes: 26 additions & 6 deletions trunk/include/linux/bcma/bcma.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,32 @@ void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value)
core->bus->ops->awrite32(core, offset, value);
}

#define bcma_mask32(cc, offset, mask) \
bcma_write32(cc, offset, bcma_read32(cc, offset) & (mask))
#define bcma_set32(cc, offset, set) \
bcma_write32(cc, offset, bcma_read32(cc, offset) | (set))
#define bcma_maskset32(cc, offset, mask, set) \
bcma_write32(cc, offset, (bcma_read32(cc, offset) & (mask)) | (set))
static inline void bcma_mask32(struct bcma_device *cc, u16 offset, u32 mask)
{
bcma_write32(cc, offset, bcma_read32(cc, offset) & mask);
}
static inline void bcma_set32(struct bcma_device *cc, u16 offset, u32 set)
{
bcma_write32(cc, offset, bcma_read32(cc, offset) | set);
}
static inline void bcma_maskset32(struct bcma_device *cc,
u16 offset, u32 mask, u32 set)
{
bcma_write32(cc, offset, (bcma_read32(cc, offset) & mask) | set);
}
static inline void bcma_mask16(struct bcma_device *cc, u16 offset, u16 mask)
{
bcma_write16(cc, offset, bcma_read16(cc, offset) & mask);
}
static inline void bcma_set16(struct bcma_device *cc, u16 offset, u16 set)
{
bcma_write16(cc, offset, bcma_read16(cc, offset) | set);
}
static inline void bcma_maskset16(struct bcma_device *cc,
u16 offset, u16 mask, u16 set)
{
bcma_write16(cc, offset, (bcma_read16(cc, offset) & mask) | set);
}

extern bool bcma_core_is_enabled(struct bcma_device *core);
extern void bcma_core_disable(struct bcma_device *core, u32 flags);
Expand Down

0 comments on commit 9c330d9

Please sign in to comment.