Skip to content

Commit

Permalink
Blackfin: gptimers: add structure for hardware register layout
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Mike Frysinger committed May 28, 2011
1 parent 427472c commit a4ffd95
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions arch/blackfin/include/asm/gptimers.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,22 @@ uint16_t get_enabled_gptimers(void);
uint32_t get_gptimer_status(unsigned int group);
void set_gptimer_status(unsigned int group, uint32_t value);

/*
* All Blackfin system MMRs are padded to 32bits even if the register
* itself is only 16bits. So use a helper macro to streamline this.
*/
#define __BFP(m) u16 m; u16 __pad_##m

/*
* bfin timer registers layout
*/
struct bfin_gptimer_regs {
__BFP(config);
u32 counter;
u32 period;
u32 width;
};

#undef __BFP

#endif

0 comments on commit a4ffd95

Please sign in to comment.