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_sgi_ip19.c,v 1.14 2005/10/26 14:37:04 debug Exp $ |
* $Id: dev_sgi_ip19.c,v 1.17 2006/02/09 20:02:59 debug Exp $ |
29 |
* |
* |
30 |
* SGI IP19 (and IP25) stuff. The stuff in here is mostly guesswork. |
* SGI IP19 (and IP25) stuff. The stuff in here is mostly guesswork. |
31 |
*/ |
*/ |
51 |
/* |
/* |
52 |
* dev_sgi_ip19_access(): |
* dev_sgi_ip19_access(): |
53 |
*/ |
*/ |
54 |
int dev_sgi_ip19_access(struct cpu *cpu, struct memory *mem, |
DEVICE_ACCESS(sgi_ip19) |
|
uint64_t relative_addr, unsigned char *data, size_t len, |
|
|
int writeflag, void *extra) |
|
55 |
{ |
{ |
56 |
struct sgi_ip19_data *d = (struct sgi_ip19_data *) extra; |
struct sgi_ip19_data *d = (struct sgi_ip19_data *) extra; |
57 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |
111 |
} |
} |
112 |
|
|
113 |
|
|
114 |
/* |
DEVINIT(sgi_ip19) |
|
* devinit__sgi_ip19(): |
|
|
*/ |
|
|
int devinit_sgi_ip19(struct devinit *devinit) |
|
115 |
{ |
{ |
116 |
struct sgi_ip19_data *d = malloc(sizeof(struct sgi_ip19_data)); |
struct sgi_ip19_data *d = malloc(sizeof(struct sgi_ip19_data)); |
117 |
if (d == NULL) { |
if (d == NULL) { |
122 |
|
|
123 |
memory_device_register(devinit->machine->memory, devinit->name, |
memory_device_register(devinit->machine->memory, devinit->name, |
124 |
devinit->addr, DEV_SGI_IP19_LENGTH, |
devinit->addr, DEV_SGI_IP19_LENGTH, |
125 |
dev_sgi_ip19_access, (void *)d, MEM_DEFAULT, NULL); |
dev_sgi_ip19_access, (void *)d, DM_DEFAULT, NULL); |
126 |
|
|
127 |
return 1; |
return 1; |
128 |
} |
} |