* [PATCH] linux-2.5.41_cyclone-fixes_A0
@ 2002-10-11 1:09 john stultz
2002-10-11 1:32 ` [whoops][PATCH] linux-2.5.41_cyclone-fixes_A1 john stultz
0 siblings, 1 reply; 2+ messages in thread
From: john stultz @ 2002-10-11 1:09 UTC (permalink / raw)
To: Linus Torvalds, greg kh; +Cc: lkml
Linus,
This patch just syncs up the cyclone-timer code w/ Greg's changes from
this morning.
Please apply.
thanks
-john
diff -Nru a/arch/i386/kernel/timers/timer_cyclone.c b/arch/i386/kernel/timers/timer_cyclone.c
--- a/arch/i386/kernel/timers/timer_cyclone.c Thu Oct 10 18:07:14 2002
+++ b/arch/i386/kernel/timers/timer_cyclone.c Thu Oct 10 18:07:14 2002
@@ -81,7 +81,7 @@
/*make sure we're on a summit box*/
/*XXX need to use proper summit hooks! such as xapic -john*/
- if(!use_cyclone) return 0;
+ if(!use_cyclone) return -ENODEV;
printk(KERN_INFO "Summit chipset: Starting Cyclone Counter.\n");
@@ -92,12 +92,12 @@
reg = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset);
if(!reg){
printk(KERN_ERR "Summit chipset: Could not find valid CBAR register.\n");
- return 0;
+ return -ENODEV;
}
base = *reg;
if(!base){
printk(KERN_ERR "Summit chipset: Could not find valid CBAR value.\n");
- return 0;
+ return -ENODEV;
}
/* setup PMCC */
@@ -107,7 +107,7 @@
reg = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset);
if(!reg){
printk(KERN_ERR "Summit chipset: Could not find valid PMCC register.\n");
- return 0;
+ return -ENODEV;
}
reg[0] = 0x00000001;
@@ -118,7 +118,7 @@
reg = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset);
if(!reg){
printk(KERN_ERR "Summit chipset: Could not find valid MPCS register.\n");
- return 0;
+ return -ENODEV;
}
reg[0] = 0x00000001;
@@ -129,7 +129,7 @@
cyclone_timer = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset);
if(!cyclone_timer){
printk(KERN_ERR "Summit chipset: Could not find valid MPMC register.\n");
- return 0;
+ return -ENODEV;
}
/*quick test to make sure its ticking*/
@@ -140,12 +140,12 @@
if(cyclone_timer[0] == old){
printk(KERN_ERR "Summit chipset: Counter not counting! DISABLED\n");
cyclone_timer = 0;
- return 0;
+ return -ENODEV;
}
}
/* Everything looks good! */
- return 1;
+ return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [whoops][PATCH] linux-2.5.41_cyclone-fixes_A1
2002-10-11 1:09 [PATCH] linux-2.5.41_cyclone-fixes_A0 john stultz
@ 2002-10-11 1:32 ` john stultz
0 siblings, 0 replies; 2+ messages in thread
From: john stultz @ 2002-10-11 1:32 UTC (permalink / raw)
To: Linus Torvalds; +Cc: greg kh, lkml
On Thu, 2002-10-10 at 18:09, john stultz wrote:
> Linus,
> This patch just syncs up the cyclone-timer code w/ Greg's changes from
> this morning.
Whoops! Exported the wrong changeset. Here is the full patch.
Try this instead.
sorry,
-john
diff -Nru a/arch/i386/kernel/timers/timer_cyclone.c b/arch/i386/kernel/timers/timer_cyclone.c
--- a/arch/i386/kernel/timers/timer_cyclone.c Thu Oct 10 18:31:05 2002
+++ b/arch/i386/kernel/timers/timer_cyclone.c Thu Oct 10 18:31:05 2002
@@ -9,6 +9,7 @@
#include <linux/spinlock.h>
#include <linux/init.h>
#include <linux/timex.h>
+#include <linux/errno.h>
#include <asm/timer.h>
#include <asm/io.h>
@@ -81,7 +82,7 @@
/*make sure we're on a summit box*/
/*XXX need to use proper summit hooks! such as xapic -john*/
- if(!use_cyclone) return 0;
+ if(!use_cyclone) return -ENODEV;
printk(KERN_INFO "Summit chipset: Starting Cyclone Counter.\n");
@@ -92,12 +93,12 @@
reg = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset);
if(!reg){
printk(KERN_ERR "Summit chipset: Could not find valid CBAR register.\n");
- return 0;
+ return -ENODEV;
}
base = *reg;
if(!base){
printk(KERN_ERR "Summit chipset: Could not find valid CBAR value.\n");
- return 0;
+ return -ENODEV;
}
/* setup PMCC */
@@ -107,7 +108,7 @@
reg = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset);
if(!reg){
printk(KERN_ERR "Summit chipset: Could not find valid PMCC register.\n");
- return 0;
+ return -ENODEV;
}
reg[0] = 0x00000001;
@@ -118,7 +119,7 @@
reg = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset);
if(!reg){
printk(KERN_ERR "Summit chipset: Could not find valid MPCS register.\n");
- return 0;
+ return -ENODEV;
}
reg[0] = 0x00000001;
@@ -129,7 +130,7 @@
cyclone_timer = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset);
if(!cyclone_timer){
printk(KERN_ERR "Summit chipset: Could not find valid MPMC register.\n");
- return 0;
+ return -ENODEV;
}
/*quick test to make sure its ticking*/
@@ -140,12 +141,12 @@
if(cyclone_timer[0] == old){
printk(KERN_ERR "Summit chipset: Counter not counting! DISABLED\n");
cyclone_timer = 0;
- return 0;
+ return -ENODEV;
}
}
/* Everything looks good! */
- return 1;
+ return 0;
}
@@ -166,7 +167,7 @@
/* cyclone timer_opts struct */
struct timer_opts timer_cyclone = {
- init: init_cyclone,
- mark_offset: mark_offset_cyclone,
- get_offset: get_offset_cyclone
+ .init = init_cyclone,
+ .mark_offset = mark_offset_cyclone,
+ .get_offset = get_offset_cyclone
};
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-11 1:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-11 1:09 [PATCH] linux-2.5.41_cyclone-fixes_A0 john stultz
2002-10-11 1:32 ` [whoops][PATCH] linux-2.5.41_cyclone-fixes_A1 john stultz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox