summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-01-13 21:02:39 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-01-13 21:02:39 +0000
commitf5762d91d3dd953b9ffa18acf37a9d7e48da64a1 (patch)
treeac77efb8613ad4c96a0f16487b3bfc5d4274e325 /sys/arch
parent666d5a1b5c0d51fb659993c10b5e1125e27426fd (diff)
KNF and remove dead parts.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mac68k/mac68k/pram.c48
-rw-r--r--sys/arch/mac68k/mac68k/pram.h29
2 files changed, 17 insertions, 60 deletions
diff --git a/sys/arch/mac68k/mac68k/pram.c b/sys/arch/mac68k/mac68k/pram.c
index 2dfb047ad07..71cc0d45e36 100644
--- a/sys/arch/mac68k/mac68k/pram.c
+++ b/sys/arch/mac68k/mac68k/pram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pram.c,v 1.9 2006/01/13 19:36:47 miod Exp $ */
+/* $OpenBSD: pram.c,v 1.10 2006/01/13 21:02:38 miod Exp $ */
/* $NetBSD: pram.c,v 1.11 1996/10/21 05:42:29 scottr Exp $ */
/*-
@@ -34,60 +34,41 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-/* #include "stand.h" */
#include <sys/types.h>
#include <sys/param.h>
-#include <machine/viareg.h>
-
#include <mac68k/mac68k/pram.h>
#include <mac68k/dev/adbvar.h>
-unsigned long
-pram_readtime(void)
-{
- return (getPramTime());
-}
-
-void
-pram_settime(unsigned long time)
-{
- return setPramTime(time);
-}
-
extern int adbHardware; /* from adb.c */
/*
* getPramTime
* This function can be called regrardless of the machine
* type. It calls the correct hardware-specific code.
- * (It's sort of redundant with the above, but it was
- * added later.)
*/
unsigned long
-getPramTime(void)
+pram_readtime()
{
unsigned long time;
switch (adbHardware) {
case ADB_HW_II: /* access PRAM via VIA interface */
- time=(long)getPramTimeII();
- return time;
+ return (getPramTimeII());
case ADB_HW_IISI: /* access PRAM via pseudo-adb functions */
case ADB_HW_CUDA:
- if (0 != adb_read_date_time(&time))
- return 0;
+ if (adb_read_date_time(&time) != 0)
+ return (0);
else
- return time;
+ return (time);
case ADB_HW_PB: /* don't know how to access this yet */
- return 0;
+ return (0);
case ADB_HW_UNKNOWN:
default:
- return 0;
+ return (0);
}
}
@@ -95,26 +76,25 @@ getPramTime(void)
* setPramTime
* This function can be called regrardless of the machine
* type. It calls the correct hardware-specific code.
- * (It's sort of redundant with the above, but it was
- * added later.)
*/
void
-setPramTime(unsigned long time)
+pram_settime(unsigned long time)
{
switch (adbHardware) {
case ADB_HW_II: /* access PRAM via ADB interface */
setPramTimeII(time);
- return;
+ break;
case ADB_HW_IISI: /* access PRAM via pseudo-adb functions */
case ADB_HW_CUDA:
adb_set_date_time(time);
- return;
+ break;
case ADB_HW_PB: /* don't know how to access this yet */
- return;
+ break;
case ADB_HW_UNKNOWN:
- return;
+ default:
+ break;
}
}
diff --git a/sys/arch/mac68k/mac68k/pram.h b/sys/arch/mac68k/mac68k/pram.h
index 85fcd93d4ab..c6337eeae08 100644
--- a/sys/arch/mac68k/mac68k/pram.h
+++ b/sys/arch/mac68k/mac68k/pram.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pram.h,v 1.7 2006/01/13 19:36:47 miod Exp $ */
+/* $OpenBSD: pram.h,v 1.8 2006/01/13 21:02:38 miod Exp $ */
/* $NetBSD: pram.h,v 1.3 1996/05/05 06:18:53 briggs Exp $ */
/*
@@ -43,35 +43,12 @@
*/
/*
- * In the following functions, addr is a pointer to the data to read/write
- * from/to PRAM (bytes) and loc is the PRAM address to read/write, and len
- * is the number of consecutive bytes to read/write.
- *
- * possible values for: loc len
- * read/writePram $00-$13 ** $01-10 **
- * read/writeExtPram $00-$ff $00-ff
- *
- * ** - due to the way the PRAM is set up, $00-0f must be read with one
- * command, and $10-$13 must be read with another. Please, do not
- * attempt to read across the $0f/$10 boundary!! You have been
- * warned!!
- */
-
-void readPram (char *addr, int loc, int len);
-void writePram (char *addr, int loc, int len);
-void readExtPram (char *addr, int loc, int len);
-void writeExtPram(char *addr, int loc, int len);
-
-/*
* The following routines are used to get/set the PRAM time
* (which is stored as seconds since 1904).
*/
-unsigned long getPramTime(void);
-void setPramTime(unsigned long time);
-
unsigned long pram_readtime(void);
void pram_settime(unsigned long);
-unsigned long getPramTimeII(void);
-void setPramTimeII(unsigned long);
+unsigned long getPramTimeII(void);
+void setPramTimeII(unsigned long);