Skip to contentSkip to conversation

Patch to arch/ppc/kernel/m8260_setup.c

PATCH diekema_jon 3 participants 3 messages Aug 22, 2000

lore
Share & tools
lore
#0 lore raw

In order to get things to compile for the MPC8260, the following patch was needed:

dell 377} bk diffs -r1.7 -u arch/ppc/kernel/m8260_setup.c ===== arch/ppc/kernel/m8260_setup.c 1.7 vs 1.8 =====

arch/ppc/kernel/m8260_setup.c Mon Aug 21 21:17:00 2000 renamed from arch/ppc/kernel/m8260_setup.c Wed Aug 2 12:53:58 2000 +2 -3
@@ -113,9 +113,8 @@
 
        freq = (binfo->bi_busfreq * 1000000);
         divisor = 4;
-        decrementer_count = freq / HZ / divisor;
-        count_period_num = divisor;
-        count_period_den = freq / 1000000;
+        tb_ticks_per_jiffy = freq / (divisor * HZ);
+        tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000);
 }
 
 /* The 8260 has an internal 1-second timer update register that

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 11 lines · diekema_jon

In order to get things to compile for the MPC8260, the following patch was needed:

dell 377} bk diffs -r1.7 -u arch/ppc/kernel/m8260_setup.c ===== arch/ppc/kernel/m8260_setup.c 1.7 vs 1.8 =====

arch/ppc/kernel/m8260_setup.c Mon Aug 21 21:17:00 2000 renamed from arch/ppc/kernel/m8260_setup.c Wed Aug 2 12:53:58 2000 +0 -0
@@ -113,9 +113,8 @@
 

arch/ppc/kernel/m8260_setup.c Mon Aug 21 21:17:00 2000 line 120

Quoted 10 lines
arch/ppc/kernel/m8260_setup.c Mon Aug 21 21:17:00 2000 renamed from arch/ppc/kernel/m8260_setup.c Wed Aug 2 12:53:58 2000 +2 -3
        freq = (binfo->bi_busfreq * 1000000);
         divisor = 4;
-        decrementer_count = freq / HZ / divisor;
-        count_period_num = divisor;
-        count_period_den = freq / 1000000;
+        tb_ticks_per_jiffy = freq / (divisor * HZ);
+        tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000);
 }
 
 /* The 8260 has an internal 1-second timer update register that

You don't mention the source of this code (i.e. linux rev and test#).

My 2.3 kernel compiles just fine...

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 20 lines · you
Quoted 19 lines · diekema_jon

In order to get things to compile for the MPC8260, the following patch was needed:

dell 377} bk diffs -r1.7 -u arch/ppc/kernel/m8260_setup.c ===== arch/ppc/kernel/m8260_setup.c 1.7 vs 1.8 =====

arch/ppc/kernel/m8260_setup.c Mon Aug 21 21:17:00 2000 renamed from arch/ppc/kernel/m8260_setup.c Wed Aug 2 12:53:58 2000 +2 -3
@@ -113,9 +113,8 @@
 
        freq = (binfo->bi_busfreq * 1000000);
         divisor = 4;
-        decrementer_count = freq / HZ / divisor;
-        count_period_num = divisor;
-        count_period_den = freq / 1000000;
+        tb_ticks_per_jiffy = freq / (divisor * HZ);
+        tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000);
 }
 
Quoted 3 lines

arch/ppc/kernel/m8260_setup.c Mon Aug 21 21:17:00 2000 line 120

Quoted 1 line
arch/ppc/kernel/m8260_setup.c Mon Aug 21 21:17:00 2000 renamed from arch/ppc/kernel/m8260_setup.c Wed Aug 2 12:53:58 2000 +0 -0
 /* The 8260 has an internal 1-second timer update register that

You don't mention the source of this code (i.e. linux rev and test#).

Oops... The patch is working with Linux 2.4.0-test7

For more details on this issue see:

http://lists.linuxppc.org/listarcs/linuxppc-embedded/200008/msg00109.html
http://lists.linuxppc.org/listarcs/linuxppc-embedded/200008/msg00113.html
------------------\\----------------------\\----------------------------

Jon Diekema        |                       | Smiths Industries
(616) 241-8310     |                       | 3290 Patterson Avenue, SE
[email protected] \\                      \\  Grand Rapids, MI 49512-1991

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/