--- trunk/src/devices/dev_pccmos.c 2007/10/08 16:19:28 21 +++ trunk/src/devices/dev_pccmos.c 2007/10/08 16:19:37 22 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005 Anders Gavare. All rights reserved. + * Copyright (C) 2005-2006 Anders Gavare. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -25,9 +25,9 @@ * SUCH DAMAGE. * * - * $Id: dev_pccmos.c,v 1.15 2005/11/21 22:27:18 debug Exp $ + * $Id: dev_pccmos.c,v 1.22 2006/02/09 20:02:59 debug Exp $ * - * PC CMOS/RTC device. + * PC CMOS/RTC device (ISA ports 0x70 and 0x71). * * The main point of this device is to be a "PC style wrapper" for accessing * the MC146818 (the RTC). In most other respects, this device is bogus, and @@ -59,9 +59,7 @@ /* * dev_pccmos_access(): */ -int dev_pccmos_access(struct cpu *cpu, struct memory *mem, - uint64_t relative_addr, unsigned char *data, size_t len, - int writeflag, void *extra) +DEVICE_ACCESS(pccmos) { struct pccmos_data *d = (struct pccmos_data *) extra; uint64_t idata = 0, odata = 0; @@ -116,10 +114,7 @@ } -/* - * devinit_pccmos(): - */ -int devinit_pccmos(struct devinit *devinit) +DEVINIT(pccmos) { struct pccmos_data *d = malloc(sizeof(struct pccmos_data)); int irq_nr, type = MC146818_PC_CMOS, len = DEV_PCCMOS_LENGTH; @@ -145,6 +140,11 @@ irq_nr = 8 + 8; type = MC146818_ALGOR; break; + case MACHINE_ARC: + fatal("\nARC pccmos: TODO\n\n"); + irq_nr = 8 + 8; /* TODO */ + type = MC146818_ALGOR; + break; case MACHINE_EVBMIPS: /* Malta etc. */ irq_nr = 8 + 8; @@ -155,6 +155,12 @@ break; case MACHINE_BEBOX: case MACHINE_PREP: + case MACHINE_MVMEPPC: + irq_nr = 32 + 8; + break; + case MACHINE_SHARK: + case MACHINE_IYONIX: + /* TODO */ irq_nr = 32 + 8; break; default:fatal("devinit_pccmos(): unimplemented machine type"