Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157681
b: refs/heads/master
c: 9abea08
h: refs/heads/master
i:
  157679: 0b5eadb
v: v3
  • Loading branch information
Eero Nurkkala authored and Mark Brown committed Aug 20, 2009
1 parent 41527c8 commit 111f7aa
Show file tree
Hide file tree
Showing 3 changed files with 55 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: a4d7d550a9cfdfbc615383a08e9afa39d5a6d875
refs/heads/master: 9abea08e43c6cfc18399e42cbc6028d111532f61
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-omap/include/mach/mcbsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ int omap_mcbsp_request(unsigned int id);
void omap_mcbsp_free(unsigned int id);
void omap_mcbsp_start(unsigned int id, int tx, int rx);
void omap_mcbsp_stop(unsigned int id, int tx, int rx);
void omap_mcbsp_xmit_enable(unsigned int id, u8 enable);
void omap_mcbsp_recv_enable(unsigned int id, u8 enable);
void omap_mcbsp_xmit_word(unsigned int id, u32 word);
u32 omap_mcbsp_recv_word(unsigned int id);

Expand Down
52 changes: 52 additions & 0 deletions trunk/arch/arm/plat-omap/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,58 @@ void omap_mcbsp_stop(unsigned int id, int tx, int rx)
}
EXPORT_SYMBOL(omap_mcbsp_stop);

void omap_mcbsp_xmit_enable(unsigned int id, u8 enable)
{
struct omap_mcbsp *mcbsp;
void __iomem *io_base;
u16 w;

if (!(cpu_is_omap2430() || cpu_is_omap34xx()))
return;

if (!omap_mcbsp_check_valid_id(id)) {
printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
return;
}

mcbsp = id_to_mcbsp_ptr(id);
io_base = mcbsp->io_base;

w = OMAP_MCBSP_READ(io_base, XCCR);

if (enable)
OMAP_MCBSP_WRITE(io_base, XCCR, w & ~(XDISABLE));
else
OMAP_MCBSP_WRITE(io_base, XCCR, w | XDISABLE);
}
EXPORT_SYMBOL(omap_mcbsp_xmit_enable);

void omap_mcbsp_recv_enable(unsigned int id, u8 enable)
{
struct omap_mcbsp *mcbsp;
void __iomem *io_base;
u16 w;

if (!(cpu_is_omap2430() || cpu_is_omap34xx()))
return;

if (!omap_mcbsp_check_valid_id(id)) {
printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
return;
}

mcbsp = id_to_mcbsp_ptr(id);
io_base = mcbsp->io_base;

w = OMAP_MCBSP_READ(io_base, RCCR);

if (enable)
OMAP_MCBSP_WRITE(io_base, RCCR, w & ~(RDISABLE));
else
OMAP_MCBSP_WRITE(io_base, RCCR, w | RDISABLE);
}
EXPORT_SYMBOL(omap_mcbsp_recv_enable);

/* polled mcbsp i/o operations */
int omap_mcbsp_pollwrite(unsigned int id, u16 buf)
{
Expand Down

0 comments on commit 111f7aa

Please sign in to comment.