Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233123
b: refs/heads/master
c: 9c66807
h: refs/heads/master
i:
  233121: 43bc6b5
  233119: d54cf07
v: v3
  • Loading branch information
Bob Liu authored and Felipe Balbi committed Feb 1, 2011
1 parent c75caa0 commit 756ea7e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 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: 541079de88735152a993ff93e90096643730a054
refs/heads/master: 9c668079c864c3b49d8deb56dafedf916b2a72d0
19 changes: 14 additions & 5 deletions trunk/drivers/usb/musb/musbhsdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,33 @@ static inline void musb_write_hsdma_addr(void __iomem *mbase,
{
musb_writew(mbase,
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_ADDR_LOW),
((u16)((u32) dma_addr & 0xFFFF)));
dma_addr);
musb_writew(mbase,
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_ADDR_HIGH),
((u16)(((u32) dma_addr >> 16) & 0xFFFF)));
(dma_addr >> 16));
}

static inline u32 musb_read_hsdma_count(void __iomem *mbase, u8 bchannel)
{
return musb_readl(mbase,
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)
{
musb_writel(mbase,
musb_writew(mbase,
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_LOW),len);
musb_writew(mbase,
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_HIGH),
len);
(len >> 16));
}

#endif /* CONFIG_BLACKFIN */
Expand Down

0 comments on commit 756ea7e

Please sign in to comment.