add rtc and update i2s

This commit is contained in:
lhh
2010-12-04 11:54:21 +08:00
parent 6604ca6e0f
commit 30c2f6473f
5 changed files with 26 additions and 13 deletions

View File

@@ -309,6 +309,13 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = {
.flags = 0,
},
#endif
#if defined (CONFIG_SND_SOC_WM8900)
{
.type = "wm8900",
.addr = 0x1A,
.flags = 0,
},
#endif
#if defined (CONFIG_BATTERY_STC3100)
{
.type = "stc3100-battery",
@@ -323,6 +330,14 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = {
.flags = 0,
},
#endif
#if defined (CONFIG_RTC_HYM8563)
{
.type = "rtc_hym8563",
.addr = 0x51,
.flags = 0,
///.irq = RK2818_PIN_PA4,
},
#endif
};
#endif

View File

@@ -35,7 +35,7 @@
#define RK2818_I2C_TIMEOUT (msecs_to_jiffies(500))
#define RK2818_DELAY_TIME 2
#if 1
#if 0
#define i2c_dbg(dev, format, arg...) \
dev_printk(KERN_INFO , dev , format , ## arg)
#else

View File

@@ -147,8 +147,8 @@ comment "I2C RTC drivers"
if I2C
config RTC_HYM8563
tristate "RK2818 extern HYM8563 RTC"
depends on I2C_RK2818
tristate "RK2818 or RK29 extern HYM8563 RTC"
depends on I2C_RK2818 || I2C_RK29
help
If you say yes here you will get support for the
HYM8563 I2C RTC chip.

View File

@@ -128,12 +128,10 @@ static void rockchip_snd_txctrl(struct rk29_i2s_info *i2s, int on)
u32 opr,xfer,fifosts;
I2S_DBG("Enter %s, %d >>>>>>>>>>>\n", __func__, __LINE__);
opr = readl(pheadi2s->I2S_DMACR);
xfer = readl(pheadi2s->I2S_XFER);
opr = readl(&(pheadi2s->I2S_DMACR));
xfer = readl(&(pheadi2s->I2S_XFER));
opr &= ~I2S_TRAN_DMA_ENABLE;
xfer &= ~I2S_TX_TRAN_START;
xfer &= ~I2S_TX_TRAN_START;
if (on)
{
writel(opr, &(pheadi2s->I2S_DMACR));
@@ -149,7 +147,7 @@ static void rockchip_snd_txctrl(struct rk29_i2s_info *i2s, int on)
{
writel(opr, &(pheadi2s->I2S_DMACR));
writel(xfer, &(pheadi2s->I2S_XFER));
}
}
}
static void rockchip_snd_rxctrl(struct rk29_i2s_info *i2s, int on)
@@ -158,8 +156,8 @@ static void rockchip_snd_rxctrl(struct rk29_i2s_info *i2s, int on)
I2S_DBG("Enter %s, %d >>>>>>>>>>>\n", __func__, __LINE__);
opr = readl(pheadi2s->I2S_DMACR);
xfer = readl(pheadi2s->I2S_XFER);
opr = readl(&(pheadi2s->I2S_DMACR));
xfer = readl(&(pheadi2s->I2S_XFER));
opr &= ~I2S_RECE_DMA_ENABLE;
xfer &= ~I2S_RX_TRAN_START;
@@ -450,7 +448,7 @@ static int rk29_i2s_probe(struct platform_device *pdev,
base = res->start;
}
i2s->regs = ioremap(base, resource_size(res));
i2s->regs = ioremap(base, (res->end - res->start) + 1); ////res));
if (i2s->regs == NULL) {
dev_err(dev, "cannot ioremap registers\n");
return -ENXIO;

View File

@@ -122,7 +122,7 @@
#define I2S_TX_LRCK_OUT_I2S (0<<5)
#define I2S_TX_LRCK_OUT_PCM (1<<5)
#define I2S_DATA_WIDTH(w) ((&0x1F)<<0)
#define I2S_DATA_WIDTH(w) ((w&0x1F)<<0)
/* */