Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/dev KNF (whitespace)
details: https://anonhg.NetBSD.org/src/rev/ed43c4eda4d3
branches: trunk
changeset: 532939:ed43c4eda4d3
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Jun 18 04:35:02 2002 +0000
description:
KNF (whitespace)
diffstat:
sys/arch/macppc/dev/pm_direct.c | 506 ++++++++++++++++++++--------------------
1 files changed, 253 insertions(+), 253 deletions(-)
diffs (truncated from 609 to 300 lines):
diff -r 68f2aa436b43 -r ed43c4eda4d3 sys/arch/macppc/dev/pm_direct.c
--- a/sys/arch/macppc/dev/pm_direct.c Tue Jun 18 04:33:36 2002 +0000
+++ b/sys/arch/macppc/dev/pm_direct.c Tue Jun 18 04:35:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pm_direct.c,v 1.17 2002/01/02 20:28:43 dbj Exp $ */
+/* $NetBSD: pm_direct.c,v 1.18 2002/06/18 04:35:02 itojun Exp $ */
/*
* Copyright (C) 1997 Takashi Hamada
@@ -336,19 +336,19 @@
via_reg(VIA2, vDirA) = 0x00;
switch (1) {
- default:
- if (pm_wait_busy(0x40) != 0)
- break; /* timeout */
+ default:
+ if (pm_wait_busy(0x40) != 0)
+ break; /* timeout */
- PM_SET_STATE_ACKOFF();
- *data = via_reg(VIA2, 0x200);
+ PM_SET_STATE_ACKOFF();
+ *data = via_reg(VIA2, 0x200);
- rval = 0xffffcd33;
- if (pm_wait_free(0x40) == 0)
- break; /* timeout */
+ rval = 0xffffcd33;
+ if (pm_wait_free(0x40) == 0)
+ break; /* timeout */
- rval = 0x00;
- break;
+ rval = 0x00;
+ break;
}
PM_SET_STATE_ACKON();
@@ -423,109 +423,109 @@
via1_vDirA = via_reg(VIA1, vDirA);
switch (pmdata->command) {
- default:
- for (i = 0; i < 7; i++) {
- via_reg(VIA2, vDirA) = 0x00;
-
- /* wait until PM is free */
- if (pm_wait_free(ADBDelay) == 0) { /* timeout */
- via_reg(VIA2, vDirA) = 0x00;
- /* restore formar value */
- via_reg(VIA1, vDirA) = via1_vDirA;
- via_reg(VIA1, vIER) = via1_vIER;
- return 0xffffcd38;
- }
-
- switch (mac68k_machine.machineid) {
- case MACH_MACPB160:
- case MACH_MACPB165:
- case MACH_MACPB165C:
- case MACH_MACPB180:
- case MACH_MACPB180C:
- {
- int delay = ADBDelay * 16;
+ default:
+ for (i = 0; i < 7; i++) {
+ via_reg(VIA2, vDirA) = 0x00;
- via_reg(VIA2, vDirA) = 0x00;
- while ((via_reg(VIA2, 0x200) == 0x7f) && (delay >= 0))
- delay--;
-
- if (delay < 0) { /* timeout */
- via_reg(VIA2, vDirA) = 0x00;
- /* restore formar value */
- via_reg(VIA1, vIER) = via1_vIER;
- return 0xffffcd38;
- }
- }
- } /* end switch */
-
- s = splhigh();
-
- via1_vDirA = via_reg(VIA1, vDirA);
- via_reg(VIA1, vDirA) &= 0x7f;
-
- pm_cmd = (u_char)(pmdata->command & 0xff);
- if ((rval = pm_send_pm1(pm_cmd, ADBDelay * 8)) == 0)
- break; /* send command succeeded */
-
- via_reg(VIA1, vDirA) = via1_vDirA;
- splx(s);
- } /* end for */
-
- /* failed to send a command */
- if (i == 7) {
+ /* wait until PM is free */
+ if (pm_wait_free(ADBDelay) == 0) { /* timeout */
via_reg(VIA2, vDirA) = 0x00;
/* restore formar value */
via_reg(VIA1, vDirA) = via1_vDirA;
via_reg(VIA1, vIER) = via1_vIER;
- if (s != 0x81815963)
- splx(s);
return 0xffffcd38;
}
- /* send # of PM data */
- num_pm_data = pmdata->num_data;
- if ((rval = pm_send_pm1((u_char)(num_pm_data & 0xff), ADBDelay * 8)) != 0)
- break; /* timeout */
+ switch (mac68k_machine.machineid) {
+ case MACH_MACPB160:
+ case MACH_MACPB165:
+ case MACH_MACPB165C:
+ case MACH_MACPB180:
+ case MACH_MACPB180C:
+ {
+ int delay = ADBDelay * 16;
+
+ via_reg(VIA2, vDirA) = 0x00;
+ while ((via_reg(VIA2, 0x200) == 0x7f) && (delay >= 0))
+ delay--;
- /* send PM data */
- pm_buf = (u_char *)pmdata->s_buf;
- for (i = 0; i < num_pm_data; i++)
- if ((rval = pm_send_pm1(pm_buf[i], ADBDelay * 8)) != 0)
- break; /* timeout */
- if ((i != num_pm_data) && (num_pm_data != 0))
- break; /* timeout */
+ if (delay < 0) { /* timeout */
+ via_reg(VIA2, vDirA) = 0x00;
+ /* restore formar value */
+ via_reg(VIA1, vIER) = via1_vIER;
+ return 0xffffcd38;
+ }
+ }
+ } /* end switch */
+
+ s = splhigh();
- /* Will PM IC return data? */
- if ((pm_cmd & 0x08) == 0) {
- rval = 0;
- break; /* no returned data */
- }
+ via1_vDirA = via_reg(VIA1, vDirA);
+ via_reg(VIA1, vDirA) &= 0x7f;
+
+ pm_cmd = (u_char)(pmdata->command & 0xff);
+ if ((rval = pm_send_pm1(pm_cmd, ADBDelay * 8)) == 0)
+ break; /* send command succeeded */
+
+ via_reg(VIA1, vDirA) = via1_vDirA;
+ splx(s);
+ } /* end for */
- rval = 0xffffcd37;
- if (pm_wait_busy(ADBDelay) != 0)
- break; /* timeout */
+ /* failed to send a command */
+ if (i == 7) {
+ via_reg(VIA2, vDirA) = 0x00;
+ /* restore formar value */
+ via_reg(VIA1, vDirA) = via1_vDirA;
+ via_reg(VIA1, vIER) = via1_vIER;
+ if (s != 0x81815963)
+ splx(s);
+ return 0xffffcd38;
+ }
+
+ /* send # of PM data */
+ num_pm_data = pmdata->num_data;
+ if ((rval = pm_send_pm1((u_char)(num_pm_data & 0xff), ADBDelay * 8)) != 0)
+ break; /* timeout */
+
+ /* send PM data */
+ pm_buf = (u_char *)pmdata->s_buf;
+ for (i = 0; i < num_pm_data; i++)
+ if ((rval = pm_send_pm1(pm_buf[i], ADBDelay * 8)) != 0)
+ break; /* timeout */
+ if ((i != num_pm_data) && (num_pm_data != 0))
+ break; /* timeout */
- /* receive PM command */
- if ((rval = pm_receive_pm1(&pm_data)) != 0)
- break;
+ /* Will PM IC return data? */
+ if ((pm_cmd & 0x08) == 0) {
+ rval = 0;
+ break; /* no returned data */
+ }
+
+ rval = 0xffffcd37;
+ if (pm_wait_busy(ADBDelay) != 0)
+ break; /* timeout */
- pmdata->command = pm_data;
+ /* receive PM command */
+ if ((rval = pm_receive_pm1(&pm_data)) != 0)
+ break;
+
+ pmdata->command = pm_data;
- /* receive number of PM data */
+ /* receive number of PM data */
+ if ((rval = pm_receive_pm1(&pm_data)) != 0)
+ break; /* timeout */
+ num_pm_data = pm_data;
+ pmdata->num_data = num_pm_data;
+
+ /* receive PM data */
+ pm_buf = (u_char *)pmdata->r_buf;
+ for (i = 0; i < num_pm_data; i++) {
if ((rval = pm_receive_pm1(&pm_data)) != 0)
- break; /* timeout */
- num_pm_data = pm_data;
- pmdata->num_data = num_pm_data;
+ break; /* timeout */
+ pm_buf[i] = pm_data;
+ }
- /* receive PM data */
- pm_buf = (u_char *)pmdata->r_buf;
- for (i = 0; i < num_pm_data; i++) {
- if ((rval = pm_receive_pm1(&pm_data)) != 0)
- break; /* timeout */
- pm_buf[i] = pm_data;
- }
-
- rval = 0;
+ rval = 0;
}
via_reg(VIA2, vDirA) = 0x00;
@@ -617,25 +617,25 @@
rval = 0xffffcd34;
switch (1) {
- default:
- /* set VIA SR to input mode */
- via_reg_or(VIA1, vACR, 0x0c);
- via_reg_and(VIA1, vACR, ~0x10);
- i = PM_SR();
+ default:
+ /* set VIA SR to input mode */
+ via_reg_or(VIA1, vACR, 0x0c);
+ via_reg_and(VIA1, vACR, ~0x10);
+ i = PM_SR();
- PM_SET_STATE_ACKOFF();
- if (pm_wait_busy((int)ADBDelay*32) != 0)
- break; /* timeout */
+ PM_SET_STATE_ACKOFF();
+ if (pm_wait_busy((int)ADBDelay*32) != 0)
+ break; /* timeout */
- PM_SET_STATE_ACKON();
- rval = 0xffffcd33;
- if (pm_wait_free((int)ADBDelay*32) == 0)
- break; /* timeout */
+ PM_SET_STATE_ACKON();
+ rval = 0xffffcd33;
+ if (pm_wait_free((int)ADBDelay*32) == 0)
+ break; /* timeout */
- *data = PM_SR();
- rval = 0;
+ *data = PM_SR();
+ rval = 0;
- break;
+ break;
}
PM_SET_STATE_ACKON();
@@ -708,104 +708,104 @@
via1_vIER |= 0x80;
switch (pmdata->command) {
- default:
- /* wait until PM is free */
- pm_cmd = (u_char)(pmdata->command & 0xff);
- rval = 0xcd38;
- if (pm_wait_free(ADBDelay * 4) == 0)
- break; /* timeout */
+ default:
+ /* wait until PM is free */
+ pm_cmd = (u_char)(pmdata->command & 0xff);
+ rval = 0xcd38;
+ if (pm_wait_free(ADBDelay * 4) == 0)
+ break; /* timeout */
- if (HwCfgFlags3 & 0x00200000) {
- /* PB 160, PB 165(c), PB 180(c)? */
- int delay = ADBDelay * 16;
+ if (HwCfgFlags3 & 0x00200000) {
+ /* PB 160, PB 165(c), PB 180(c)? */
+ int delay = ADBDelay * 16;
Home |
Main Index |
Thread Index |
Old Index