Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185283
b: refs/heads/master
c: 452f039
h: refs/heads/master
i:
  185281: 50ff952
  185279: 40ad4ac
v: v3
  • Loading branch information
Anand Gadiyar authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 7cb1150 commit b52929e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b151526eda87901532390e11bba0dd59119f667
refs/heads/master: 452f0394376d2cc882e4c4a593fc290c042799a9
17 changes: 17 additions & 0 deletions trunk/drivers/usb/musb/musbhsdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_ADDRESS), \
addr)

#define musb_read_hsdma_count(mbase, bchannel) \
musb_readl(mbase, \
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT))

#define musb_write_hsdma_count(mbase, bchannel, len) \
musb_writel(mbase, \
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT), \
Expand Down Expand Up @@ -96,6 +100,19 @@ static inline void musb_write_hsdma_addr(void __iomem *mbase,
((u16)(((u32) dma_addr >> 16) & 0xFFFF)));
}

static inline u32 musb_read_hsdma_count(void __iomem *mbase, u8 bchannel)
{
u32 count = musb_readw(mbase,
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_HIGH));

count = count << 16;

count |= musb_readw(mbase,
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_LOW));

return count;
}

static inline void musb_write_hsdma_count(void __iomem *mbase,
u8 bchannel, u32 len)
{
Expand Down

0 comments on commit b52929e

Please sign in to comment.