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_ip22.c,v 1.26 2005/11/13 00:14:09 debug Exp $ |
* $Id: dev_sgi_ip22.c,v 1.27 2006/01/01 13:17:17 debug Exp $ |
29 |
* |
* |
30 |
* SGI IP22 stuff. |
* SGI IP22 stuff. |
31 |
*/ |
*/ |
63 |
* |
* |
64 |
* The memory controller (?). |
* The memory controller (?). |
65 |
*/ |
*/ |
66 |
int dev_sgi_ip22_imc_access(struct cpu *cpu, struct memory *mem, |
DEVICE_ACCESS(sgi_ip22_imc) |
|
uint64_t relative_addr, unsigned char *data, size_t len, |
|
|
int writeflag, void *extra) |
|
67 |
{ |
{ |
68 |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
69 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |
167 |
* |
* |
168 |
* A so far unknown device, used by the IP22 prom during startup. |
* A so far unknown device, used by the IP22 prom during startup. |
169 |
*/ |
*/ |
170 |
int dev_sgi_ip22_unknown_access(struct cpu *cpu, struct memory *mem, |
DEVICE_ACCESS(sgi_ip22_unknown) |
|
uint64_t relative_addr, unsigned char *data, size_t len, |
|
|
int writeflag, void *extra) |
|
171 |
{ |
{ |
172 |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
173 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |
210 |
* |
* |
211 |
* A so far unknown device, used by the IP22 prom during startup. |
* A so far unknown device, used by the IP22 prom during startup. |
212 |
*/ |
*/ |
213 |
int dev_sgi_ip22_unknown2_access(struct cpu *cpu, struct memory *mem, |
DEVICE_ACCESS(sgi_ip22_unknown2) |
|
uint64_t relative_addr, unsigned char *data, size_t len, |
|
|
int writeflag, void *extra) |
|
214 |
{ |
{ |
215 |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
216 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |
247 |
/* |
/* |
248 |
* dev_sgi_ip22_sysid_access(): |
* dev_sgi_ip22_sysid_access(): |
249 |
*/ |
*/ |
250 |
int dev_sgi_ip22_sysid_access(struct cpu *cpu, struct memory *mem, |
DEVICE_ACCESS(sgi_ip22_sysid) |
|
uint64_t relative_addr, unsigned char *data, size_t len, |
|
|
int writeflag, void *extra) |
|
251 |
{ |
{ |
252 |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
253 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |
283 |
|
|
284 |
/* |
/* |
285 |
* dev_sgi_ip22_access(): |
* dev_sgi_ip22_access(): |
|
* |
|
|
* Returns 1 if ok, 0 on error. |
|
286 |
*/ |
*/ |
287 |
int dev_sgi_ip22_access(struct cpu *cpu, struct memory *mem, |
DEVICE_ACCESS(sgi_ip22) |
|
uint64_t relative_addr, unsigned char *data, size_t len, |
|
|
int writeflag, void *extra) |
|
288 |
{ |
{ |
289 |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
struct sgi_ip22_data *d = (struct sgi_ip22_data *) extra; |
290 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |