1 |
/* |
/* |
2 |
* Copyright (C) 2004-2005 Anders Gavare. All rights reserved. |
* Copyright (C) 2004-2006 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_wdsc.c,v 1.28 2005/11/13 00:14:10 debug Exp $ |
* $Id: dev_wdsc.c,v 1.32 2006/10/07 02:05:21 debug Exp $ |
29 |
* |
* |
30 |
* WDSC SCSI (WD33C93) controller. |
* WDSC SCSI (WD33C93) controller. |
31 |
* (For SGI-IP22. See sys/arch/sgimips/hpc/sbic* in NetBSD for details.) |
* (For SGI-IP22. See sys/arch/sgimips/hpc/sbic* in NetBSD for details.) |
66 |
}; |
}; |
67 |
|
|
68 |
|
|
69 |
/* |
DEVICE_TICK(wdsc) |
|
* dev_wdsc_tick(): |
|
|
*/ |
|
|
void dev_wdsc_tick(struct cpu *cpu, void *extra) |
|
70 |
{ |
{ |
71 |
struct wdsc_data *d = extra; |
struct wdsc_data *d = extra; |
72 |
|
|
305 |
/* |
/* |
306 |
* dev_wdsc_access(): |
* dev_wdsc_access(): |
307 |
*/ |
*/ |
308 |
int dev_wdsc_access(struct cpu *cpu, struct memory *mem, |
DEVICE_ACCESS(wdsc) |
|
uint64_t relative_addr, unsigned char *data, size_t len, |
|
|
int writeflag, void *extra) |
|
309 |
{ |
{ |
310 |
int i; |
size_t i; |
311 |
struct wdsc_data *d = extra; |
struct wdsc_data *d = extra; |
312 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |
313 |
|
|
407 |
memory_device_register(mem, "wdsc", baseaddr, DEV_WDSC_LENGTH, |
memory_device_register(mem, "wdsc", baseaddr, DEV_WDSC_LENGTH, |
408 |
dev_wdsc_access, d, DM_DEFAULT, NULL); |
dev_wdsc_access, d, DM_DEFAULT, NULL); |
409 |
|
|
410 |
machine_add_tickfunction(machine, dev_wdsc_tick, d, 14); |
machine_add_tickfunction(machine, dev_wdsc_tick, d, 14, 0.0); |
411 |
} |
} |
412 |
|
|