Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272598
b: refs/heads/master
c: 8840823
h: refs/heads/master
v: v3
  • Loading branch information
Jarkko Nikula authored and Tony Lindgren committed Sep 27, 2011
1 parent 9f7ad7e commit acdc85e
Show file tree
Hide file tree
Showing 4 changed files with 10 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: 1a6458847dd25e7ade3d633e5a374b836e38b9ae
refs/heads/master: 88408230d2fe752ffca0f292b092642cc5c153f1
6 changes: 4 additions & 2 deletions trunk/arch/arm/mach-omap2/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,12 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
}

pdata->reg_step = 4;
if (oh->class->rev < MCBSP_CONFIG_TYPE2)
if (oh->class->rev < MCBSP_CONFIG_TYPE2) {
pdata->reg_size = 2;
else
} else {
pdata->reg_size = 4;
pdata->has_ccr = true;
}

if (oh->class->rev == MCBSP_CONFIG_TYPE3) {
if (id == 2)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-omap/include/plat/mcbsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ struct omap_mcbsp_platform_data {

/* McBSP platform and instance specific features */
bool has_wakeup; /* Wakeup capability */
bool has_ccr; /* Transceiver has configuration control registers */
};

struct omap_mcbsp_st_data {
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/arm/plat-omap/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg *config)
MCBSP_WRITE(mcbsp, MCR2, config->mcr2);
MCBSP_WRITE(mcbsp, MCR1, config->mcr1);
MCBSP_WRITE(mcbsp, PCR0, config->pcr0);
if (cpu_is_omap2430() || cpu_is_omap34xx() || cpu_is_omap44xx()) {
if (mcbsp->pdata->has_ccr) {
MCBSP_WRITE(mcbsp, XCCR, config->xccr);
MCBSP_WRITE(mcbsp, RCCR, config->rccr);
}
Expand Down Expand Up @@ -848,7 +848,7 @@ void omap_mcbsp_start(unsigned int id, int tx, int rx)
MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 7));
}

if (cpu_is_omap2430() || cpu_is_omap34xx() || cpu_is_omap44xx()) {
if (mcbsp->pdata->has_ccr) {
/* Release the transmitter and receiver */
w = MCBSP_READ_CACHE(mcbsp, XCCR);
w &= ~(tx ? XDISABLE : 0);
Expand Down Expand Up @@ -878,7 +878,7 @@ void omap_mcbsp_stop(unsigned int id, int tx, int rx)

/* Reset transmitter */
tx &= 1;
if (cpu_is_omap2430() || cpu_is_omap34xx() || cpu_is_omap44xx()) {
if (mcbsp->pdata->has_ccr) {
w = MCBSP_READ_CACHE(mcbsp, XCCR);
w |= (tx ? XDISABLE : 0);
MCBSP_WRITE(mcbsp, XCCR, w);
Expand All @@ -888,7 +888,7 @@ void omap_mcbsp_stop(unsigned int id, int tx, int rx)

/* Reset receiver */
rx &= 1;
if (cpu_is_omap2430() || cpu_is_omap34xx() || cpu_is_omap44xx()) {
if (mcbsp->pdata->has_ccr) {
w = MCBSP_READ_CACHE(mcbsp, RCCR);
w |= (rx ? RDISABLE : 0);
MCBSP_WRITE(mcbsp, RCCR, w);
Expand Down

0 comments on commit acdc85e

Please sign in to comment.