diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-07-19 03:26:44 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-07-23 13:52:19 +0800 |
commit | 39b599cb6b4843afd5cedc152cabff1fcd19b071 (patch) | |
tree | f8aec815c9a884a41aa478531e33362af32cec7a /drivers | |
parent | 75a31ab8ded2c12b1543b4bc184570feb151eb2d (diff) | |
download | barebox-39b599cb6b4843afd5cedc152cabff1fcd19b071.tar.gz barebox-39b599cb6b4843afd5cedc152cabff1fcd19b071.tar.xz |
i2c: convert to struct resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 6 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index aaed8c451f..2d075f72ca 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -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", diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 8e7a8b500c..95c4fdf782 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -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); |