9
0
Fork 0

ARM i.MX IIM: switch to resources

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2011-07-27 12:49:39 +02:00
parent 1bb8f6b047
commit 9abfd82817
1 changed files with 6 additions and 3 deletions

View File

@ -226,14 +226,14 @@ static int imx_iim_blow_enable_set(struct device_d *dev, struct param_d *param,
return dev_param_set_generic(dev, param, blow_enable ? "1" : "0");
}
static int imx_iim_add_bank(struct device_d *dev, int num)
static int imx_iim_add_bank(struct device_d *dev, void __iomem *base, int num)
{
struct iim_priv *priv;
struct cdev *cdev;
priv = xzalloc(sizeof (*priv));
priv->base = (void __iomem *)dev->map_base;
priv->base = base;
priv->bankbase = priv->base + 0x800 + 0x400 * num;
priv->bank = num;
priv->banksize = 32;
@ -254,12 +254,15 @@ static int imx_iim_probe(struct device_d *dev)
struct imx_iim_platform_data *pdata = dev->platform_data;
int err;
int i;
void __iomem *base;
base = dev_request_mem_region(dev, 0);
if (pdata)
mac_addr_base = pdata->mac_addr_base;
for (i = 0; i < 8; i++) {
imx_iim_add_bank(dev, i);
imx_iim_add_bank(dev, base, i);
}
#ifdef CONFIG_IMX_IIM_FUSE_BLOW