Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a2908413
Commit
a2908413
authored
Feb 14, 2004
by
Benjamin Herrenschmidt
Committed by
Linus Torvalds
Feb 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Remove debug cruft from via-pmu.c driver
parent
103e6e39
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
51 deletions
+0
-51
drivers/macintosh/via-pmu.c
drivers/macintosh/via-pmu.c
+0
-51
No files found.
drivers/macintosh/via-pmu.c
View file @
a2908413
...
@@ -72,13 +72,6 @@
...
@@ -72,13 +72,6 @@
/* How many iterations between battery polls */
/* How many iterations between battery polls */
#define BATTERY_POLLING_COUNT 2
#define BATTERY_POLLING_COUNT 2
/* Some debugging tools */
#ifdef CONFIG_XMON
//#define LIVE_DEBUG(req) ((req) && (req)->data[0] == 0x7d)
#define LIVE_DEBUG(req) (0)
static
int
whacky_debug
;
#endif
/* CONFIG_XMON */
static
volatile
unsigned
char
*
via
;
static
volatile
unsigned
char
*
via
;
/* VIA registers - spaced 0x200 bytes apart */
/* VIA registers - spaced 0x200 bytes apart */
...
@@ -1218,12 +1211,6 @@ pmu_start(void)
...
@@ -1218,12 +1211,6 @@ pmu_start(void)
wait_for_ack
();
wait_for_ack
();
/* set the shift register to shift out and send a byte */
/* set the shift register to shift out and send a byte */
send_byte
(
req
->
data
[
0
]);
send_byte
(
req
->
data
[
0
]);
#ifdef CONFIG_XMON
if
(
LIVE_DEBUG
(
req
))
xmon_printf
(
"R"
);
else
whacky_debug
=
0
;
#endif
/* CONFIG_XMON */
}
}
void
__openfirmware
void
__openfirmware
...
@@ -1476,29 +1463,17 @@ pmu_sr_intr(struct pt_regs *regs)
...
@@ -1476,29 +1463,17 @@ pmu_sr_intr(struct pt_regs *regs)
case
sending
:
case
sending
:
req
=
current_req
;
req
=
current_req
;
if
(
data_len
<
0
)
{
if
(
data_len
<
0
)
{
#ifdef CONFIG_XMON
if
(
LIVE_DEBUG
(
req
))
xmon_printf
(
"s"
);
#endif
/* CONFIG_XMON */
data_len
=
req
->
nbytes
-
1
;
data_len
=
req
->
nbytes
-
1
;
send_byte
(
data_len
);
send_byte
(
data_len
);
break
;
break
;
}
}
if
(
data_index
<=
data_len
)
{
if
(
data_index
<=
data_len
)
{
#ifdef CONFIG_XMON
if
(
LIVE_DEBUG
(
req
))
xmon_printf
(
"S"
);
#endif
/* CONFIG_XMON */
send_byte
(
req
->
data
[
data_index
++
]);
send_byte
(
req
->
data
[
data_index
++
]);
break
;
break
;
}
}
req
->
sent
=
1
;
req
->
sent
=
1
;
data_len
=
pmu_data_len
[
req
->
data
[
0
]][
1
];
data_len
=
pmu_data_len
[
req
->
data
[
0
]][
1
];
if
(
data_len
==
0
)
{
if
(
data_len
==
0
)
{
#ifdef CONFIG_XMON
if
(
LIVE_DEBUG
(
req
))
xmon_printf
(
"D"
);
#endif
/* CONFIG_XMON */
pmu_state
=
idle
;
pmu_state
=
idle
;
current_req
=
req
->
next
;
current_req
=
req
->
next
;
if
(
req
->
reply_expected
)
if
(
req
->
reply_expected
)
...
@@ -1506,10 +1481,6 @@ pmu_sr_intr(struct pt_regs *regs)
...
@@ -1506,10 +1481,6 @@ pmu_sr_intr(struct pt_regs *regs)
else
else
return
req
;
return
req
;
}
else
{
}
else
{
#ifdef CONFIG_XMON
if
(
LIVE_DEBUG
(
req
))
xmon_printf
(
"-"
);
#endif
/* CONFIG_XMON */
pmu_state
=
reading
;
pmu_state
=
reading
;
data_index
=
0
;
data_index
=
0
;
reply_ptr
=
req
->
reply
+
req
->
reply_len
;
reply_ptr
=
req
->
reply
+
req
->
reply_len
;
...
@@ -1532,18 +1503,10 @@ pmu_sr_intr(struct pt_regs *regs)
...
@@ -1532,18 +1503,10 @@ pmu_sr_intr(struct pt_regs *regs)
case
reading
:
case
reading
:
case
reading_intr
:
case
reading_intr
:
if
(
data_len
==
-
1
)
{
if
(
data_len
==
-
1
)
{
#ifdef CONFIG_XMON
if
(
LIVE_DEBUG
(
current_req
))
xmon_printf
(
"r"
);
#endif
/* CONFIG_XMON */
data_len
=
bite
;
data_len
=
bite
;
if
(
bite
>
32
)
if
(
bite
>
32
)
printk
(
KERN_ERR
"PMU: bad reply len %d
\n
"
,
bite
);
printk
(
KERN_ERR
"PMU: bad reply len %d
\n
"
,
bite
);
}
else
if
(
data_index
<
32
)
{
}
else
if
(
data_index
<
32
)
{
#ifdef CONFIG_XMON
if
(
LIVE_DEBUG
(
current_req
))
xmon_printf
(
"R"
);
#endif
/* CONFIG_XMON */
reply_ptr
[
data_index
++
]
=
bite
;
reply_ptr
[
data_index
++
]
=
bite
;
}
}
if
(
data_index
<
data_len
)
{
if
(
data_index
<
data_len
)
{
...
@@ -1551,12 +1514,6 @@ pmu_sr_intr(struct pt_regs *regs)
...
@@ -1551,12 +1514,6 @@ pmu_sr_intr(struct pt_regs *regs)
break
;
break
;
}
}
#ifdef CONFIG_XMON
if
(
LIVE_DEBUG
(
current_req
))
{
whacky_debug
=
1
;
xmon_printf
(
"D"
);
}
#endif
/* CONFIG_XMON */
if
(
pmu_state
==
reading_intr
)
{
if
(
pmu_state
==
reading_intr
)
{
pmu_state
=
idle
;
pmu_state
=
idle
;
int_data_state
[
int_data_last
]
=
int_data_ready
;
int_data_state
[
int_data_last
]
=
int_data_ready
;
...
@@ -1603,10 +1560,6 @@ via_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
...
@@ -1603,10 +1560,6 @@ via_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
intr
=
in_8
(
&
via
[
IFR
])
&
(
SR_INT
|
CB1_INT
);
intr
=
in_8
(
&
via
[
IFR
])
&
(
SR_INT
|
CB1_INT
);
if
(
intr
==
0
)
if
(
intr
==
0
)
break
;
break
;
#ifdef CONFIG_XMON
if
(
whacky_debug
)
xmon_printf
(
"|%02x|"
,
intr
);
#endif
/* CONFIG_XMON */
handled
=
1
;
handled
=
1
;
if
(
++
nloop
>
1000
)
{
if
(
++
nloop
>
1000
)
{
printk
(
KERN_DEBUG
"PMU: stuck in intr loop, "
printk
(
KERN_DEBUG
"PMU: stuck in intr loop, "
...
@@ -1629,10 +1582,6 @@ via_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
...
@@ -1629,10 +1582,6 @@ via_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
recheck:
recheck:
if
(
pmu_state
==
idle
)
{
if
(
pmu_state
==
idle
)
{
if
(
adb_int_pending
)
{
if
(
adb_int_pending
)
{
#ifdef CONFIG_XMON
if
(
whacky_debug
)
xmon_printf
(
"!A!"
);
#endif
/* CONFIG_XMON */
if
(
int_data_state
[
0
]
==
int_data_empty
)
if
(
int_data_state
[
0
]
==
int_data_empty
)
int_data_last
=
0
;
int_data_last
=
0
;
else
if
(
int_data_state
[
1
]
==
int_data_empty
)
else
if
(
int_data_state
[
1
]
==
int_data_empty
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment