Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293190
b: refs/heads/master
c: 44fb864
h: refs/heads/master
v: v3
  • Loading branch information
Ryan Mallon authored and Mark Brown committed Jan 20, 2012
1 parent 764e03f commit 7cf4796
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 23 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: 291d64be3137b9bb709ce3bc72dbe2ca6b647466
refs/heads/master: 44fb864b8f696d3e8328b294e6515ad45aecfeb0
19 changes: 4 additions & 15 deletions trunk/arch/arm/mach-ep93xx/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,23 +817,12 @@ void __init ep93xx_register_i2s(void)
#define EP93XX_I2SCLKDIV_MASK (EP93XX_SYSCON_I2SCLKDIV_ORIDE | \
EP93XX_SYSCON_I2SCLKDIV_SPOL)

int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
int ep93xx_i2s_acquire(void)
{
unsigned val;

/* Sanity check */
if (i2s_pins & ~EP93XX_SYSCON_DEVCFG_I2S_MASK)
return -EINVAL;
if (i2s_config & ~EP93XX_I2SCLKDIV_MASK)
return -EINVAL;

/* Must have only one of I2SONSSP/I2SONAC97 set */
if ((i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONSSP) ==
(i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONAC97))
return -EINVAL;

ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2S_MASK);
ep93xx_devcfg_set_bits(i2s_pins);
ep93xx_devcfg_set_clear(EP93XX_SYSCON_DEVCFG_I2SONAC97,
EP93XX_SYSCON_DEVCFG_I2S_MASK);

/*
* This is potentially racy with the clock api for i2s_mclk, sclk and
Expand All @@ -843,7 +832,7 @@ int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
*/
val = __raw_readl(EP93XX_SYSCON_I2SCLKDIV);
val &= ~EP93XX_I2SCLKDIV_MASK;
val |= i2s_config;
val |= EP93XX_SYSCON_I2SCLKDIV_ORIDE | EP93XX_SYSCON_I2SCLKDIV_SPOL;
ep93xx_syscon_swlocked_write(val, EP93XX_SYSCON_I2SCLKDIV);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-ep93xx/include/mach/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data);
int ep93xx_keypad_acquire_gpio(struct platform_device *pdev);
void ep93xx_keypad_release_gpio(struct platform_device *pdev);
void ep93xx_register_i2s(void);
int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config);
int ep93xx_i2s_acquire(void);
void ep93xx_i2s_release(void);
void ep93xx_register_ac97(void);

Expand Down
4 changes: 1 addition & 3 deletions trunk/sound/soc/ep93xx/edb93xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ static int __devinit edb93xx_probe(struct platform_device *pdev)
struct snd_soc_card *card = &snd_soc_edb93xx;
int ret;

ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
EP93XX_SYSCON_I2SCLKDIV_ORIDE |
EP93XX_SYSCON_I2SCLKDIV_SPOL);
ret = ep93xx_i2s_acquire();
if (ret)
return ret;

Expand Down
4 changes: 1 addition & 3 deletions trunk/sound/soc/ep93xx/snappercl15.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ static int __devinit snappercl15_probe(struct platform_device *pdev)
struct snd_soc_card *card = &snd_soc_snappercl15;
int ret;

ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
EP93XX_SYSCON_I2SCLKDIV_ORIDE |
EP93XX_SYSCON_I2SCLKDIV_SPOL);
ret = ep93xx_i2s_acquire();
if (ret)
return ret;

Expand Down

0 comments on commit 7cf4796

Please sign in to comment.