9
0
Fork 0

i2c: convert to struct resource

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2011-07-19 03:26:44 +08:00
parent 75a31ab8de
commit 39b599cb6b
2 changed files with 4 additions and 5 deletions

View File

@ -113,11 +113,11 @@ struct imx_i2c_struct {
#ifdef CONFIG_I2C_DEBUG
static void i2c_imx_dump_reg(struct i2c_adapter *adapter)
{
unsigned long base = adapter->dev->map_base;
struct imx_i2c_struct *i2c_imx = to_imx_i2c_struct(adapter);
u32 reg_cr, reg_sr;
reg_cr = readb(base + IMX_I2C_I2CR);
reg_sr = readb(base + IMX_I2C_I2SR);
reg_cr = readb(i2c_imx->base + IMX_I2C_I2CR);
reg_sr = readb(i2c_imx->base + IMX_I2C_I2SR);
dev_dbg(adapter->dev, "CONTROL:\t"
"IEN =%d, IIEN=%d, MSTA=%d, MTX =%d, TXAK=%d, RSTA=%d\n",

View File

@ -716,7 +716,6 @@ i2c_omap_probe(struct device_d *pdev)
{
struct omap_i2c_struct *i2c_omap;
/* struct i2c_platform_data *pdata; */
/* unsigned long base = pdev->map_base; */
int r;
u32 speed = 0;
@ -732,7 +731,7 @@ i2c_omap_probe(struct device_d *pdev)
speed = 100; /* Defualt speed */
i2c_omap->speed = speed;
i2c_omap->base = (void*)pdev->map_base;
i2c_omap->base = dev_request_mem_region(pdev, 0);
printf ("I2C probe\n");
omap_i2c_unidle(i2c_omap);