diff options
Diffstat (limited to 'drivers/scsi/aacraid/sa.c')
-rw-r--r-- | drivers/scsi/aacraid/sa.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index cd586cc8f9be..f906ead239dd 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c | |||
@@ -281,6 +281,21 @@ static int aac_sa_check_health(struct aac_dev *dev) | |||
281 | } | 281 | } |
282 | 282 | ||
283 | /** | 283 | /** |
284 | * aac_sa_ioremap | ||
285 | * @size: mapping resize request | ||
286 | * | ||
287 | */ | ||
288 | static int aac_sa_ioremap(struct aac_dev * dev, u32 size) | ||
289 | { | ||
290 | if (!size) { | ||
291 | iounmap(dev->regs.sa); | ||
292 | return 0; | ||
293 | } | ||
294 | dev->base = dev->regs.sa = ioremap(dev->scsi_host_ptr->base, size); | ||
295 | return (dev->base == NULL) ? -1 : 0; | ||
296 | } | ||
297 | |||
298 | /** | ||
284 | * aac_sa_init - initialize an ARM based AAC card | 299 | * aac_sa_init - initialize an ARM based AAC card |
285 | * @dev: device to configure | 300 | * @dev: device to configure |
286 | * | 301 | * |
@@ -299,6 +314,11 @@ int aac_sa_init(struct aac_dev *dev) | |||
299 | instance = dev->id; | 314 | instance = dev->id; |
300 | name = dev->name; | 315 | name = dev->name; |
301 | 316 | ||
317 | if (aac_sa_ioremap(dev, dev->base_size)) { | ||
318 | printk(KERN_WARNING "%s: unable to map adapter.\n", name); | ||
319 | goto error_iounmap; | ||
320 | } | ||
321 | |||
302 | /* | 322 | /* |
303 | * Check to see if the board failed any self tests. | 323 | * Check to see if the board failed any self tests. |
304 | */ | 324 | */ |
@@ -341,6 +361,7 @@ int aac_sa_init(struct aac_dev *dev) | |||
341 | dev->a_ops.adapter_notify = aac_sa_notify_adapter; | 361 | dev->a_ops.adapter_notify = aac_sa_notify_adapter; |
342 | dev->a_ops.adapter_sync_cmd = sa_sync_cmd; | 362 | dev->a_ops.adapter_sync_cmd = sa_sync_cmd; |
343 | dev->a_ops.adapter_check_health = aac_sa_check_health; | 363 | dev->a_ops.adapter_check_health = aac_sa_check_health; |
364 | dev->a_ops.adapter_ioremap = aac_sa_ioremap; | ||
344 | 365 | ||
345 | /* | 366 | /* |
346 | * First clear out all interrupts. Then enable the one's that | 367 | * First clear out all interrupts. Then enable the one's that |