1 |
/* |
/* |
2 |
* Copyright (C) 2004-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2004-2007 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_ahc.c,v 1.5 2006/07/21 16:55:41 debug Exp $ |
* $Id: dev_ahc.c,v 1.8 2007/06/15 18:44:18 debug Exp $ |
29 |
* |
* |
30 |
* Adaptec AHC SCSI controller. |
* COMMENT: Adaptec AHC SCSI controller |
31 |
* |
* |
32 |
* NetBSD should say something like this, on SGI-IP32: |
* NetBSD should say something like this, on SGI-IP32: |
33 |
* ahc0 at pci0 dev 1 function 0 |
* ahc0 at pci0 dev 1 function 0 |
164 |
(int)relative_addr); |
(int)relative_addr); |
165 |
} |
} |
166 |
|
|
|
#if 0 |
|
|
cpu_interrupt(cpu, 0x200); |
|
|
#endif |
|
|
|
|
167 |
#ifdef AHC_DEBUG |
#ifdef AHC_DEBUG |
168 |
if (ok) { |
if (ok) { |
169 |
if (name == NULL) { |
if (name == NULL) { |
193 |
|
|
194 |
DEVINIT(ahc) |
DEVINIT(ahc) |
195 |
{ |
{ |
196 |
struct ahc_data *d = malloc(sizeof(struct ahc_data)); |
struct ahc_data *d; |
197 |
if (d == NULL) { |
|
198 |
fprintf(stderr, "out of memory\n"); |
CHECK_ALLOCATION(d = malloc(sizeof(struct ahc_data))); |
|
exit(1); |
|
|
} |
|
199 |
memset(d, 0, sizeof(struct ahc_data)); |
memset(d, 0, sizeof(struct ahc_data)); |
200 |
|
|
201 |
memory_device_register(devinit->machine->memory, devinit->name, |
memory_device_register(devinit->machine->memory, devinit->name, |