diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 00:55:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 00:55:47 -0400 |
commit | e86908614f2c7fec401827e5cefd7a6ea9407f85 (patch) | |
tree | fcb5d9e52422b37bdaf0e647126ebdfc1680f162 /arch/ppc/amiga/time.c | |
parent | 547307420931344a868275bd7ea7a30f117a15a9 (diff) | |
parent | 9b4b8feb962f4b3e74768b7205f1f8f6cce87238 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (408 commits)
[POWERPC] Add memchr() to the bootwrapper
[POWERPC] Implement logging of unhandled signals
[POWERPC] Add legacy serial support for OPB with flattened device tree
[POWERPC] Use 1TB segments
[POWERPC] XilinxFB: Allow fixed framebuffer base address
[POWERPC] XilinxFB: Add support for custom screen resolution
[POWERPC] XilinxFB: Use pdata to pass around framebuffer parameters
[POWERPC] PCI: Add 64-bit physical address support to setup_indirect_pci
[POWERPC] 4xx: Kilauea defconfig file
[POWERPC] 4xx: Kilauea DTS
[POWERPC] 4xx: Add AMCC Kilauea eval board support to platforms/40x
[POWERPC] 4xx: Add AMCC 405EX support to cputable.c
[POWERPC] Adjust TASK_SIZE on ppc32 systems to 3GB that are capable
[POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers
[POWERPC] 85xx: Enable FP emulation in MPC8560 ADS defconfig
[POWERPC] 85xx: Killed <asm/mpc85xx.h>
[POWERPC] 85xx: Add cpm nodes for 8541/8555 CDS
[POWERPC] 85xx: Convert mpc8560ads to the new CPM binding.
[POWERPC] mpc8272ads: Remove muram from the CPM reg property.
[POWERPC] Make clockevents work on PPC601 processors
...
Fixed up conflict in Documentation/powerpc/booting-without-of.txt manually.
Diffstat (limited to 'arch/ppc/amiga/time.c')
-rw-r--r-- | arch/ppc/amiga/time.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/arch/ppc/amiga/time.c b/arch/ppc/amiga/time.c deleted file mode 100644 index 8c880c0ca380..000000000000 --- a/arch/ppc/amiga/time.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | #include <linux/errno.h> | ||
2 | #include <linux/sched.h> | ||
3 | #include <linux/kernel.h> | ||
4 | #include <linux/param.h> | ||
5 | #include <linux/string.h> | ||
6 | #include <linux/mm.h> | ||
7 | |||
8 | #include <asm/machdep.h> | ||
9 | #include <asm/io.h> | ||
10 | |||
11 | #include <linux/timex.h> | ||
12 | |||
13 | unsigned long m68k_get_rtc_time(void) | ||
14 | { | ||
15 | unsigned int year, mon, day, hour, min, sec; | ||
16 | |||
17 | extern void arch_gettod(int *year, int *mon, int *day, int *hour, | ||
18 | int *min, int *sec); | ||
19 | |||
20 | arch_gettod (&year, &mon, &day, &hour, &min, &sec); | ||
21 | |||
22 | if ((year += 1900) < 1970) | ||
23 | year += 100; | ||
24 | |||
25 | return mktime(year, mon, day, hour, min, sec); | ||
26 | } | ||
27 | |||
28 | int m68k_set_rtc_time(unsigned long nowtime) | ||
29 | { | ||
30 | if (mach_set_clock_mmss) | ||
31 | return mach_set_clock_mmss (nowtime); | ||
32 | return -1; | ||
33 | } | ||
34 | |||
35 | void apus_heartbeat (void) | ||
36 | { | ||
37 | #ifdef CONFIG_HEARTBEAT | ||
38 | static unsigned cnt = 0, period = 0, dist = 0; | ||
39 | |||
40 | if (cnt == 0 || cnt == dist) | ||
41 | mach_heartbeat( 1 ); | ||
42 | else if (cnt == 7 || cnt == dist+7) | ||
43 | mach_heartbeat( 0 ); | ||
44 | |||
45 | if (++cnt > period) { | ||
46 | cnt = 0; | ||
47 | /* The hyperbolic function below modifies the heartbeat period | ||
48 | * length in dependency of the current (5min) load. It goes | ||
49 | * through the points f(0)=126, f(1)=86, f(5)=51, | ||
50 | * f(inf)->30. */ | ||
51 | period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30; | ||
52 | dist = period / 4; | ||
53 | } | ||
54 | #endif | ||
55 | /* should be made smarter */ | ||
56 | ppc_md.heartbeat_count = 1; | ||
57 | } | ||